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:
chriseth
2016-11-16 14:37:18 +01:00
parent ee3efa67a8
commit e543bd34c0
20 changed files with 347 additions and 117 deletions
+14 -3
View File
@@ -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