aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/ConstantOptimiser.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-03-03 23:17:21 +0800
committerchriseth <c@ethdev.com>2017-03-03 23:51:37 +0800
commitddc4918f3602744544b42da7507fc473e522b61c (patch)
treeaff58fac5cb7a9c51c5d7419e91f3e66400682b5 /libevmasm/ConstantOptimiser.h
parent05dac999223220fdb54c0d28781b3ef1d621061d (diff)
downloaddexon-solidity-ddc4918f3602744544b42da7507fc473e522b61c.tar.gz
dexon-solidity-ddc4918f3602744544b42da7507fc473e522b61c.tar.zst
dexon-solidity-ddc4918f3602744544b42da7507fc473e522b61c.zip
Add upper bound for computing constants.
Diffstat (limited to 'libevmasm/ConstantOptimiser.h')
-rw-r--r--libevmasm/ConstantOptimiser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libevmasm/ConstantOptimiser.h b/libevmasm/ConstantOptimiser.h
index dfa2fbf8..4f12c49f 100644
--- a/libevmasm/ConstantOptimiser.h
+++ b/libevmasm/ConstantOptimiser.h
@@ -143,6 +143,8 @@ protected:
AssemblyItems findRepresentation(u256 const& _value);
bigint gasNeeded(AssemblyItems const& _routine);
+ /// Counter for the complexity of optimization, will stop when it reaches zero.
+ size_t m_maxSteps = 10000;
AssemblyItems m_routine;
};