diff options
author | Ken Jin <kenjin@python.org> | 2024-06-20 15:55:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 15:55:20 (GMT) |
commit | 7c7aa5a99cce256ff726654038092a333a1f0531 (patch) | |
tree | 5965d6c59fcec54f7f9511c7bb71ff22ac81488e /Python/optimizer_cases.c.h | |
parent | b8fd80f91b980598cb378dba224cdb595b132fb4 (diff) | |
download | cpython-7c7aa5a99cce256ff726654038092a333a1f0531.zip cpython-7c7aa5a99cce256ff726654038092a333a1f0531.tar.gz cpython-7c7aa5a99cce256ff726654038092a333a1f0531.tar.bz2 |
[3.13] gh-119258: Backport optimizer frame fixes in GH-119365 (GH-120699)
(cherry picked from commit 55402d3)
Diffstat (limited to 'Python/optimizer_cases.c.h')
-rw-r--r-- | Python/optimizer_cases.c.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index 621a48f..fb7f1ed 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -1696,17 +1696,11 @@ args--; argcount++; } - _Py_UopsSymbol **localsplus_start = ctx->n_consumed; - int n_locals_already_filled = 0; - // Can determine statically, so we interleave the new locals - // and make the current stack the new locals. - // This also sets up for true call inlining. if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) { - localsplus_start = args; - n_locals_already_filled = argcount; + OUT_OF_SPACE_IF_NULL(new_frame = frame_new(ctx, co, 0, args, argcount)); + } else { + OUT_OF_SPACE_IF_NULL(new_frame = frame_new(ctx, co, 0, NULL, 0)); } - OUT_OF_SPACE_IF_NULL(new_frame = - frame_new(ctx, co, localsplus_start, n_locals_already_filled, 0)); stack_pointer[-2 - oparg] = (_Py_UopsSymbol *)new_frame; stack_pointer += -1 - oparg; break; |