diff options
author | Christian <c@ethdev.com> | 2014-12-12 23:49:26 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-15 20:05:18 +0800 |
commit | 2f64c56ef3a49f7551a708f63c4ed836efce7b73 (patch) | |
tree | 6dd2a10b9ef7b0a67206991416dd0a74639f66ea /Compiler.h | |
parent | c8586996059c3d2ae3c7025c2d4247073468ed73 (diff) | |
download | dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.gz dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.tar.zst dexon-solidity-2f64c56ef3a49f7551a708f63c4ed836efce7b73.zip |
Create contracts.
Diffstat (limited to 'Compiler.h')
-rw-r--r-- | Compiler.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -32,14 +32,16 @@ class Compiler: private ASTConstVisitor public: explicit Compiler(bool _optimize = false): m_optimize(_optimize), m_returnTag(m_context.newTag()) {} - void compileContract(ContractDefinition const& _contract, std::vector<MagicVariableDeclaration const*> const& _magicGlobals); + void compileContract(ContractDefinition const& _contract, std::vector<MagicVariableDeclaration const*> const& _magicGlobals, + std::map<ContractDefinition const*, bytes const*> const& _contracts); bytes getAssembledBytecode() { return m_context.getAssembledBytecode(m_optimize); } void streamAssembly(std::ostream& _stream) const { m_context.streamAssembly(_stream); } private: /// Creates a new compiler context / assembly, packs the current code into the data part and /// adds the constructor code. - void packIntoContractCreator(ContractDefinition const& _contract); + void packIntoContractCreator(ContractDefinition const& _contract, + std::map<ContractDefinition const*, bytes const*> const& _contracts); void appendFunctionSelector(ContractDefinition const& _contract); /// Creates code that unpacks the arguments for the given function, from memory if /// @a _fromMemory is true, otherwise from call data. @returns the size of the data in bytes. |