mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Stored combined creation and runtime tags.
Includes a change to Assembly to allow tags from sub-assemblies to be used. Sorry, this get a bit bigger than I thought.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <libsolidity/interface/InterfaceHandler.h>
|
||||
#include <libsolidity/formal/Why3Translator.h>
|
||||
|
||||
#include <libevmasm/Exceptions.h>
|
||||
#include <libdevcore/SHA3.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
@@ -590,9 +591,19 @@ void CompilerStack::compileContract(
|
||||
compiledContract.runtimeObject = compiler->runtimeObject();
|
||||
_compiledContracts[compiledContract.contract] = &compiler->assembly();
|
||||
|
||||
Compiler cloneCompiler(_optimize, _runs);
|
||||
cloneCompiler.compileClone(_contract, _compiledContracts);
|
||||
compiledContract.cloneObject = cloneCompiler.assembledObject();
|
||||
try
|
||||
{
|
||||
Compiler cloneCompiler(_optimize, _runs);
|
||||
cloneCompiler.compileClone(_contract, _compiledContracts);
|
||||
compiledContract.cloneObject = cloneCompiler.assembledObject();
|
||||
}
|
||||
catch (eth::AssemblyException const& _e)
|
||||
{
|
||||
// In some cases (if the constructor requests a runtime function), it is not
|
||||
// possible to compile the clone.
|
||||
|
||||
// TODO: Report error / warning
|
||||
}
|
||||
}
|
||||
|
||||
std::string CompilerStack::defaultContractName() const
|
||||
|
||||
Reference in New Issue
Block a user