diff options
Diffstat (limited to 'libevmasm/Assembly.cpp')
-rw-r--r-- | libevmasm/Assembly.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index df691e7d..5fab24e1 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -408,7 +408,10 @@ map<u256, u256> Assembly::optimiseInternal( { PeepholeOptimiser peepOpt(m_items); while (peepOpt.optimise()) + { count++; + assertThrow(count < 64000, OptimizerException, "Peephole optimizer seems to be stuck."); + } } // This only modifies PushTags, we have to run again to actually remove code. |