mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
This commit is contained in:
parent
b5e4c46be2
commit
879c85f6e4
30 changed files with 944 additions and 989 deletions
|
|
@ -1038,7 +1038,7 @@ dummy_func(void) {
|
|||
gen_frame = PyJitRef_WrapInvalid(new_frame);
|
||||
}
|
||||
|
||||
op(_SEND_GEN_FRAME, (receiver, v -- receiver, gen_frame)) {
|
||||
op(_SEND_GEN_FRAME, (receiver, null, v -- receiver, null, gen_frame)) {
|
||||
_Py_UOpsAbstractFrame *new_frame = frame_new_from_symbol(ctx, receiver, NULL, 0);
|
||||
if (new_frame == NULL) {
|
||||
ctx->done = true;
|
||||
|
|
@ -1779,6 +1779,12 @@ dummy_func(void) {
|
|||
sym_set_recorded_gen_func(nos, func);
|
||||
}
|
||||
|
||||
op(_RECORD_3OS_GEN_FUNC, (gen, nos, tos -- gen, nos, tos)) {
|
||||
PyFunctionObject *func = (PyFunctionObject *)this_instr->operand0;
|
||||
assert(func == NULL || PyFunction_Check(func));
|
||||
sym_set_recorded_gen_func(gen, func);
|
||||
}
|
||||
|
||||
op(_GUARD_CODE_VERSION__PUSH_FRAME, (version/2 -- )) {
|
||||
PyCodeObject *co = get_current_code_object(ctx);
|
||||
if (co->co_version == version) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue