diff options
author | chriseth <c@ethdev.com> | 2015-06-24 23:25:36 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-25 01:34:43 +0800 |
commit | e5ae5955b97009233fc46ac04070073750240698 (patch) | |
tree | 9781a740e3dc3f63110dece7127adcbdd3019380 /Compiler.h | |
parent | 1add48a652ea695032d8c664fad3ea84afbfb9ea (diff) | |
download | dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar.gz dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar.bz2 dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar.lz dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar.xz dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.tar.zst dexon-solidity-e5ae5955b97009233fc46ac04070073750240698.zip |
Initialisation of memory types.
Diffstat (limited to 'Compiler.h')
-rw-r--r-- | Compiler.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -84,6 +84,13 @@ private: void registerStateVariables(ContractDefinition const& _contract); void initializeStateVariables(ContractDefinition const& _contract); + /// Initialises all memory arrays in the local variables to point to an empty location. + void initialiseMemoryArrays(std::vector<VariableDeclaration const*> _variables); + /// Pushes the initialised value of the given type to the stack. If the type is a memory + /// reference type, allocates memory and pushes the memory pointer. + /// Not to be used for storage references. + void initialiseInMemory(Type const& _type); + virtual bool visit(VariableDeclaration const& _variableDeclaration) override; virtual bool visit(FunctionDefinition const& _function) override; virtual bool visit(IfStatement const& _ifStatement) override; @@ -100,6 +107,7 @@ private: /// body itself if the last modifier was reached. void appendModifierOrFunctionCode(); + void appendStackVariableInitialisation(VariableDeclaration const& _variable); void compileExpression(Expression const& _expression, TypePointer const& _targetType = TypePointer()); bool const m_optimize; |