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 /GasEstimator.h | |
parent | 802d52f6a2ee64a32dd65a9ad76bdde507ef9127 (diff) | |
download | dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.gz dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.bz2 dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.lz dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.xz dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.tar.zst dexon-solidity-6332bff81d806b60131dbf87eddba75c88e9d42a.zip |
Gas estimation for internal functions.
Diffstat (limited to 'GasEstimator.h')
-rw-r--r-- | GasEstimator.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/GasEstimator.h b/GasEstimator.h index 32e95fac..4020d60b 100644 --- a/GasEstimator.h +++ b/GasEstimator.h @@ -65,6 +65,15 @@ public: std::string const& _signature = "" ); + /// @returns the estimated gas consumption by the given function which starts at the given + /// offset into the list of assembly items. + /// @note this does not work correctly for recursive functions. + static GasConsumption functionalEstimation( + eth::AssemblyItems const& _items, + size_t const& _offset, + FunctionDefinition const& _function + ); + private: /// @returns the set of AST nodes which are the finest nodes at their location. static std::set<ASTNode const*> finestNodesAtLocation(std::vector<ASTNode const*> const& _roots); |