diff options
author | chriseth <chris@ethereum.org> | 2017-09-21 22:56:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-21 22:56:16 +0800 |
commit | bdeb9e52a2211510644fb53df93fb98258b40a65 (patch) | |
tree | d8fb917e7dc27b937cb4505029bbc3c8c1bc1a67 /libsolidity/codegen/Compiler.h | |
parent | d7661dd97460250b4e1127b9e7ea91e116143780 (diff) | |
parent | a14fc5ffa1f03d5aa312396a39633d720b04c90a (diff) | |
download | dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.gz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.bz2 dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.lz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.xz dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.tar.zst dexon-solidity-bdeb9e52a2211510644fb53df93fb98258b40a65.zip |
Merge pull request #2947 from ethereum/develop
Merge develop into release for 0.4.17.
Diffstat (limited to 'libsolidity/codegen/Compiler.h')
-rw-r--r-- | libsolidity/codegen/Compiler.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libsolidity/codegen/Compiler.h b/libsolidity/codegen/Compiler.h index 8c63ea9c..06654486 100644 --- a/libsolidity/codegen/Compiler.h +++ b/libsolidity/codegen/Compiler.h @@ -40,6 +40,8 @@ public: m_context(&m_runtimeContext) { } + /// Compiles a contract. + /// @arg _metadata contains the to be injected metadata CBOR void compileContract( ContractDefinition const& _contract, std::map<ContractDefinition const*, eth::Assembly const*> const& _contracts, @@ -51,14 +53,21 @@ public: ContractDefinition const& _contract, std::map<ContractDefinition const*, eth::Assembly const*> const& _contracts ); + /// @returns Entire assembly. eth::Assembly const& assembly() const { return m_context.assembly(); } + /// @returns The entire assembled object (with constructor). eth::LinkerObject assembledObject() const { return m_context.assembledObject(); } + /// @returns Only the runtime object (without constructor). eth::LinkerObject runtimeObject() const { 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 + std::string assemblyString(StringMap const& _sourceCodes = StringMap()) const { - return m_context.streamAssembly(_stream, _sourceCodes, _inJsonFormat); + return m_context.assemblyString(_sourceCodes); + } + /// @arg _sourceCodes is the map of input files to source code strings + Json::Value assemblyJSON(StringMap const& _sourceCodes = StringMap()) const + { + return m_context.assemblyJSON(_sourceCodes); } /// @returns Assembly items of the normal compiler context eth::AssemblyItems const& assemblyItems() const { return m_context.assembly().items(); } |