aboutsummaryrefslogtreecommitdiffstats
path: root/Compiler.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-19 17:24:22 +0800
committerChristian <c@ethdev.com>2014-11-19 20:19:43 +0800
commit3ba9649ddea6559bc0dc266dab51136e467e49b8 (patch)
treee23bfc7ce9ff84ef46708efbd56dff3280345951 /Compiler.h
parent3e57086efe95a79373259c2f64f65aec3a0c72c8 (diff)
downloaddexon-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.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/Compiler.h b/Compiler.h
index d931f535..3887d3b5 100644
--- a/Compiler.h
+++ b/Compiler.h
@@ -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;