diff options
author | chriseth <chris@ethereum.org> | 2019-01-10 23:44:31 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2019-01-18 03:36:48 +0800 |
commit | e6fee257e68e7b145a47eee8c5937db7a7a99849 (patch) | |
tree | d4dce225357536d378d69f1ac87c4c5132d15613 /libsolidity/codegen/CompilerContext.h | |
parent | 2fcfb216b5dcb5cec2d70d2ee7647df47c8166ca (diff) | |
download | dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar.gz dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar.bz2 dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar.lz dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar.xz dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.tar.zst dexon-solidity-e6fee257e68e7b145a47eee8c5937db7a7a99849.zip |
Code generation for access to contract code.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r-- | libsolidity/codegen/CompilerContext.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index dedcd95f..43e1ea77 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -41,6 +41,7 @@ namespace dev { namespace solidity { +class Compiler; /** * Context to be shared by all units that compile the same contract. @@ -74,8 +75,9 @@ public: /// Returns the number of currently allocated local variables. unsigned numberOfLocalVariables() const; - void setCompiledContracts(std::map<ContractDefinition const*, eth::Assembly const*> const& _contracts) { m_compiledContracts = _contracts; } + void setOtherCompilers(std::map<ContractDefinition const*, std::shared_ptr<Compiler const>> const& _otherCompilers) { m_otherCompilers = _otherCompilers; } eth::Assembly const& compiledContract(ContractDefinition const& _contract) const; + eth::Assembly const& compiledContractRuntime(ContractDefinition const& _contract) const; void setStackOffset(int _offset) { m_asm->setDeposit(_offset); } void adjustStackOffset(int _adjustment) { m_asm->adjustDeposit(_adjustment); } @@ -307,7 +309,7 @@ private: /// Activated experimental features. std::set<ExperimentalFeature> m_experimentalFeatures; /// Other already compiled contracts to be used in contract creation calls. - std::map<ContractDefinition const*, eth::Assembly const*> m_compiledContracts; + std::map<ContractDefinition const*, std::shared_ptr<Compiler const>> m_otherCompilers; /// Storage offsets of state variables std::map<Declaration const*, std::pair<u256, unsigned>> m_stateVariables; /// Offsets of local variables on the stack (relative to stack base). |