Skip to content

Commit

Permalink
fix typo restroe
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Nov 15, 2023
1 parent 804c2c8 commit c8fac07
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ def load(self, var, allow_push_null=True):

origin_instrs = get_instructions(self.pycode_gen._origin_code)

restroe_instrs = origin_instrs[:instr_idx]
restore_instrs = origin_instrs[:instr_idx]
restore_instr_names = [
instr.opname for instr in restroe_instrs[:instr_idx]
instr.opname for instr in restore_instrs[:instr_idx]
]
# NOTE(SigureMo): Trailing KW_NAMES + PRECALL is no need to restore in Python 3.11+
if restore_instr_names[-2:] == ["KW_NAMES", "PRECALL"]:
restroe_instrs = restroe_instrs[:-2]
restore_instrs = restore_instrs[:-2]

for instr in restroe_instrs:
for instr in restore_instrs:
if (
instr.opname == 'LOAD_FAST'
and instr.argval in self.pycode_gen._frame.f_locals.keys()
Expand Down

0 comments on commit c8fac07

Please sign in to comment.