Kumar Aditya
7e275d4965
gh-131798: JIT inline function addresses of builtin methods ( #146906 )
2026-04-04 09:12:13 +05:30
Hai Zhu
198b04b75f
gh-146073: Add fitness/exit quality mechanism for JIT trace frontend (GH-147966)
2026-04-03 23:54:30 +08:00
Pieter Eendebak
48317feec8
gh-146640: Optimize int operations by mutating uniquely-referenced operands in place (JIT only) (GH-146641)
2026-04-03 23:23:04 +08:00
Petr Viktorin
9b08f8c56f
GH-126910: Revert "Make _Py_get_machine_stack_pointer return the stack pointer ( #147945 )" (GH-147994)
...
Revert "GH-126910: Make `_Py_get_machine_stack_pointer` return the stack pointer (#147945 )"
This reverts commit 255026d9ee ,
which broke a tier-1 buildbot.
2026-04-02 16:53:09 +02:00
Sergey B Kirpichev
b456cb25a9
gh-143050: Add helper _PyLong_InitTag() ( #147956 )
...
With this we can assume, that _PyLong_SetSignAndDigitCount() and
_PyLong_SetDigitCount() operate on non-immortal integers.
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-01 21:42:10 +00:00
Mark Shannon
255026d9ee
GH-126910: Make _Py_get_machine_stack_pointer return the stack pointer ( #147945 )
...
* Make _Py_get_machine_stack_pointer return the stack pointer (or close to it), not the frame pointer
* Make ``_Py_ReachedRecursionLimit`` inline again
* Remove ``_Py_MakeRecCheck`` relacing its use with ``_Py_ReachedRecursionLimit``
* Move stack swtiching check into ``_Py_CheckRecursiveCall``
2026-04-01 17:15:13 +01:00
Serhiy Storchaka
473d2a35ce
gh-147944: Increase range of bytes_per_sep (GH-147946)
...
Accepted range for the bytes_per_sep argument of bytes.hex(),
bytearray.hex(), memoryview.hex(), and binascii.b2a_hex()
is now increased, so passing sys.maxsize and -sys.maxsize is now
valid.
2026-04-01 08:33:30 +00:00
Sergey B Kirpichev
db5936c5b8
gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() ( #145901 )
...
The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion. Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-31 13:17:49 +00:00
Kumar Aditya
8e9d21c64b
gh-146558: JIT optimize dict access for objects with known hash ( #146559 )
2026-03-30 14:23:29 +00:00
Victor Stinner
adf2c47911
gh-126835: Fix _PY_IS_SMALL_INT() macro ( #146631 )
2026-03-30 12:48:18 +00:00
Serhiy Storchaka
6932c3ee6a
gh-145876: Do not mask KeyErrors raised during dictionary unpacking in call (GH-146472)
...
KeyErrors raised in keys() or __getitem__() during dictionary unpacking
in call (func(**mymapping)) are no longer masked by TypeError.
2026-03-29 11:58:52 +03:00
Sergey Miryanov
5bf3a31bc2
GH-146527: Add more data to GC statistics and add it to PyDebugOffsets ( #146532 )
2026-03-28 18:52:10 +00:00
Ken Jin
1384f025f5
gh-126910: Verify that JIT stencils preserve frame pointer (GH-146524)
2026-03-28 03:38:54 +08:00
Diego Russo
b60b9261b5
GH-126910: avoid reading the FP for getting the SP (GH-146521)
2026-03-28 01:52:48 +08:00
Neko Asakura
a492d9ff74
gh-145866: Convert LIST_EXTEND to leave its inputs on the stack to be cleaned up by _POP_TOP be cleaned up by _POP_TOP (GH-146383)
2026-03-28 01:04:17 +08:00
Kumar Aditya
bfdaa3c565
gh-131798: JIT: split call method and call builtin opcodes into smaller uops ( #146463 )
2026-03-26 14:20:57 +00:00
Sacul
1516c26399
gh-145866: Convert DICT_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146190)
2026-03-26 19:38:44 +08:00
Kevin Huai
f5364ae750
gh-145866: Convert _CALL_INTRINSIC_2 to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146262)
2026-03-26 17:41:07 +08:00
Pieter Eendebak
951675c18a
gh-146306: JIT: Optimize float operations by mutating uniquely-referenced operands in place (GH-146307)
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:16:02 +08:00
Neko Asakura
6d73bc2267
gh-145866: Convert DICT_MERGE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146329)
2026-03-24 18:31:41 +08:00
Petr Viktorin
91cd2e5806
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-23 12:42:09 +01:00
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
Ken Jin
acfb4528de
gh-146099: Optimize _GUARD_CODE_VERSION+IP via function version symbols (GH-146101)
2026-03-20 12:26:41 +00:00
Serhiy Storchaka
4507d496b4
gh-145980: Add support for alternative alphabets in the binascii module (GH-145981)
...
* Add the alphabet parameter in functions b2a_base64(), a2b_base64(),
b2a_base85(), and a2b_base85().
* And a number of "*_ALPHABET" constants.
* Remove b2a_z85() and a2b_z85().
2026-03-20 13:07:00 +02: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
Hai Zhu
6fe91a9e80
gh-144888: JIT executor bloom filter wide-type optimization and function Inlining (GH-146114)
2026-03-19 00:58:14 +08:00
Sam Gross
e0f7c1097e
gh-145779: Improve classmethod/staticmethod scaling in free-threaded build ( #145826 )
...
Add special cases for classmethod and staticmethod descriptors in
_PyObject_GetMethodStackRef() to avoid calling tp_descr_get, which
avoids reference count contention on the bound method and underlying
callable. This improves scaling when calling classmethods and
staticmethods from multiple threads.
Also refactor method_vectorcall in classobject.c into a new _PyObject_VectorcallPrepend() helper so that it can be used by
PyObject_VectorcallMethod as well.
2026-03-17 14:24:44 -04: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
Hai Zhu
81ef1b7317
gh-144888: Replace bloom filter linked lists with continuous arrays to optimize executor invalidating performance (GH-145873)
2026-03-16 15:58:18 +00: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
Sam Gross
cd52172831
gh-145685: Improve scaling of type attribute lookups (gh-145774)
...
Avoid locking in the PyType_Lookup cache-miss path if the type's
tp_version_tag is already valid.
2026-03-12 13:30:36 -04: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
Sergey B Kirpichev
dae85c4d93
gh-145633: Remove support for ancient ARM platforms with mixed-endian doubles ( #145634 )
...
* Drop DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 macro.
* Use DOUBLE_IS_BIG/LITTLE_ENDIAN_IEEE754 to detect endianness of
float/doubles.
* Drop "unknown_format" code path in PyFloat_Pack/Unpack*().
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-11 12:39:24 +01:00
Sam Gross
bdf6de8c3f
gh-145685: Avoid contention on TYPE_LOCK in super() lookups (gh-145775)
2026-03-11 07:19:32 -04:00
Sergey Miryanov
478a315b7a
GH-145247: Implement _PyTuple_FromPair() ( #145325 )
...
Implement _PyTuple_FromPair() and _PyTuple_FromPairSteal().
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-10 11:44:20 +01:00
Stan Ulbrych
bdf0105291
gh-103997: Remove incorrect statements about -c dedenting (gh-138624)
2026-03-10 09:56:00 +01:00
Victor Stinner
7bdfce0d3a
gh-145056: Accept frozendict in xml.etree ( #145508 )
...
Element and SubElement of xml.etree.ElementTree now also accept
frozendict for attrib.
Export _PyDict_CopyAsDict() function.
2026-03-05 12:55:28 +01:00
Victor Stinner
c0ecf211b2
gh-145055: Accept frozendict for globals in exec() and eval() ( #145072 )
2026-03-05 12:35:43 +01:00
Donghee Na
8b54313670
gh-144991: Use runtime JIT threshold in _testinternalcapi (gh-145496)
2026-03-05 09:07:47 +09:00
Victor Stinner
95f56b1206
gh-141510: Return frozendict unmodified in PyDict_Copy() ( #145505 )
...
Add also the internal _PyDict_CopyAsDict() function.
2026-03-04 19:11:00 +00:00
Sam Gross
8a7eb8b2ab
gh-145500: Delete _PyType_GetMRO (gh-145501)
2026-03-04 13:32:43 -05: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
Petr Viktorin
3b276f3f59
gh-144748: Make PyErr_CheckSignals raise the exception scheduled by PyThreadState_SetAsyncExc (GH-145178)
...
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-03-02 11:47:32 +01:00
Hood Chatham
43fdb7037e
gh-145037: Fix Emscripten trampoline with emcc >= 4.0.19 ( #145038 )
...
This undoes a change made as a part of PR 137470, for compatibility with EMSDK
4.0.19. It adds `emscripten_trampoline` field in `pycore_runtime_structs.h`
and initializes it from JS initialization code with the wasm-gc based trampoline
if possible. Otherwise we fall back to the JS trampoline.
2026-02-26 06:21:05 +08:00
Hai Zhu
277a03711b
gh-145197: Fix JIT trace crash when recording function from cleared generator frame (GH-145220)
2026-02-25 16:52:53 +00:00