diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-08-09 05:54:33 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-08-14 23:45:43 +0800 |
commit | 0b6a26f8544f632b557681e26ebc2b395bf03b20 (patch) | |
tree | 6953422720b9e5d943c8307874d5626f7af4e203 /libevmasm/ConstantOptimiser.h | |
parent | 3f42118d1987ce99b6088d7076b32413373dd09c (diff) | |
download | dexon-solidity-0b6a26f8544f632b557681e26ebc2b395bf03b20.tar.gz dexon-solidity-0b6a26f8544f632b557681e26ebc2b395bf03b20.tar.zst dexon-solidity-0b6a26f8544f632b557681e26ebc2b395bf03b20.zip |
Calculate the dataGas correctly in the constant optimiser
This may cause a wrong decision about cost (and as a result choosing the least efficient code),
but will not cause any miscompilation or invalid output.
Diffstat (limited to 'libevmasm/ConstantOptimiser.h')
-rw-r--r-- | libevmasm/ConstantOptimiser.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h index f0deb387..2c753fa8 100644 --- a/libevmasm/ConstantOptimiser.h +++ b/libevmasm/ConstantOptimiser.h @@ -75,8 +75,6 @@ public: virtual AssemblyItems execute(Assembly& _assembly) const = 0; protected: - size_t dataSize() const { return std::max<size_t>(1, dev::bytesRequired(m_value)); } - /// @returns the run gas for the given items ignoring special gas costs static bigint simpleRunGas(AssemblyItems const& _items); /// @returns the gas needed to store the given data literally |