Lines Matching refs:frame

591 _PyFrame_GetState(PyFrameObject *frame)
593 assert(!_PyFrame_IsIncomplete(frame->f_frame));
594 if (frame->f_frame->stacktop == 0) {
597 switch(frame->f_frame->owner) {
600 PyGenObject *gen = _PyFrame_GetGenerator(frame->f_frame);
605 if (_PyInterpreterFrame_LASTI(frame->f_frame) < 0) {
608 switch (_PyOpcode_Deopt[_Py_OPCODE(*frame->f_frame->prev_instr)])
657 * setting the line number of a frame.
670 "can't jump from the 'call' trace event of a new frame");
843 frame is on the free list, only the following members have a meaning:
867 _PyInterpreterFrame *frame = (_PyInterpreterFrame *)f->_f_frame_data;
869 co = frame->f_code;
870 frame->f_code = NULL;
871 Py_CLEAR(frame->f_func);
872 Py_CLEAR(frame->f_locals);
873 PyObject **locals = _PyFrame_GetLocalsArray(frame);
874 for (int i = 0; i < frame->stacktop; i++) {
932 "cannot clear an executing frame");
937 "F.clear(): clear most references held by the frame");
958 "<frame at %p, file %R, line %d, code %S>",
972 "frame",
1007 init_frame(_PyInterpreterFrame *frame, PyFunctionObject *func, PyObject *locals)
1012 _PyFrame_InitializeSpecials(frame, func, locals, code->co_nlocalsplus);
1013 frame->previous = NULL;
1015 frame->localsplus[i] = NULL;
1068 // This frame needs to be "complete", so pretend that the first RESUME ran:
1077 _PyFrame_OpAlreadyRan(_PyInterpreterFrame *frame, int opcode, int oparg)
1082 for (_Py_CODEUNIT *instruction = _PyCode_CODE(frame->f_code);
1083 instruction < frame->prev_instr; instruction++)
1102 _PyFrame_FastToLocalsWithError(_PyInterpreterFrame *frame) {
1107 locals = frame->f_locals;
1109 locals = frame->f_locals = PyDict_New();
1113 co = frame->f_code;
1114 fast = _PyFrame_GetLocalsArray(frame);
1117 int lasti = _PyInterpreterFrame_LASTI(frame);
1120 PyCodeObject *co = frame->f_code;
1121 PyObject *closure = frame->f_func->func_closure;
1126 frame->localsplus[offset + i] = o;
1129 frame->prev_instr = _PyCode_CODE(frame->f_code);
1148 if (frame->stacktop) {
1161 _PyFrame_OpAlreadyRan(frame, MAKE_CELL, i)) {
1166 // with the initial value set when the frame was created...
1222 _PyFrame_LocalsToFast(_PyInterpreterFrame *frame, int clear)
1229 locals = frame->f_locals;
1233 fast = _PyFrame_GetLocalsArray(frame);
1234 co = frame->f_code;
1256 // The cell was set when the frame was created from
1264 _PyFrame_OpAlreadyRan(frame, MAKE_CELL, i)) {
1299 int _PyFrame_IsEntryFrame(PyFrameObject *frame)
1301 assert(frame != NULL);
1302 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1303 return frame->f_frame->is_entry;
1308 PyFrame_GetCode(PyFrameObject *frame)
1310 assert(frame != NULL);
1311 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1312 PyCodeObject *code = frame->f_frame->f_code;
1320 PyFrame_GetBack(PyFrameObject *frame)
1322 assert(frame != NULL);
1323 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1324 PyFrameObject *back = frame->f_back;
1326 _PyInterpreterFrame *prev = frame->f_frame->previous;
1339 PyFrame_GetLocals(PyFrameObject *frame)
1341 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1342 return frame_getlocals(frame, NULL);
1346 PyFrame_GetGlobals(PyFrameObject *frame)
1348 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1349 return frame_getglobals(frame, NULL);
1353 PyFrame_GetBuiltins(PyFrameObject *frame)
1355 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1356 return frame_getbuiltins(frame, NULL);
1360 PyFrame_GetLasti(PyFrameObject *frame)
1362 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1363 int lasti = _PyInterpreterFrame_LASTI(frame->f_frame);
1371 PyFrame_GetGenerator(PyFrameObject *frame)
1373 assert(!_PyFrame_IsIncomplete(frame->f_frame));
1374 if (frame->f_frame->owner != FRAME_OWNED_BY_GENERATOR) {
1377 PyGenObject *gen = _PyFrame_GetGenerator(frame->f_frame);