diff options
author | chriseth <c@ethdev.com> | 2017-03-03 23:17:21 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-03-03 23:51:37 +0800 |
commit | ddc4918f3602744544b42da7507fc473e522b61c (patch) | |
tree | aff58fac5cb7a9c51c5d7419e91f3e66400682b5 /libevmasm/ConstantOptimiser.h | |
parent | 05dac999223220fdb54c0d28781b3ef1d621061d (diff) | |
download | dexon-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.h | 2 |
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; }; |