diff options
author | chriseth <c@ethdev.com> | 2015-09-10 18:01:05 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-09-11 21:21:37 +0800 |
commit | a9edc7b1a601747f96e47fe60a5fc10df489696f (patch) | |
tree | 8165a9a44cc6cf23f6a8d8b152facfe3fd65a909 /libsolidity/Compiler.h | |
parent | 337fde9d11adac85800b405a3fdb4bcd09039ebf (diff) | |
download | dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.gz dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.tar.zst dexon-solidity-a9edc7b1a601747f96e47fe60a5fc10df489696f.zip |
Transition from bytecode to more general linker objects.
Diffstat (limited to 'libsolidity/Compiler.h')
-rw-r--r-- | libsolidity/Compiler.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libsolidity/Compiler.h b/libsolidity/Compiler.h index f283683f..7e1d3222 100644 --- a/libsolidity/Compiler.h +++ b/libsolidity/Compiler.h @@ -42,16 +42,19 @@ public: { } - void compileContract(ContractDefinition const& _contract, - std::map<ContractDefinition const*, bytes const*> const& _contracts); + void compileContract( + ContractDefinition const& _contract, + std::map<ContractDefinition const*, eth::Assembly const*> const& _contracts + ); /// Compiles a contract that uses CALLCODE to call into a pre-deployed version of the given /// contract at runtime, but contains the full creation-time code. void compileClone( ContractDefinition const& _contract, - std::map<ContractDefinition const*, bytes const*> const& _contracts + std::map<ContractDefinition const*, eth::Assembly const*> const& _contracts ); - bytes assembledBytecode() { return m_context.assembledBytecode(); } - bytes runtimeBytecode() { return m_context.assembledRuntimeBytecode(m_runtimeSub); } + eth::Assembly const& assembly() { return m_context.assembly(); } + eth::LinkerObject assembledObject() { return m_context.assembledObject(); } + eth::LinkerObject runtimeObject() { return m_context.assembledRuntimeObject(m_runtimeSub); } /// @arg _sourceCodes is the map of input files to source code strings /// @arg _inJsonFromat shows whether the out should be in Json format Json::Value streamAssembly(std::ostream& _stream, StringMap const& _sourceCodes = StringMap(), bool _inJsonFormat = false) const @@ -69,8 +72,10 @@ public: private: /// Registers the non-function objects inside the contract with the context. - void initializeContext(ContractDefinition const& _contract, - std::map<ContractDefinition const*, bytes const*> const& _contracts); + void initializeContext( + ContractDefinition const& _contract, + std::map<ContractDefinition const*, eth::Assembly const*> const& _compiledContracts + ); /// Adds the code that is run at creation time. Should be run after exchanging the run-time context /// with a new and initialized context. Adds the constructor code. void packIntoContractCreator(ContractDefinition const& _contract, CompilerContext const& _runtimeContext); |