diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-02-14 11:54:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 11:54:13 (GMT) |
commit | 81e3aa835c32363f4547b6566edf1125386f1f6d (patch) | |
tree | 4a20320722549dca1c5d581772aa2a6152d8ca5b /Lib | |
parent | 3690688149dca11589af59b7704541336613199a (diff) | |
download | cpython-81e3aa835c32363f4547b6566edf1125386f1f6d.zip cpython-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.gz cpython-81e3aa835c32363f4547b6566edf1125386f1f6d.tar.bz2 |
gh-101799: implement PREP_RERAISE_STAR as an intrinsic function (#101800)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 3 | ||||
-rw-r--r-- | Lib/opcode.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 38d4a38..954401c 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -433,6 +433,7 @@ _code_type = type(_write_atomic.__code__) # Python 3.12a5 3517 (Change YIELD_VALUE oparg to exception block depth) # Python 3.12a5 3518 (Add RETURN_CONST instruction) # Python 3.12a5 3519 (Modify SEND instruction) +# Python 3.12a5 3520 (Remove PREP_RERAISE_STAR, add CALL_INTRINSIC_2) # Python 3.13 will start with 3550 @@ -445,7 +446,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 = (3519).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3520).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c diff --git a/Lib/opcode.py b/Lib/opcode.py index b69cd1b..809d24e 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -127,7 +127,6 @@ def_op('RETURN_VALUE', 83) def_op('SETUP_ANNOTATIONS', 85) -def_op('PREP_RERAISE_STAR', 88) def_op('POP_EXCEPT', 89) HAVE_ARGUMENT = 90 # real opcodes from here have an argument: @@ -224,6 +223,7 @@ def_op('CALL', 171) def_op('KW_NAMES', 172) hasconst.append(172) def_op('CALL_INTRINSIC_1', 173) +def_op('CALL_INTRINSIC_2', 174) hasarg.extend([op for op in opmap.values() if op >= HAVE_ARGUMENT]) |