Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Polish remove_global_guarded_variable (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x45f authored Jul 7, 2023
1 parent 7953427 commit a28875e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sot/opcode_translator/executor/opcode_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1766,14 +1766,14 @@ def FOR_ITER(self, instr):
if not isinstance(
iterator, (SequenceIterVariable, DictIterVariable)
):
self._graph.remove_global_guarded_variable(iterator)
raise BreakGraphError()
backup_iter_idx = iterator.idx
self._inline_call_for_loop(iterator, instr)
self._lasti = self.indexof(instr.jump_to)
except BreakGraphError as e:
if backup_iter_idx:
iterator.idx = backup_iter_idx
self._graph.remove_global_guarded_variable(iterator)
self._break_graph_in_for_loop(iterator, instr)
return Stop()

Expand Down

0 comments on commit a28875e

Please sign in to comment.