summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
Commit message (Collapse)AuthorAgeFilesLines
* GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)Brandt Bucher2023-09-131-12/+2
|
* gh-108732: include comprehension locals in frame.f_locals (#109026)Carl Meyer2023-09-071-4/+10
| | | | Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-108991: replace _PyFrame_GetState by two simpler functions (#108992)Irit Katriel2023-09-061-31/+20
|
* gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. ↵Irit Katriel2023-08-231-2/+1
| | | | (#108367)
* gh-105481: generate op IDs from bytecode.c instead of hard coding them in ↵Irit Katriel2023-08-161-0/+2
| | | | opcode.py (#107971)
* gh-106092: Fix use-after-free crash in frame_dealloc (#106875)Anders Kaseorg2023-08-011-6/+7
| | | | | | | | | It was possible for the trashcan to delay the deallocation of a PyFrameObject until after its corresponding _PyInterpreterFrame has already been freed. So frame_dealloc needs to avoid dereferencing the f_frame pointer unless it first checks that the pointer still points to the interpreter frame within the frame object. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
* gh-106869: Use new PyMemberDef constant names (#106871)Victor Stinner2023-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove '#include "structmember.h"'. * If needed, add <stddef.h> to get offsetof() function. * Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Replace: * T_SHORT => Py_T_SHORT * T_INT => Py_T_INT * T_LONG => Py_T_LONG * T_FLOAT => Py_T_FLOAT * T_DOUBLE => Py_T_DOUBLE * T_STRING => Py_T_STRING * T_OBJECT => _Py_T_OBJECT * T_CHAR => Py_T_CHAR * T_BYTE => Py_T_BYTE * T_UBYTE => Py_T_UBYTE * T_USHORT => Py_T_USHORT * T_UINT => Py_T_UINT * T_ULONG => Py_T_ULONG * T_STRING_INPLACE => Py_T_STRING_INPLACE * T_BOOL => Py_T_BOOL * T_OBJECT_EX => Py_T_OBJECT_EX * T_LONGLONG => Py_T_LONGLONG * T_ULONGLONG => Py_T_ULONGLONG * T_PYSSIZET => Py_T_PYSSIZET * T_NONE => _Py_T_NONE * READONLY => Py_READONLY * PY_AUDIT_READ => Py_AUDIT_READ * READ_RESTRICTED => Py_AUDIT_READ * PY_WRITE_RESTRICTED => _Py_WRITE_RESTRICTED * RESTRICTED => (READ_RESTRICTED | _Py_WRITE_RESTRICTED)
* gh-105340: include hidden fast-locals in locals() (#105715)Carl Meyer2023-07-051-5/+60
| | | * gh-105340: include hidden fast-locals in locals()
* Fix duplicate word typos in comments (#106225)Md Sadman Chowdhury2023-07-011-1/+1
|
* GH-100987: Allow objects other than code objects as the "executable" of an ↵Mark Shannon2023-06-141-19/+20
| | | | | | | | | | internal frame. (GH-105727) * Add table describing possible executable classes for out-of-process debuggers. * Remove shim code object creation code as it is no longer needed. * Make lltrace a bit more robust w.r.t. non-standard frames.
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-1/+1
|
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-121-3/+0
| | | | | | | | (GH-104387) When monitoring LINE events, instrument all instructions that can have a predecessor on a different line. Then check that the a new line has been hit in the instrumentation code. This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-0/+4
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* GH-96803: Add three C-API functions to make _PyInterpreterFrame less opaque ↵Mark Shannon2023-05-051-1/+1
| | | | for users of PEP 523. (GH-96849)
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-68/+102
| | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
* GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)Brandt Bucher2023-03-231-8/+0
|
* gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)Irit Katriel2023-03-221-12/+2
|
* gh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives ↵Irit Katriel2023-03-081-3/+2
| | | | (in Objects/) (#102218)
* gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)Steve Dower2023-02-201-12/+12
| | | | | | * gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h * Make cases_generator correct on Windows
* GH-87849: Simplify stack effect of SEND and specialize it for generators and ↵Mark Shannon2023-02-131-3/+3
| | | | coroutines. (GH-101788)
* gh-101632: Add the new RETURN_CONST opcode (#101633)penguin_wwy2023-02-071-0/+2
|
* GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)Mark Shannon2023-01-161-0/+8
|
* GH-100126: Skip incomplete frames in more places (GH-100613)Brandt Bucher2023-01-091-3/+1
|
* gh-100758: Refactor initialisation of frame headers into a single function ↵Irit Katriel2023-01-061-5/+2
| | | | (_PyFrame_Initialize) (GH-100759)
* GH-100719: Remove the `co_nplaincellvars` field from code objects. (GH-100721)Mark Shannon2023-01-041-1/+1
|
* gh-100720: refactor calculation of number of frame slots for a code object ↵Irit Katriel2023-01-041-1/+1
| | | | into the new function _PyFrame_NumSlotsForCodeObject (#100722)
* gh-99110: Initialize `frame->previous` in init_frame to fix segmentation ↵Bill Fisher2022-12-231-0/+1
| | | | fault when accessing `frame.f_back` (#100182)
* Remove old comment (GH-99489)Brandt Bucher2022-11-161-9/+0
|
* gh-91248: Optimize PyFrame_GetVar() (#99252)Victor Stinner2022-11-131-95/+136
| | | | PyFrame_GetVar() no longer creates a temporary dictionary to get a variable.
* gh-99300: Use Py_NewRef() in Objects/ directory (#99335)Victor Stinner2022-11-101-28/+12
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Objects/ directory.
* GH-96421: Insert shim frame on entry to interpreter (GH-96319)Mark Shannon2022-11-101-5/+5
| | | | | | * Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault() * Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.
* gh-91248: Add PyFrame_GetVar() function (#95712)Victor Stinner2022-11-081-0/+30
| | | | | | Add PyFrame_GetVar() and PyFrame_GetVarString() functions to get a frame variable by its name. Move PyFrameObject C API tests from test_capi to test_frame.
* GH-93143: Don't turn LOAD_FAST into LOAD_FAST_CHECK (GH-99075)Brandt Bucher2022-11-081-44/+36
|
* GH-98686: Quicken everything (GH-98687)Brandt Bucher2022-11-021-1/+1
|
* GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)Mark Shannon2022-10-271-2/+2
| | | | Change FOR_ITER to have the same stack effect regardless of whether it branches or not. Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code).
* gh-95756: Free and NULL-out code caches when needed (GH-98181)Ken Jin2022-10-111-0/+2
|
* gh-95756: Lazily created cached co_* attrs (GH-97791)Ken Jin2022-10-111-2/+5
|
* GH-97779: Ensure that *all* frame objects are backed by "complete" frames ↵Brandt Bucher2022-10-051-1/+15
| | | | (GH-97845)
* gh-93554: Conditional jump opcodes only jump forward (GH-96318)Irit Katriel2022-09-011-16/+3
|
* GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)Mark Shannon2022-08-251-3/+5
|
* GH-94438: Handle extended arguments and conditional pops in mark_stacks ↵Brandt Bucher2022-07-221-4/+9
| | | | (GH-95110)
* GH-94979: Pop the exception stack when jumping out of exception handlers. ↵Mark Shannon2022-07-191-9/+52
| | | | (#95003)
* GH-94893: Ignore caches when adding LOAD_FAST_CHECKs (GH-94894)Brandt Bucher2022-07-181-1/+3
|
* GH-94739: Mark stacks of exception handling blocks for setting ↵Mark Shannon2022-07-181-11/+121
| | | | frame.f_lineno in the debugger. (GH-94958)
* gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and ↵Irit Katriel2022-07-061-8/+10
| | | | POP_EXCEPT cases are no longer reachable (GH-94582)
* GH-94438: Account for NULLs on evaluation stack when jumping lines. (GH-94444)Mark Shannon2022-07-011-13/+43
|
* GH-94262: Don't create frame objects for frames that aren't yet complete. ↵Mark Shannon2022-07-011-2/+8
| | | | (GH-94371)
* GH-91742: Fix pdb crash after jump (GH-94171)Kumar Aditya2022-06-231-1/+1
|
* GH-91432: Specialize FOR_ITER (GH-91713)Dennis Sweeney2022-06-211-1/+1
| | | | | * Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations. * Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
* GH-93897: Store frame size in code object and de-opt if insufficient space ↵Mark Shannon2022-06-201-1/+2
| | | | on thread frame stack. (GH-93908)