diff options
author | chriseth <chris@ethereum.org> | 2018-03-01 19:06:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-03-05 18:36:33 +0800 |
commit | 6ec4517929e8c0eca022f4771ba217db5d80beed (patch) | |
tree | ece2e275ee9bb190d33e05cef5cc549b21abf8e3 /libevmasm/ConstantOptimiser.h | |
parent | 5a54cd5c708227ad6982b06de7b799ece5065917 (diff) | |
download | dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.gz dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.bz2 dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.lz dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.xz dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.tar.zst dexon-solidity-6ec4517929e8c0eca022f4771ba217db5d80beed.zip |
Use EVM version in gas meter and optimizer.
Diffstat (limited to 'libevmasm/ConstantOptimiser.h')
-rw-r--r-- | libevmasm/ConstantOptimiser.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h index c450b0b4..9b60b26b 100644 --- a/libevmasm/ConstantOptimiser.h +++ b/libevmasm/ConstantOptimiser.h @@ -23,6 +23,8 @@ #include <libevmasm/Exceptions.h> +#include <libsolidity/interface/EVMVersion.h> + #include <libdevcore/Assertions.h> #include <libdevcore/CommonData.h> #include <libdevcore/CommonIO.h> @@ -50,6 +52,7 @@ public: static unsigned optimiseConstants( bool _isCreation, size_t _runs, + solidity::EVMVersion _evmVersion, Assembly& _assembly, AssemblyItems& _items ); @@ -59,6 +62,7 @@ public: bool isCreation; ///< Whether this is called during contract creation or runtime. size_t runs; ///< Estimated number of calls per opcode oven the lifetime of the contract. size_t multiplicity; ///< Number of times the constant appears in the code. + solidity::EVMVersion evmVersion; ///< Version of the EVM }; explicit ConstantOptimisationMethod(Params const& _params, u256 const& _value): |