diff options
author | Christian <c@ethdev.com> | 2015-01-23 09:46:31 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-26 17:23:39 +0800 |
commit | fd5899d03806d82e228da12f8cbe151f079ea41f (patch) | |
tree | f839426ef2d921062ac8206ced3089acd318496a /CompilerContext.h | |
parent | 7ded95c776717cf96e96dffb7425c86b47ad8b0e (diff) | |
download | dexon-solidity-fd5899d03806d82e228da12f8cbe151f079ea41f.tar.gz dexon-solidity-fd5899d03806d82e228da12f8cbe151f079ea41f.tar.zst dexon-solidity-fd5899d03806d82e228da12f8cbe151f079ea41f.zip |
Modifier overrides and callgraph analysis.
Diffstat (limited to 'CompilerContext.h')
-rw-r--r-- | CompilerContext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CompilerContext.h b/CompilerContext.h index 39d8c6f6..d82dfe51 100644 --- a/CompilerContext.h +++ b/CompilerContext.h @@ -45,6 +45,8 @@ public: void addVariable(VariableDeclaration const& _declaration, unsigned _offsetToCurrent = 0); void addAndInitializeVariable(VariableDeclaration const& _declaration); void addFunction(FunctionDefinition const& _function); + /// Adds the given modifier to the list by name if the name is not present already. + void addModifier(ModifierDefinition const& _modifier); void setCompiledContracts(std::map<ContractDefinition const*, bytes const*> const& _contracts) { m_compiledContracts = _contracts; } bytes const& getCompiledContract(ContractDefinition const& _contract) const; @@ -59,6 +61,7 @@ public: eth::AssemblyItem getFunctionEntryLabel(FunctionDefinition const& _function) const; /// @returns the entry label of the given function and takes overrides into account. eth::AssemblyItem getVirtualFunctionEntryLabel(FunctionDefinition const& _function) const; + ModifierDefinition const& getFunctionModifier(std::string const& _name) const; /// Returns the distance of the given local variable from the bottom of the stack (of the current function). unsigned getBaseStackOffsetOfVariable(Declaration const& _declaration) const; /// If supplied by a value returned by @ref getBaseStackOffsetOfVariable(variable), returns @@ -118,6 +121,8 @@ private: std::map<Declaration const*, eth::AssemblyItem> m_functionEntryLabels; /// Labels pointing to the entry points of function overrides. std::map<std::string, eth::AssemblyItem> m_virtualFunctionEntryLabels; + /// Mapping to obtain function modifiers by name. Should be filled from derived to base. + std::map<std::string, ModifierDefinition const*> m_functionModifiers; }; } |