From 0b6a26f8544f632b557681e26ebc2b395bf03b20 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 8 Aug 2018 22:54:33 +0100 Subject: 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. --- libevmasm/ConstantOptimiser.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'libevmasm/ConstantOptimiser.h') 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(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 -- cgit v1.2.3