Permalink
Please
sign in to comment.
Browse files
bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (G…
…H-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.
- Loading branch information
Showing
with
4,901 additions
and 4,847 deletions.
- +21 −0 Doc/library/dis.rst
- +3 −5 Include/opcode.h
- +2 −1 Lib/importlib/_bootstrap_external.py
- +5 −2 Lib/opcode.py
- +70 −71 Lib/test/test_dis.py
- +6 −6 Lib/test/test_peepholer.py
- +3 −3 Lib/test/test_positional_only_arg.py
- +9 −0 Misc/NEWS.d/next/Core and Builtins/2019-12-30-10-53-59.bpo-39156.veT-CB.rst
- +2 −1 PC/launcher.c
- +78 −59 Python/ceval.c
- +44 −27 Python/compile.c
- +1,459 −1,463 Python/importlib.h
- +2,278 −2,282 Python/importlib_external.h
- +914 −917 Python/importlib_zipimport.h
- +3 −3 Python/opcode_targets.h
- +4 −2 Python/peephole.c
- +0 −5 Tools/scripts/generate_opcode_h.py
| @@ -0,0 +1,9 @@ | ||
| Split the COMPARE_OP bytecode instruction into four distinct instructions. | ||
|
|
||
| * 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. | ||
|
|
||
| This improves the clarity of the interpreter and should provide a modest | ||
| speedup. |
Oops, something went wrong.
0 comments on commit
9af0e47