diff options
author | Mark Shannon <mark@hotpy.org> | 2020-01-14 10:12:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 10:12:45 (GMT) |
commit | 9af0e47b1705457bb6b327c197f2ec5737a1d8f6 (patch) | |
tree | 97378eee78d793d16bd19038d88371d776e720c3 /Lib/importlib | |
parent | 62e3973395fb9fab2eb8f651bcd0fea4e695e1cf (diff) | |
download | cpython-9af0e47b1705457bb6b327c197f2ec5737a1d8f6.zip cpython-9af0e47b1705457bb6b327c197f2ec5737a1d8f6.tar.gz cpython-9af0e47b1705457bb6b327c197f2ec5737a1d8f6.tar.bz2 |
bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (GH-17754)
Break up COMPARE_OP into four logically distinct opcodes:
* COMPARE_OP for rich comparisons
* IS_OP for 'is' and 'is not' tests
* CONTAINS_OP for 'in' and 'is not' tests
* JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index d62c6cb..b86612b 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -274,6 +274,7 @@ _code_type = type(_write_atomic.__code__) # Python 3.9a0 3420 (add LOAD_ASSERTION_ERROR #34880) # Python 3.9a0 3421 (simplified bytecode for with blocks #32949) # Python 3.9a0 3422 (remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY, POP_FINALLY bytecodes #33387) +# Python 3.9a2 3423 (add IS_OP, CONTAINS_OP and JUMP_IF_NOT_EXC_MATCH bytecodes #39156) # # MAGIC must change whenever the bytecode emitted by the compiler may no # longer be understood by older implementations of the eval loop (usually @@ -282,7 +283,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 = (3422).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3423).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' |