mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Throw on too many peephole optimizer iterations.
This commit is contained in:
parent
7c94e5462a
commit
f5e91e4a94
@ -407,8 +407,11 @@ map<u256, u256> Assembly::optimiseInternal(
|
||||
if (_settings.runPeephole)
|
||||
{
|
||||
PeepholeOptimiser peepOpt(m_items);
|
||||
while (peepOpt.optimise() && count < 0xffffff)
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user