summaryrefslogtreecommitdiffstats
path: root/Python/frame.c
Commit message (Collapse)AuthorAgeFilesLines
* GH-94262: Don't create frame objects for frames that aren't yet complete. ↵Mark Shannon2022-07-011-2/+6
| | | | (GH-94371)
* GH-93897: Store frame size in code object and de-opt if insufficient space ↵Mark Shannon2022-06-201-16/+0
| | | | on thread frame stack. (GH-93908)
* gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938)Victor Stinner2022-06-191-1/+1
| | | | | | | | | | | | | | | | Move the follow functions and type from frameobject.h to pyframe.h, so the standard <Python.h> provide frame getter functions: * PyFrame_Check() * PyFrame_GetBack() * PyFrame_GetBuiltins() * PyFrame_GetGenerator() * PyFrame_GetGlobals() * PyFrame_GetLasti() * PyFrame_GetLocals() * PyFrame_Type Remove #include "frameobject.h" from many C files. It's no longer needed.
* Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919)Mark Shannon2022-05-181-0/+2
|
* bpo-47177: Replace `f_lasti` with `prev_instr` (GH-32208)Brandt Bucher2022-04-071-0/+7
|
* bpo-47045: Remove `f_state` field (GH-31963)Mark Shannon2022-03-221-4/+7
| | | | | * Remove the f_state field from _PyInterpreterFrame * Make ownership of the frame explicit, replacing the is_generator field with an owner field.
* bpo-46836: Rename InterpreterFrame to _PyInterpreterFrame (GH-31583)Victor Stinner2022-02-251-10/+10
| | | | | Rename also struct _interpreter_frame to struct _PyInterpreterFrame. Reduce risk of name conflicts if a project includes pycore_frame.h.
* Pass reference to func, as well as args, when pushing frame. (GH-31100)Mark Shannon2022-02-031-0/+2
|
* bpo-46072: Add some frame stats. (GH-31060)Mark Shannon2022-02-021-0/+2
|
* bpo-46329: Split calls into precall and call instructions. (GH-30855)Mark Shannon2022-01-281-1/+14
| | | | | | | | | | | | | | * Add PRECALL_FUNCTION opcode. * Move 'call shape' varaibles into struct. * Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions. * Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol. * Allow kwnames for specialized calls to builtin types. * Specialize calls to tuple(arg) and str(arg).
* bpo-46409: Make generators in bytecode (GH-30633)Mark Shannon2022-01-201-12/+7
| | | | | | | | | | | | * Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
* bpo-45963: Make space for the InterpreterFrame of a generator in that ↵Mark Shannon2021-12-061-12/+6
| | | | | | | generator. (GH-29891) * Make generator, coroutine and async gen structs all the same size. * Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
* bpo-45786: Allocate space for frame in frame object. (GH-29729)Mark Shannon2021-11-291-23/+15
|
* bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵Mark Shannon2021-11-231-4/+2
| | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
* bpo-45813: Make sure that frame->generator is NULLed when generator is ↵Mark Shannon2021-11-221-0/+3
| | | | deallocated. (GH-29700)
* bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)Mark Shannon2021-08-251-20/+12
| | | Places the locals between the specials and stack. This is the more "natural" layout for a C struct, makes the code simpler and gives a slight speedup (~1%)
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-261-0/+135
* Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it. * Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector. * Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation. * Move ownership of InterpreterFrame in generator from frame object to generator object. * Do not create frame objects for Python calls. * Do not create frame objects for generators.