]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106581: Add 10 new opcodes by allowing `assert(kwnames == NULL)` (#106707)
authorGuido van Rossum <guido@python.org>
Mon, 17 Jul 2023 18:02:58 +0000 (11:02 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Jul 2023 18:02:58 +0000 (11:02 -0700)
commit2b94a05a0e45e4aae030a28b716a038ef529f8ef
tree2af704cc17d5fa00ff0face3a52ed6a2167e31a0
parentb2b261ab2a2d4ff000c6248dbc52247c78cfa5ab
gh-106581: Add 10 new opcodes by allowing `assert(kwnames == NULL)` (#106707)

By turning `assert(kwnames == NULL)` into a macro that is not in the "forbidden" list, many instructions that formerly were skipped because they contained such an assert (but no other mention of `kwnames`) are now supported in Tier 2. This covers 10 instructions in total (all specializations of `CALL` that invoke some C code):
- `CALL_NO_KW_TYPE_1`
- `CALL_NO_KW_STR_1`
- `CALL_NO_KW_TUPLE_1`
- `CALL_NO_KW_BUILTIN_O`
- `CALL_NO_KW_BUILTIN_FAST`
- `CALL_NO_KW_LEN`
- `CALL_NO_KW_ISINSTANCE`
- `CALL_NO_KW_METHOD_DESCRIPTOR_O`
- `CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS`
- `CALL_NO_KW_METHOD_DESCRIPTOR_FAST`
Include/internal/pycore_opcode_metadata.h
Python/bytecodes.c
Python/ceval.c
Python/ceval_macros.h
Python/executor_cases.c.h
Python/generated_cases.c.h
Tools/cases_generator/generate_cases.py