Skip to content

Commit

Permalink
remove a heuristic
Browse files Browse the repository at this point in the history
it no longer changes bytecode
  • Loading branch information
charles-cooper committed Sep 28, 2024
1 parent f843eca commit 1bf0173
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions vyper/venom/venom_to_assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,6 @@ def _emit_input_operands(
# been scheduled to be killed. now it's just a matter of emitting
# SWAPs, DUPs and PUSHes until we match the `ops` argument

# dumb heuristic: if the top of stack is not wanted here, swap
# it with something that is wanted
if ops and stack.height > 0 and stack.peek(0) not in ops:
for op in ops:
if isinstance(op, IRVariable) and op not in next_liveness:
self.swap_op(assembly, stack, op)
break

# to validate store expansion invariant -
# each op is emitted at most once.
seen = set()
Expand Down

0 comments on commit 1bf0173

Please sign in to comment.