mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
GH-118095: Handle RETURN_GENERATOR
in tier 2 (GH-118180)
This commit is contained in:
parent
10bb90ed49
commit
f180b31e76
16 changed files with 143 additions and 81 deletions
23
Python/optimizer_cases.c.h
generated
23
Python/optimizer_cases.c.h
generated
|
@ -1840,6 +1840,29 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _RETURN_GENERATOR: {
|
||||
_Py_UopsSymbol *res;
|
||||
ctx->frame->stack_pointer = stack_pointer;
|
||||
frame_pop(ctx);
|
||||
stack_pointer = ctx->frame->stack_pointer;
|
||||
OUT_OF_SPACE_IF_NULL(res = sym_new_unknown(ctx));
|
||||
/* Stack space handling */
|
||||
assert(corresponding_check_stack == NULL);
|
||||
assert(co != NULL);
|
||||
int framesize = co->co_framesize;
|
||||
assert(framesize > 0);
|
||||
assert(framesize <= curr_space);
|
||||
curr_space -= framesize;
|
||||
co = get_code(this_instr);
|
||||
if (co == NULL) {
|
||||
// might be impossible, but bailing is still safe
|
||||
goto done;
|
||||
}
|
||||
stack_pointer[0] = res;
|
||||
stack_pointer += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
case _BUILD_SLICE: {
|
||||
_Py_UopsSymbol *slice;
|
||||
slice = sym_new_not_null(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue