diff options
author | chriseth <c@ethdev.com> | 2016-11-14 18:46:43 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-12-01 23:03:59 +0800 |
commit | 5789eaa78d0e00f6289101e02f7de5e9decdc7e5 (patch) | |
tree | 8964f493235d310baa50806fdff65138054d2439 /libsolidity/codegen/Compiler.cpp | |
parent | 55a719a79c1ab5b78ea6e1bcb4f27a888494a538 (diff) | |
download | dexon-solidity-5789eaa78d0e00f6289101e02f7de5e9decdc7e5.tar.gz dexon-solidity-5789eaa78d0e00f6289101e02f7de5e9decdc7e5.tar.zst dexon-solidity-5789eaa78d0e00f6289101e02f7de5e9decdc7e5.zip |
Metadata stamp.
Diffstat (limited to 'libsolidity/codegen/Compiler.cpp')
-rw-r--r-- | libsolidity/codegen/Compiler.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libsolidity/codegen/Compiler.cpp b/libsolidity/codegen/Compiler.cpp index 22d25698..168e9462 100644 --- a/libsolidity/codegen/Compiler.cpp +++ b/libsolidity/codegen/Compiler.cpp @@ -30,7 +30,8 @@ using namespace dev::solidity; void Compiler::compileContract( ContractDefinition const& _contract, - std::map<const ContractDefinition*, eth::Assembly const*> const& _contracts + std::map<const ContractDefinition*, eth::Assembly const*> const& _contracts, + h256 const& _metadataHash ) { ContractCompiler runtimeCompiler(nullptr, m_runtimeContext, m_optimize); @@ -43,11 +44,8 @@ void Compiler::compileContract( m_context.optimise(m_optimize, m_optimizeRuns); - if (_contract.isLibrary()) - { - solAssert(m_runtimeSub != size_t(-1), ""); - m_context.injectVersionStampIntoSub(m_runtimeSub); - } + solAssert(m_runtimeSub != size_t(-1), ""); + m_context.injectMetadataHashIntoSub(m_runtimeSub, _metadataHash); } void Compiler::compileClone( |