summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-03-15 20:37:39 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-03-15 20:37:39 (GMT)
commit2afe6aeae820cf2272c6f9be60b185e1c27b734b (patch)
tree806b2e778fa2d90648e9eca16f306769bd804d16 /Objects/frameobject.c
parent3270d11d8aee447e6cbd5388d677b4a23879e80e (diff)
downloadcpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.zip
cpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.tar.gz
cpython-2afe6aeae820cf2272c6f9be60b185e1c27b734b.tar.bz2
perform yield from delegation by repeating YIELD_FROM opcode (closes #14230)
This allows generators that are using yield from to be seen by debuggers. It also kills the f_yieldfrom field on frame objects. Patch mostly from Mark Shannon with a few tweaks by me.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index c1ec811..b33d72b 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -444,7 +444,6 @@ frame_dealloc(PyFrameObject *f)
Py_CLEAR(f->f_exc_type);
Py_CLEAR(f->f_exc_value);
Py_CLEAR(f->f_exc_traceback);
- Py_CLEAR(f->f_yieldfrom);
co = f->f_code;
if (co->co_zombieframe == NULL)
@@ -476,7 +475,6 @@ frame_traverse(PyFrameObject *f, visitproc visit, void *arg)
Py_VISIT(f->f_exc_type);
Py_VISIT(f->f_exc_value);
Py_VISIT(f->f_exc_traceback);
- Py_VISIT(f->f_yieldfrom);
/* locals */
slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
@@ -510,7 +508,6 @@ frame_clear(PyFrameObject *f)
Py_CLEAR(f->f_exc_value);
Py_CLEAR(f->f_exc_traceback);
Py_CLEAR(f->f_trace);
- Py_CLEAR(f->f_yieldfrom);
/* locals */
slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars);
@@ -714,7 +711,6 @@ PyFrame_New(PyThreadState *tstate, PyCodeObject *code, PyObject *globals,
f->f_lasti = -1;
f->f_lineno = code->co_firstlineno;
f->f_iblock = 0;
- f->f_yieldfrom = NULL;
_PyObject_GC_TRACK(f);
return f;