diff options
author | chriseth <chris@ethereum.org> | 2017-08-26 00:58:12 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-16 03:46:32 +0800 |
commit | 80ce3ca66f063d8d87c2393e689f92d8608b4e0a (patch) | |
tree | ae1376cd7d128573edb235f92191dd30118d07bf /libsolidity/codegen/ContractCompiler.cpp | |
parent | 73771f5bb2d8aee1b71dfcc909a60aa47c591dec (diff) | |
download | dexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.tar.gz dexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.tar.zst dexon-solidity-80ce3ca66f063d8d87c2393e689f92d8608b4e0a.zip |
Move ABI encoder into its own function.
Diffstat (limited to 'libsolidity/codegen/ContractCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ContractCompiler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 24d3d959..51496368 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -122,6 +122,7 @@ void ContractCompiler::appendCallValueCheck() void ContractCompiler::appendInitAndConstructorCode(ContractDefinition const& _contract) { + CompilerContext::LocationSetter locationSetter(m_context, _contract); // Determine the arguments that are used for the base constructors. std::vector<ContractDefinition const*> const& bases = _contract.annotation().linearizedBaseContracts; for (ContractDefinition const* contract: bases) @@ -174,6 +175,7 @@ size_t ContractCompiler::packIntoContractCreator(ContractDefinition const& _cont appendMissingFunctions(); m_runtimeCompiler->appendMissingFunctions(); + CompilerContext::LocationSetter locationSetter(m_context, _contract); m_context << deployRoutine; solAssert(m_context.runtimeSub() != size_t(-1), "Runtime sub not registered"); @@ -892,6 +894,9 @@ void ContractCompiler::appendMissingFunctions() solAssert(m_context.nextFunctionToCompile() != function, "Compiled the wrong function?"); } m_context.appendMissingLowLevelFunctions(); + string abiFunctions = m_context.abiFunctions().requestedFunctions(); + if (!abiFunctions.empty()) + m_context.appendInlineAssembly("{" + move(abiFunctions) + "}", {}, true); } void ContractCompiler::appendModifierOrFunctionCode() |