Skip to content

Commit

Permalink
variable rename
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Jan 17, 2025
1 parent e61495d commit 54d7ea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vyper/venom/passes/algebraic_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def _update_operands(self, inst: IRInstruction, replace_dict: dict[IROperand, IR
new_operands = [replace_dict[op] if op in replace_dict else op for op in old_operands]
self._update(inst, inst.opcode, new_operands)

def _update(self, inst: IRInstruction, opcode: str, args: list[IROperand]):
def _update(self, inst: IRInstruction, opcode: str, new_operands: list[IROperand]):
assert opcode != "phi"
assert all(isinstance(op, IROperand) for op in args)
# sanity
assert all(isinstance(op, IROperand) for op in new_operands)

old_operands = inst.operands
new_operands = list(args)

for op in old_operands:
if not isinstance(op, IRVariable):
Expand Down

0 comments on commit 54d7ea7

Please sign in to comment.