Skip to content

Commit

Permalink
Fix order of evaluation of assignment statements
Browse files Browse the repository at this point in the history
See #111
  • Loading branch information
colesbury committed Apr 28, 2023
1 parent 570409c commit 3162ce0
Show file tree
Hide file tree
Showing 17 changed files with 3,721 additions and 3,670 deletions.
218 changes: 110 additions & 108 deletions Include/opcode.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Lib/dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,12 @@ def get_repr(bytecode, *imm):
argrepr = f"{argreprs[0]}.{argreprs[1]}"
elif bytecode.name == 'STORE_ATTR':
argrepr = f"{argreprs[0]}.{argreprs[1]}=acc"
elif bytecode.name == 'STORE_ATTR_REG':
argrepr = f"acc.{argreprs[1]}={argreprs[0]}"
elif bytecode.name == 'STORE_SUBSCR':
argrepr = f"{argreprs[0]}[{argreprs[1]}]=acc"
elif bytecode.name == 'STORE_SUBSCR_REG':
argrepr = f"{argreprs[1]}[acc]={argreprs[0]}"
elif bytecode.name == 'BINARY_SUBSCR':
argrepr = f"{argreprs[0]}[acc]"
elif bytecode.name == 'MOVE' or bytecode.name == 'COPY':
Expand Down
2 changes: 1 addition & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (9001).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (9002).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

_PYCACHE = '__pycache__'
Expand Down
Loading

0 comments on commit 3162ce0

Please sign in to comment.