reiden
e36f8db7e5
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)
...
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-03-23 00:57:23 +08:00
Mark Shannon
879c85f6e4
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
...
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Sacul
0d37e423d5
gh-145866: Convert SET_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-145979)
2026-03-19 19:17:58 +08:00
Victor Stinner
1e4ed93210
gh-146092: Fix error handling in _BINARY_OP_ADD_UNICODE opcode ( #146117 )
...
Fix also error handling in _BINARY_OP_ADD_FLOAT,
_BINARY_OP_SUBTRACT_FLOAT and _BINARY_OP_MULTIPLY_FLOAT opcodes.
PyStackRef_FromPyObjectSteal() must not be called with a NULL
pointer.
2026-03-18 17:23:05 +01:00
Ken Jin
966fc81531
gh-146058: Fix _GUARD_CODE_VERSION_* (GH-146060)
2026-03-18 01:19:44 +08:00
Ken Jin
3d0824aef2
gh-127958: Trace from RESUME in the JIT (GH-145905)
2026-03-17 00:18:59 +08:00
Sacul
37121ef77e
gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP. (GH-145964)
2026-03-16 11:58:12 +00:00
Sacul
798070d8ca
gh-134584: Eliminate redundant refcounting in JIT for MATCH_CLASS (GH-144821)
2026-03-14 12:00:18 +00:00
Mark Shannon
453562a467
GH-145692: Convert DEOPT_IFs to EXIT_IFs (GH-145751)
...
* Convert DEOPT_IFs to EXIT_IFs for guards. Keep DEOPT_IF for intentional drops to the interpreter.
* Modify BINARY_OP_SUBSCR_LIST_INT and STORE_SUBSCR_LIST_INT to handle negative indices, to keep EXIT_IFs and DEOPT_IFs in different uops
2026-03-12 10:57:59 +00:00
Hai Zhu
f062014d38
gh-144540: Add _MAKE_HEAP_SAFE uop to eliminate unnecessary refcount operations in RETURN_VALUE and YIELD_VALUE (GH-144414)
2026-03-11 20:24:19 +00:00
Donghee Na
6908372fb8
gh-145214: Narrow _GUARD_TOS_ANY_{SET,DICT} by using probable type (gh-145215)
2026-03-03 09:58:38 +09:00
Hai Zhu
107863ee17
gh-144569: Avoid creating temporary objects in BINARY_SLICE for list, tuple, and unicode (GH-144590)
...
* Scalar replacement of BINARY_SLICE for list, tuple, and unicode
2026-03-02 17:02:38 +00:00
Donghee Na
0f759f1171
gh-145122: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on frozendict (gh-145039)
2026-02-25 00:48:45 +09:00
Mark Shannon
3f37b94c73
GH-144651: Optimize the new uops added when recording values during tracing. (GH-144948)
...
* Handle dependencies in the optimizer, not the tracer
* Strengthen some checks to avoid relying on optimizer for correctness
2026-02-19 11:52:57 +00:00
Donghee Na
3e2f5c133f
gh-141510: Update specializer to support frozendict (gh-144949)
2026-02-19 01:10:53 +09:00
Pablo Galindo Salgado
46d5106cfa
gh-142349: Implement PEP 810 - Explicit lazy imports ( #142351 )
...
Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-02-12 00:15:33 +00:00
Sacul
6c8ca1c378
gh-134584: Optimize _BINARY_OP_SUBSCR_LIST_SLICE (GH-144659)
2026-02-10 22:33:32 +08:00
Ken Jin
895e83727d
gh-144549: Fix tail calling interpreter on Windows for FT (GH-144550)
2026-02-06 19:20:28 +00:00
Sam Gross
d891b2bbd1
gh-139103: Improve namedtuple scaling in free-threaded build (gh-144332)
...
Add `_Py_type_getattro_stackref`, a variant of type attribute lookup
that returns `_PyStackRef` instead of `PyObject*`. This allows returning
deferred references in the free-threaded build, reducing reference count
contention when accessing type attributes.
This significantly improves scaling of namedtuple instantiation across
multiple threads.
* Add blurb
* Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef
* Apply suggestion from @vstinner
Co-authored-by: Victor Stinner <vstinner@python.org>
* Apply suggestion from @vstinner
Co-authored-by: Victor Stinner <vstinner@python.org>
* format
* Update Include/internal/pycore_function.h
Co-authored-by: Victor Stinner <vstinner@python.org>
---------
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-06 09:43:05 -05:00
Mark Shannon
b53fc7caa6
GH-144179: Use recorded values to make optimizer more robust (GH-144437)
...
* Add three new symbol kinds
* Do not smuggle code object in _PUSH_FRAME operand
* Fix small bug in predicate analysis
2026-02-05 08:58:41 +00:00
Hai Zhu
89e6607e05
gh-139109: Replace _CHECK_STACK_SPACE with _CHECK_STACK_SPACE_OPERAND in JIT optiimizer (GH-144394)
2026-02-02 17:12:01 +00:00
Mark Shannon
141fd8b894
GH-144179: Add value recording to JIT tracing front-end (GH-144303)
2026-02-02 16:57:04 +00:00
Hai Zhu
ebbb2ca81f
gh-144145: Revert PR#144122 for performance and potential bugs. (GH-144391)
...
Revert "gh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)"
This reverts commit 1dc12b2883 .
2026-02-02 14:09:54 +00:00
Hai Zhu
1dc12b2883
gh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)
2026-01-30 15:25:19 +00:00
AN Long
6e55337f8a
gh-143995: Eliminate redundant refcounting in the JIT from LOAD_ATTR_MODULE (GH-143996)
2026-01-25 18:24:44 +00:00
AN Long
4e10fa993a
gh-144007: Eliminate redundant refcounting in the JIT for BINARY_OP (GH-144011)
2026-01-24 09:35:32 +00:00
AN Long
2f42f83344
gh-144005: Eliminate redundant refcounting in the JIT for BINARY_OP_EXTEND ( #144006 )
2026-01-23 17:19:01 +00:00
Mark Shannon
9eab67d507
GH-138245: Perform boolean guards by testing a single bit, rather than a full pointer comparison. (GH-143810)
2026-01-21 15:58:27 +00:00
AN Long
54bedcf714
gh-144012: Check null binary op extend ( #144014 )
2026-01-19 02:38:37 +08:00
Mark Shannon
ae53da5758
GH-143493: Conform to spec for generator expressions while supporting virtual iterators (GH-143569)
...
* Moves the `GET_ITER` instruction into the generator function preamble.
This means the the iterable is converted into an iterator during generator
creation, as documented, but keeps it in the same code object allowing
optimization.
2026-01-16 09:11:58 +00:00
Hai Zhu
94dbce1397
gh-138050: Use cold flag instead of warm flag in MAKE_WARM (GH-143827)
2026-01-14 10:27:33 +00:00
reiden
c556786b8b
gh-134584: Eliminate redundant refcounting in TO_BOOL_INT, TO_BOOL_LIST (GH-143759)
2026-01-12 21:56:26 +00:00
Nadeshiko Manju
e535bdb0a2
gh-134584: Eliminate redundant refcounting from _CONTAINS_{OP|OP_SET|OP_DICT} (GH-143731)
...
Signed-off-by: Manjusaka <me@manjusaka.me>
2026-01-12 15:47:31 +00:00
Cajetan Rodrigues
054a565c64
gh-134584: JIT: Remove redundant refcount for _BINARY_OP_SUBSCR_DICT (GH-143724)
2026-01-12 14:13:55 +00:00
Ken Jin
548526bbbe
gh-134584: JIT: Remove redundant refcounting for UNARY_{INVERT|NEGATIVE} (GH-143704)
2026-01-11 20:42:55 +00:00
Nadeshiko Manju
e2f0160026
gh-143604: Hold strong reference to executor during JIT tracing (GH-143646)
...
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-01-10 11:15:48 +00:00
Ken Jin
95259116ec
gh-142764: Restore REPLACE_OPCODE_IF_EVALUATES_PURE optimization for some ops (GH-143335)
2026-01-09 23:18:22 +00:00
Sam Gross
8cf5c4d89a
gh-142908: Don't use DK_IS_UNICODE in interpreter (gh-142909)
...
`DK_IS_UNICODE()` includes split keys and we don't want to specialize on
those accesses..
2026-01-08 09:32:20 -05:00
Dino Viehland
bfc3d8d77f
gh-143531: Use macro to check if PEP 523 is hooked ( #143532 )
...
Use macro to check if PEP 523 is hooked
2026-01-07 13:26:19 -08:00
Nadeshiko Manju
0a5c04a5ce
gh-134584: Eliminate redundant refcounting from TO_BOOL_STR (GH-143417)
...
Signed-off-by: Manjusaka <me@manjusaka.me>
2026-01-06 21:11:53 +00:00
Ken Jin
df355348f0
gh-142982: Specialize CALL_FUNCTION_EX (GH-143391)
2026-01-06 20:34:08 +00:00
reiden
54f1ed0299
gh-134584: Eliminate redundant refcounting in TO_BOOL_ALWAYS_TRUE (GH-143427)
...
Co-authored-by: Ken Jin <kenjin@python.org>
2026-01-06 16:11:56 +00:00
Chris Eibl
e6bfe4d886
gh-139757: Add BINARY_OP_SUBSCR_USTR_INT (GH-143389)
2026-01-04 14:14:27 +00:00
Ken Jin
6116d70bbd
gh-143403: Fix a UAF in _BINARY_OP_INPLACE_ADD_UNICODE (GH-143404)
...
Fix a UAF in `_BINARY_OP_INPLACE_ADD_UNICODE`
2026-01-04 13:10:39 +00:00
Ken Jin
f7a03bb944
gh-134584: JIT: Remove redundant refcount from STORE_FAST (GH-143336)
2026-01-02 18:22:21 +00:00
Donghee Na
315f474d11
gh-139757: Add _GUARD_NOS_COMPACT_ASCII for compact ascii optimization (gh-143332)
2026-01-02 20:58:14 +09:00
Nadeshiko Manju
d00d39f58e
gh-134584: Eliminate redundant refcounting from _LOAD_ATTR_SLOT (GH-143320)
...
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-01-01 17:27:02 +00:00
Donghee Na
1fb8e0eb51
gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O} (GH-143330)
...
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-01-01 17:25:38 +00:00
Tomas R.
713684de53
gh-131798: Remove bounds check when indexing into tuples with a constant index ( #137607 )
...
* Remove bounds check when indexing into tuples with a constant index
* Add news entry
* fixup after rebase
2025-12-28 22:06:06 +01:00
Hai Zhu
a1c6308346
gh-134584: Eliminate redundant refcounting from IS_OP (GH-143171)
...
Eliminate redundant refcounting from IS_OP
2025-12-26 20:30:02 +00:00