mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
[3.13] gh-119258: Backport optimizer frame fixes in GH-119365 (GH-120699)
(cherry picked from commit 55402d3
)
This commit is contained in:
parent
b8fd80f91b
commit
7c7aa5a99c
5 changed files with 21 additions and 35 deletions
|
@ -616,17 +616,12 @@ dummy_func(void) {
|
|||
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));
|
||||
}
|
||||
|
||||
op(_PY_FRAME_GENERAL, (callable, self_or_null, args[oparg] -- new_frame: _Py_UOpsAbstractFrame *)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue