Skip to content

Commit

Permalink
count iterations, not changes for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Mar 19, 2024
1 parent 2a7cb0b commit 5ec9e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vyper/venom/passes/base_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ def run_pass(cls, *args, **kwargs):
t = cls()
count = 0

while True:
for i in range(1000):
changes_count = t._run_pass(*args, **kwargs) or 0
count += changes_count
if changes_count == 0:
break
if count > 1000:
raise Exception("Too many iterations in IR pass!", t.__class__)
else:
raise Exception("Too many iterations in IR pass!", t.__class__)

return count

Expand Down

0 comments on commit 5ec9e60

Please sign in to comment.