diff options
author | Guido van Rossum <guido@python.org> | 2023-07-17 11:02:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 11:02:58 -0700 |
commit | 2b94a05a0e45e4aae030a28b716a038ef529f8ef (patch) | |
tree | 2af704cc17d5fa00ff0face3a52ed6a2167e31a0 /Python/ceval.c | |
parent | b2b261ab2a2d4ff000c6248dbc52247c78cfa5ab (diff) | |
download | cpython-2b94a05a0e45e4aae030a28b716a038ef529f8ef.tar.gz cpython-2b94a05a0e45e4aae030a28b716a038ef529f8ef.zip |
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.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index d6c72fa3ff3..f13ba9883d9 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2706,6 +2706,9 @@ void Py_LeaveRecursiveCall(void) ///////////////////// Experimental UOp Interpreter ///////////////////// +#undef ASSERT_KWNAMES_IS_NULL +#define ASSERT_KWNAMES_IS_NULL() (void)0 + #undef DEOPT_IF #define DEOPT_IF(COND, INSTNAME) \ if ((COND)) { \ @@ -2746,6 +2749,7 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject int opcode; uint64_t operand; int oparg; + for (;;) { opcode = self->trace[pc].opcode; operand = self->trace[pc].operand; |