GH-90690: Remove PRECALL instruction (GH-92925)

This commit is contained in:
Mark Shannon 2022-05-19 11:05:26 +01:00 committed by GitHub
parent 41638967a0
commit e48ac9c100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 547 additions and 704 deletions

View file

@ -402,9 +402,11 @@ _code_type = type(_write_atomic.__code__)
# add JUMP_BACKWARD_NO_INTERRUPT, make JUMP_NO_INTERRUPT virtual)
# Python 3.11a7 3492 (make POP_JUMP_IF_NONE/NOT_NONE/TRUE/FALSE relative)
# Python 3.11a7 3493 (Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative)
# Python 3.11a7 3494 (New location info table)
# Python 3.12 will start with magic number 3500
# Python 3.11a7 3494 (New location info table)
# Python 3.12a1 3500 (Remove PRECALL opcode)
# Python 3.13 will start with 3550
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
@ -416,7 +418,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
MAGIC_NUMBER = (3494).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3500).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c