Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-118926: Spill deferred references to stack in cases generator (#122748) | Sam Gross | 2024-08-07 | 1 | -17/+17 |
| | | | | | | | This automatically spills the results from `_PyStackRef_FromPyObjectNew` to the in-memory stack so that the deferred references are visible to the GC before we make any possibly escaping call. Co-authored-by: Ken Jin <kenjin@python.org> | ||||
* | gh-117139: Fix an incorrect borrow in bytecodes.c (#122318) | Sam Gross | 2024-08-07 | 1 | -4/+5 |
| | | | `_PyDict_SetItem_Take2` steals both the key (i.e., `sub`) and the value. | ||||
* | GH-120024: Move three more escaping calls out of conditional statements ↵ | Mark Shannon | 2024-08-06 | 1 | -2/+8 |
| | | | | (GH-122734) | ||||
* | GH-120024: Refactor code a bit so that escaping calls can be wrapped in ↵ | Mark Shannon | 2024-08-06 | 1 | -8/+16 |
| | | | | spill code in code generator (GH-122693) | ||||
* | GH-122616: Simplify LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT (GH-122620) | Mark Shannon | 2024-08-05 | 1 | -41/+20 |
| | |||||
* | GH-117224: Move the body of a few large-ish micro-ops into helper functions ↵ | Mark Shannon | 2024-08-02 | 1 | -109/+8 |
| | | | | (GH-122601) | ||||
* | GH-118095: Add tier two support for BINARY_SUBSCR_GETITEM (GH-120793) | Mark Shannon | 2024-08-01 | 1 | -1/+51 |
| | |||||
* | GH-122155: Track local variables between pops and pushes in cases generator ↵ | Mark Shannon | 2024-08-01 | 1 | -4/+8 |
| | | | | (GH-122286) | ||||
* | GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122413) | Brandt Bucher | 2024-07-29 | 1 | -0/+1 |
| | |||||
* | GH-122294: Burn in the addresses of side exits (GH-122295) | Brandt Bucher | 2024-07-26 | 1 | -6/+6 |
| | |||||
* | GH-122029: Break INSTRUMENTED_CALL into micro-ops, so that its behavior is ↵ | Mark Shannon | 2024-07-26 | 1 | -2/+32 |
| | | | | consistent with CALL (GH-122177) | ||||
* | GH-121131: Clean up and fix some instrumented instructions. (GH-121132) | Mark Shannon | 2024-07-26 | 1 | -6/+2 |
| | | | | * Add support for 'prev_instr' to code generator and refactor some INSTRUMENTED instructions | ||||
* | GH-118093: Add tier two support for BINARY_OP_INPLACE_ADD_UNICODE (GH-122253) | Brandt Bucher | 2024-07-25 | 1 | -0/+49 |
| | |||||
* | GH-118093: Add tier two support for LOAD_ATTR_PROPERTY (GH-122283) | Brandt Bucher | 2024-07-25 | 1 | -1/+33 |
| | |||||
* | GH-122034: Add StackRef variants of type checks to reduce the number of ↵ | Mark Shannon | 2024-07-25 | 1 | -5/+5 |
| | | | | PyStackRef_AsPyObjectBorrow calls (GH-122037) | ||||
* | GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164) | Mark Shannon | 2024-07-25 | 1 | -34/+0 |
| | |||||
* | GH-118093: Remove invalidated executors from side exits (GH-121885) | Brandt Bucher | 2024-07-24 | 1 | -4/+5 |
| | |||||
* | GH-118093: Add tier two support to several instructions (GH-121884) | Brandt Bucher | 2024-07-18 | 1 | -3/+160 |
| | |||||
* | GH-121784: Generate an error during code gen if a variable is marked ↵ | Mark Shannon | 2024-07-18 | 1 | -7/+2 |
| | | | | | | | | | | | | `unused`, but is used and thus cached in a prior uop. (#121788) * Reject uop definitions that declare values as 'unused' that are already cached by prior uops * Track which variables are defined and only load from memory when needed * Support explicit `flush` in macro definitions. * Make sure stack is flushed in where needed. | ||||
* | GH-121012: Set index to -1 when list iterators become exhausted in tier 2 ↵ | Mark Shannon | 2024-07-08 | 1 | -2/+5 |
| | | | | (GH-121483) | ||||
* | gh-117139: Add _PyTuple_FromStackRefSteal and use it (#121244) | Sam Gross | 2024-07-02 | 1 | -9/+1 |
| | | | Avoids the extra conversion from stack refs to PyObjects. | ||||
* | GH-116017: Get rid of _COLD_EXITs (GH-120960) | Brandt Bucher | 2024-07-01 | 1 | -37/+56 |
| | |||||
* | gh-117139: Fix a few wrong steals in bytecodes.c (GH-121127) | Ken Jin | 2024-06-28 | 1 | -16/+16 |
| | | | Fix a few wrong steals in bytecodes.c | ||||
* | gh-117139: Convert the evaluation stack to stack refs (#118450) | Ken Jin | 2024-06-26 | 1 | -1211/+1550 |
| | | | | | | | | | | | | | | | | | This PR sets up tagged pointers for CPython. The general idea is to create a separate struct _PyStackRef for everything on the evaluation stack to store the bits. This forces the C compiler to warn us if we try to cast things or pull things out of the struct directly. Only for free threading: We tag the low bit if something is deferred - that means we skip incref and decref operations on it. This behavior may change in the future if Mark's plans to defer all objects in the interpreter loop pans out. This implies a strict stack reference discipline is required. ALL incref and decref operations on stackrefs must use the stackref variants. It is unsafe to untag something then do normal incref/decref ops on it. The new incref and decref variants are called dup and close. They mimic a "handle" API operating on these stackrefs. Please read Include/internal/pycore_stackref.h for more information! --------- Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com> | ||||
* | GH-120982: Add stack check assertions to generated interpreter code (GH-120992) | Mark Shannon | 2024-06-25 | 1 | -0/+153 |
| | |||||
* | GH-117062: Make _JUMP_TO_TOP a general absolute jump (GH-120854) | Brandt Bucher | 2024-06-24 | 1 | -3/+1 |
| | |||||
* | gh-120834: fix type of *_iframe field in _PyGenObject_HEAD declaration (#120835) | Irit Katriel | 2024-06-24 | 1 | -3/+3 |
| | |||||
* | GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. ↵ | Mark Shannon | 2024-06-18 | 1 | -8/+31 |
| | | | | | | | | | (#120640) * Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions. * Add LOAD_SPECIAL instruction * Reimplement `with` and `async with` statements using LOAD_SPECIAL | ||||
* | GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624) | Mark Shannon | 2024-06-17 | 1 | -2/+5 |
| | | | | | * Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame. * Remove remaining _POP_FRAMEs | ||||
* | gh-119180: PEP 649 compiler changes (#119361) | Jelle Zijlstra | 2024-06-11 | 1 | -0/+5 |
| | |||||
* | gh-74929: PEP 667 C API documentation (gh-119379) | Alyssa Coghlan | 2024-06-01 | 1 | -1/+1 |
| | | | | | | | | * Add docs for new APIs * Add soft-deprecation notices * Add What's New porting entries * Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead * Other related cleanups found when looking for refs to the deprecated APIs | ||||
* | gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822) | Jelle Zijlstra | 2024-05-31 | 1 | -29/+1 |
| | | | | | | | | | Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated, but that seems like it may get hairy since the two operations have different operands. This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too, and we should backport to 3.13 and 3.12 if possible. | ||||
* | GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481) | Brandt Bucher | 2024-05-28 | 1 | -1/+61 |
| | |||||
* | GH-119476: Split _CHECK_FUNCTION_VERSION out of _CHECK_FUNCTION_EXACT_ARGS ↵ | Brandt Bucher | 2024-05-28 | 1 | -9/+1 |
| | | | | (GH-119510) | ||||
* | gh-119180: Add LOAD_COMMON_CONSTANT opcode (#119321) | Jelle Zijlstra | 2024-05-22 | 1 | -2/+13 |
| | | | | | | | | | | The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | ||||
* | gh-118414: Fix assertion in YIELD_VALUE when tracing lines or instrs (#118683) | Tian Gao | 2024-05-07 | 1 | -1/+3 |
| | |||||
* | GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵ | Mark Shannon | 2024-05-04 | 1 | -2/+147 |
| | | | | | | | | | | support of calls. (GH-118322) * Add CALL_PY_GENERAL, CALL_BOUND_METHOD_GENERAL and call CALL_NON_PY_GENERAL specializations. * Remove CALL_PY_WITH_DEFAULTS specialization * Use CALL_NON_PY_GENERAL in more cases when otherwise failing to specialize | ||||
* | GH-113464: Remove the extra jump via `_SIDE_EXIT` in `_EXIT_TRACE` (GH-118545) | Mark Shannon | 2024-05-04 | 1 | -9/+1 |
| | |||||
* | gh-107674: Improve performance of `sys.settrace` (GH-117133) | Tian Gao | 2024-05-03 | 1 | -1/+1 |
| | | | | | | * Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing | ||||
* | GH-118095: Unify the behavior of tier 2 FOR_ITER branch micro-ops (GH-118420) | Mark Shannon | 2024-05-02 | 1 | -3/+1 |
| | | | | | | * Target _FOR_ITER_TIER_TWO at POP_TOP following the matching END_FOR * Modify _GUARD_NOT_EXHAUSTED_RANGE, _GUARD_NOT_EXHAUSTED_LIST and _GUARD_NOT_EXHAUSTED_TUPLE so that they also target the POP_TOP following the matching END_FOR | ||||
* | GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵ | Mark Shannon | 2024-05-02 | 1 | -11/+0 |
| | | | | (GH-118482) | ||||
* | GH-118095: Add tier 2 support for YIELD_VALUE (GH-118380) | Mark Shannon | 2024-04-30 | 1 | -0/+41 |
| | |||||
* | GH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286) | Mark Shannon | 2024-04-29 | 1 | -0/+27 |
| | |||||
* | GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 ↵ | Mark Shannon | 2024-04-26 | 1 | -1/+60 |
| | | | | (GH-118279) | ||||
* | GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180) | Mark Shannon | 2024-04-25 | 1 | -12/+31 |
| | |||||
* | GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088) | Mark Shannon | 2024-04-24 | 1 | -0/+2 |
| | |||||
* | GH-115480: Reduce guard strength for binary ops when type of one operand is ↵ | Mark Shannon | 2024-04-22 | 1 | -0/+40 |
| | | | | known already (GH-118050) | ||||
* | gh-112075: Make instance attributes stored in inline "dict" thread safe ↵ | Dino Viehland | 2024-04-22 | 1 | -6/+4 |
| | | | | | (#114742) Make instance attributes stored in inline "dict" thread safe on free-threaded builds | ||||
* | gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe ↵ | Dino Viehland | 2024-04-19 | 1 | -1/+1 |
| | | | | | | | (#116775) Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe. Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean. | ||||
* | GH-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044) | Mark Shannon | 2024-04-19 | 1 | -0/+4 |
| |