diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-02-28 00:41:22 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-03-02 21:28:08 +0800 |
commit | e9238e15b4058bf9b84c3c9c59720f255843de75 (patch) | |
tree | a3dab94130e93a6223f86f31f623b6089b5e07d8 /CompilerContext.h | |
parent | 32e210eccad6ea951feaa3441a6aefb9938f8a90 (diff) | |
download | dexon-solidity-e9238e15b4058bf9b84c3c9c59720f255843de75.tar.gz dexon-solidity-e9238e15b4058bf9b84c3c9c59720f255843de75.tar.zst dexon-solidity-e9238e15b4058bf9b84c3c9c59720f255843de75.zip |
Implemented passing arguments to the base constructor.
Diffstat (limited to 'CompilerContext.h')
-rw-r--r-- | CompilerContext.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CompilerContext.h b/CompilerContext.h index 94d6443e..301ef146 100644 --- a/CompilerContext.h +++ b/CompilerContext.h @@ -43,11 +43,13 @@ public: void addMagicGlobal(MagicVariableDeclaration const& _declaration); void addStateVariable(VariableDeclaration const& _declaration); void addVariable(VariableDeclaration const& _declaration, unsigned _offsetToCurrent = 0); + void removeVariable(VariableDeclaration const& _declaration); void addAndInitializeVariable(VariableDeclaration const& _declaration); void setCompiledContracts(std::map<ContractDefinition const*, bytes const*> const& _contracts) { m_compiledContracts = _contracts; } bytes const& getCompiledContract(ContractDefinition const& _contract) const; + void setStackOffset(int _offset) { m_asm.setDeposit(_offset); } void adjustStackOffset(int _adjustment) { m_asm.adjustDeposit(_adjustment); } unsigned getStackHeight() const { solAssert(m_asm.deposit() >= 0, ""); return unsigned(m_asm.deposit()); } @@ -62,6 +64,8 @@ public: /// @returns the entry label of function with the given name from the most derived class just /// above _base in the current inheritance hierarchy. eth::AssemblyItem getSuperFunctionEntryLabel(std::string const& _name, ContractDefinition const& _base); + FunctionDefinition const* getNextConstructor(ContractDefinition const& _contract) const; + /// @returns the set of functions for which we still need to generate code std::set<Declaration const*> getFunctionsWithoutCode(); /// Resets function specific members, inserts the function entry label and marks the function @@ -126,9 +130,11 @@ public: LocationSetter(CompilerContext& _compilerContext, ASTNode const* _node): ScopeGuard(std::bind(&CompilerContext::popVisitedNodes, _compilerContext)) { _compilerContext.pushVisitedNodes(_node); } }; - eth::Assembly m_asm; + private: + std::vector<ContractDefinition const*>::const_iterator getSuperContract(const ContractDefinition &_contract) const; + eth::Assembly m_asm; /// Magic global variables like msg, tx or this, distinguished by type. std::set<Declaration const*> m_magicGlobals; /// Other already compiled contracts to be used in contract creation calls. |