diff options
author | chriseth <c@ethdev.com> | 2015-05-26 17:27:59 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-05-26 17:27:59 +0800 |
commit | 6332bff81d806b60131dbf87eddba75c88e9d42a (patch) | |
tree | 5cfffa56aed003ee619e09dcf9d170e4c3ed2974 /CompilerStack.h | |
parent | 802d52f6a2ee64a32dd65a9ad76bdde507ef9127 (diff) | |
download | dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.gz dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.zst dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.zip |
Gas estimation for internal functions.
Diffstat (limited to 'CompilerStack.h')
-rw-r--r-- | CompilerStack.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CompilerStack.h b/CompilerStack.h index 0bc109a2..6be45aec 100644 --- a/CompilerStack.h +++ b/CompilerStack.h @@ -48,6 +48,7 @@ namespace solidity // forward declarations class Scanner; class ContractDefinition; +class FunctionDefinition; class SourceUnit; class Compiler; class GlobalContext; @@ -131,6 +132,13 @@ public: /// does not exist. ContractDefinition const& getContractDefinition(std::string const& _contractName) const; + /// @returns the offset of the entry point of the given function into the list of assembly items + /// or zero if it is not found or does not exist. + size_t getFunctionEntryPoint( + std::string const& _contractName, + FunctionDefinition const& _function + ) const; + /// Compile the given @a _sourceCode to bytecode. If a scanner is provided, it is used for /// scanning the source code - this is useful for printing exception information. static bytes staticCompile(std::string const& _sourceCode, bool _optimize = false); |