aboutsummaryrefslogtreecommitdiffstats
path: root/libevmasm/Assembly.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-10-14 00:59:04 +0800
committerchriseth <chris@ethereum.org>2017-10-14 01:00:56 +0800
commit7c94e5462abb327016520b896178de41bea473c2 (patch)
treea3c44ae1b221c6bf1a288e43b4956d511cfe874a /libevmasm/Assembly.cpp
parentd9bb4b44a4409db607ee74739f9a5ce1bd557067 (diff)
downloaddexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar.gz
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar.bz2
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar.lz
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar.xz
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.tar.zst
dexon-solidity-7c94e5462abb327016520b896178de41bea473c2.zip
Assume peephole optimizer was successful if number of pops increased.
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r--libevmasm/Assembly.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp
index df691e7d..37c4fb22 100644
--- a/libevmasm/Assembly.cpp
+++ b/libevmasm/Assembly.cpp
@@ -407,7 +407,7 @@ map<u256, u256> Assembly::optimiseInternal(
if (_settings.runPeephole)
{
PeepholeOptimiser peepOpt(m_items);
- while (peepOpt.optimise())
+ while (peepOpt.optimise() && count < 0xffffff)
count++;
}