diff options
author | Guido van Rossum <guido@python.org> | 2023-07-17 18:02:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 18:02:58 (GMT) |
commit | 2b94a05a0e45e4aae030a28b716a038ef529f8ef (patch) | |
tree | 2af704cc17d5fa00ff0face3a52ed6a2167e31a0 /Python/ceval_macros.h | |
parent | b2b261ab2a2d4ff000c6248dbc52247c78cfa5ab (diff) | |
download | cpython-2b94a05a0e45e4aae030a28b716a038ef529f8ef.zip cpython-2b94a05a0e45e4aae030a28b716a038ef529f8ef.tar.gz cpython-2b94a05a0e45e4aae030a28b716a038ef529f8ef.tar.bz2 |
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`
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r-- | Python/ceval_macros.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h index 72800aa..874bd45 100644 --- a/Python/ceval_macros.h +++ b/Python/ceval_macros.h @@ -349,3 +349,5 @@ static const convertion_func_ptr CONVERSION_FUNCTIONS[4] = { [FVC_REPR] = PyObject_Repr, [FVC_ASCII] = PyObject_ASCII }; + +#define ASSERT_KWNAMES_IS_NULL() assert(kwnames == NULL) |