diff options
author | chriseth <c@ethdev.com> | 2017-01-17 17:47:57 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-24 19:06:40 +0800 |
commit | d0e8d340a53395de4c83e4e1d6ccf4c8eab5889a (patch) | |
tree | f6f6e7f2e4190e2ca959b6308bbc32d58161cbc3 /libsolidity/codegen/CompilerContext.h | |
parent | dea59bfbdc610b65018b613dc20322d98e9aa2b6 (diff) | |
download | dexon-solidity-d0e8d340a53395de4c83e4e1d6ccf4c8eab5889a.tar.gz dexon-solidity-d0e8d340a53395de4c83e4e1d6ccf4c8eab5889a.tar.zst dexon-solidity-d0e8d340a53395de4c83e4e1d6ccf4c8eab5889a.zip |
Low level named functions for CompilerContext.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.h')
-rw-r--r-- | libsolidity/codegen/CompilerContext.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/codegen/CompilerContext.h b/libsolidity/codegen/CompilerContext.h index 80671528..34befc13 100644 --- a/libsolidity/codegen/CompilerContext.h +++ b/libsolidity/codegen/CompilerContext.h @@ -90,6 +90,12 @@ public: /// as "having code". void startFunction(Declaration const& _function); + /// Returns the label of the low level function with the given name or nullptr if it + /// does not exist. The lifetime of the returned pointer is short. + eth::AssemblyItem const* lowLevelFunctionEntryPoint(std::string const& _name) const; + /// Inserts a low level function entry point into the list of low level functions. + void addLowLevelFunction(std::string const& _name, eth::AssemblyItem const& _label); + ModifierDefinition const& functionModifier(std::string const& _name) const; /// Returns the distance of the given local variable from the bottom of the stack (of the current function). unsigned baseStackOffsetOfVariable(Declaration const& _declaration) const; @@ -248,6 +254,8 @@ private: CompilerContext *m_runtimeContext; /// The index of the runtime subroutine. size_t m_runtimeSub = -1; + /// An index of low-level function labels by name. + std::map<std::string, eth::AssemblyItem> m_lowLevelFunctions; }; } |