diff options
author | Christian <c@ethdev.com> | 2014-11-19 17:24:22 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-11-19 20:19:43 +0800 |
commit | 3ba9649ddea6559bc0dc266dab51136e467e49b8 (patch) | |
tree | e23bfc7ce9ff84ef46708efbd56dff3280345951 /Compiler.h | |
parent | 3e57086efe95a79373259c2f64f65aec3a0c72c8 (diff) | |
download | dexon-solidity-3ba9649ddea6559bc0dc266dab51136e467e49b8.tar.gz dexon-solidity-3ba9649ddea6559bc0dc266dab51136e467e49b8.tar.zst dexon-solidity-3ba9649ddea6559bc0dc266dab51136e467e49b8.zip |
Special handling for constructor.
Diffstat (limited to 'Compiler.h')
-rw-r--r-- | Compiler.h | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -40,12 +40,17 @@ public: static bytes compile(ContractDefinition& _contract, bool _optimize); private: - /// Creates a new compiler context / assembly and packs the current code into the data part. - void packIntoContractCreator(); - void appendFunctionSelector(std::vector<ASTPointer<FunctionDefinition> > const& _functions); - void appendCalldataUnpacker(FunctionDefinition const& _function); + /// 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 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. + unsigned appendCalldataUnpacker(FunctionDefinition const& _function, bool _fromMemory = false); void appendReturnValuePacker(FunctionDefinition const& _function); + void registerStateVariables(ContractDefinition const& _contract); + virtual bool visit(FunctionDefinition& _function) override; virtual bool visit(IfStatement& _ifStatement) override; virtual bool visit(WhileStatement& _whileStatement) override; |