Neil Schemenauer and GitHub
9626ef87f4
gh-152238: Revert gh-150490 and gh-152200. (gh-152232)
...
Revert commits:
gh-151593: Fix dead lock in PyDict insert_split_key() (#152200 )
gh-150490: Raise PyType_Modified for insertion into split dictionary (#150489 )
For gh-150489, it violates locking discipline and results in deadlocks,
gh-151593 is an example of it being hit in CI. The attempted fix
gh-152200 avoids the deadlock but introduces a data-race. The race
window is small but can be triggered with pure Python code.
2026-06-26 11:20:41 -07:00
Mark Shannon and GitHub
ad1513a263
GH-150516: Reduce the work done to spill and reload the stack around calls (GH-151587)
2026-06-18 15:14:30 +01:00
Maurycy Pawłowski-Wieroński and GitHub
a8d74c062f
gh-151436: Fix missing tstate->last_profiled_frame updates ( #151437 )
2026-06-17 16:49:23 -04:00
Kumar Aditya and GitHub
e9d5280f6c
gh-151223: fix tsan data races in load global specializations ( #151393 )
2026-06-15 22:09:49 +05:30
Dino Viehland and GitHub
efb2fffae1
gh-150490: Raise PyType_Modified for insertion into split dictionary ( #150489 )
...
Raise PyType_Modified for insertion into split dictionary
2026-06-11 09:38:31 -07:00
Mark Shannon and GitHub
633b6be8f5
GH-148960: Reduce the size of the debug stencils to less than half. (GH-150551)
...
For AArch64 linux, reduces the total bytes in the code bodies from 489kb to 218kb.
Reduces the size of the stencils files from 394k lines to 167k lines.
2026-06-01 17:56:16 +01:00
Neko Asakura and GitHub
39bd44fc70
gh-148871: make LOAD_COMMON_CONSTANT use immortal stackref borrows (GH-149625)
2026-05-28 12:27:37 +01:00
Pieter Eendebak and GitHub
dfeeee990b
gh-145192: improve performance of PySequence_GetSlice ( #145193 )
2026-05-23 15:45:50 +05:30
Sergey Miryanov and GitHub
1a79fd0ad6
GH-149501: Fix compilation warning in _YIELD_VALUE uop ( #149502 )
2026-05-12 22:47:35 +05:30
Mark Shannon and GitHub
70bd1c2dd2
GH-143732: SEND specialization (GH-148963)
...
* SEND specialization. Adds 2 new specialized instructions:
* SEND_VIRTUAL: for sends to virtual iterators e.g lists and tuples
* SEND_ASYNC_GEN: for sends to async generators
Tweak FOR_ITER_VIRTUAL so that SEND_VIRTUAL and FOR_ITER_VIRTUAL use equivalent guards
2026-05-05 15:19:16 +01:00
Pablo Galindo Salgado and GitHub
9a268e3e33
gh-98894: Restore function entry/exit DTrace probes ( #142397 )
...
The function__entry and function__return probes stopped working in Python 3.11
when the interpreter was restructured around the new bytecode system. This change
restores these probes by adding DTRACE_FUNCTION_ENTRY() at the start_frame label
in bytecodes.c and DTRACE_FUNCTION_RETURN() in the RETURN_VALUE and YIELD_VALUE
instructions. The helper functions are defined in ceval.c and extract the
filename, function name, and line number from the frame before firing the probe.
This builds on the approach from https://github.com/python/cpython/pull/125019
but avoids modifying the JIT template since the JIT does not currently support
DTrace. The macros are conditionally compiled with WITH_DTRACE and are no-ops
otherwise. The tests have been updated to use modern opcode names (CALL, CALL_KW,
CALL_FUNCTION_EX) and a new bpftrace backend was added for Linux CI alongside
the existing SystemTap tests. Line probe tests were removed since that probe
was never restored after 3.11.
2026-05-05 00:29:55 +00:00
Neko Asakura and GitHub
9846407eaf
gh-143732: add specialization for FOR_ITER (GH-148745)
2026-05-04 17:29:10 +01:00
952784af47
gh-137030: Fix YIELD_VALUE bytecode assertion ( #149184 )
...
Co-authored-by: Mark Shannon <[email protected] >
2026-05-04 18:09:57 +02:00
Kumar Aditya and GitHub
5847931d11
gh-143732: allow dict subclasses to be specialized (GH-148128)
2026-05-04 09:39:03 +01:00
Neko Asakura and GitHub
0102c1d9b9
gh-149204: add _RROT_3 uop to reduce stack moves (GH-149205)
2026-05-01 12:35:31 +01:00
Neko Asakura and GitHub
2b6a13710f
gh-148211: decompose _SHUFFLE_3_LOAD_CONST_INLINE_BORROW in JIT (GH-148816)
2026-04-28 13:48:23 +01:00
Mark Shannon and GitHub
600f4dbd54
GH-145668: Add FOR_ITER specialization for virtual iterators. Specialize GET_ITER. (GH-147967)
...
* Add FOR_ITER_VIRTUAL to specialize FOR_ITER for virtual iterators
* Add GET_ITER_SELF to specialize GET_ITER for iterators (including generators)
* Add GET_ITER_VIRTUAL to specialize GET_ITER for iterables as virtual iterators
* Add new (internal) _tp_iteritem function slot to PyTypeObject
* Put limited RESUME at start of genexpr for free-threading. Fix up exception handling in genexpr
2026-04-16 15:22:22 +01:00
Pieter Eendebak and GitHub
1f6a09fb36
gh-100239: Specialize more binary operations using BINARY_OP_EXTEND (GH-128956)
2026-04-16 09:22:41 +01:00
95cbd4a232
gh-146393: Optimize float division operations by mutating uniquely-referenced operands in place (JIT only) (GH-146397)
...
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected] >
2026-04-15 02:08:04 +08:00
Kumar Aditya and GitHub
1aa7e7ee6d
gh-gh-131798: optimize LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN in the JIT ( #148555 )
2026-04-14 21:00:32 +05:30
Neko Asakura and GitHub
52a7f1b7f8
gh-148510: restore func_version check in _LOAD_ATTR_PROPERTY_FRAME (GH-148528)
2026-04-14 22:44:39 +08:00
18d7d90ef9
gh-131798: Split _CHECK_AND_ALLOCATE_OBJECT into smaller uops (GH-148433)
...
Co-authored-by: Hai Zhu <[email protected] >
Co-authored-by: Ken Jin <[email protected] >
2026-04-13 02:31:24 +08:00
Donghee Na and GitHub
a71b043356
gh-148171: Convert CALL_BUILTIN_CLASS to leave arguments on the stack (gh-148381)
2026-04-11 23:01:25 +09:00
Neko Asakura and GitHub
9831dea3bf
gh-148211: decompose _POP_TWO/_POP_CALL(_ONE/_TWO) in JIT (GH-148377)
2026-04-11 20:46:56 +08:00
Neko Asakura and GitHub
72006a71b2
gh-148211: decompose [_POP_TWO/_INSERT_2]_LOAD_CONST_INLINE_BORROW in JIT (GH-148357)
2026-04-11 18:27:51 +08:00
Sacul and GitHub
e872c19922
gh-148171: Convert variadic argument opcodes to leave their arguments on the stack (CALL_BUILTIN_FAST_WITH_KEYWORDS) ( #148366 )
2026-04-11 13:27:24 +08:00
Kumar Aditya and GitHub
2b439da972
gh-148171: convert more variadic uops to leave input on stack in JIT ( #148361 )
2026-04-11 10:29:38 +05:30
Kumar Aditya and GitHub
8f17140fc1
gh-131798: split _CALL_BUILTIN_CLASS to smaller uops ( #148094 )
2026-04-10 17:28:20 +00:00
Ken Jin and GitHub
266247c9a6
gh-148171: Convert CALL_BUILTIN_FAST to leave inputs on the stack for refcount elimination in JIT (GH-148172)
2026-04-10 23:11:18 +08:00
Neko Asakura and GitHub
aea0b91d65
gh-148211: decompose [_POP_CALL_X/_SHUFFLE_2]_LOAD_CONST_INLINE_BORROW in JIT (GH-148313)
2026-04-10 21:57:01 +08:00
Neko Asakura and GitHub
0f49232664
gh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT (GH-148283)
2026-04-10 00:45:39 +08:00
Sacul and GitHub
38d3aef375
gh-134584 : Optimize and eliminate redundant ref-counting for MAKE_FUNCTION in the JIT (GH-144963)
2026-04-09 22:22:53 +08:00
Kumar Aditya and GitHub
458aca9237
gh-131798: fold super method lookups in JIT ( #148231 )
2026-04-09 13:25:01 +05:30
Sacul and GitHub
bb03c8bd02
gh-145866: Convert _CALL_METHOD_DESCRIPTOR_NOARGS to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-148227)
2026-04-08 23:21:37 +08:00
Neko Asakura and GitHub
756358524e
gh-148235: remove duplicate uops _LOAD_CONST_UNDER_INLINE(_BORROW) in JIT (GH-148236)
2026-04-08 16:22:59 +08:00
Kumar Aditya and GitHub
e7bf8eac0f
gh-131798: split recursion check to _CHECK_RECURSION_LIMIT and combine checks (GH-148070)
2026-04-04 17:23:03 +08:00
Kumar Aditya and GitHub
7e275d4965
gh-131798: JIT inline function addresses of builtin methods ( #146906 )
2026-04-04 09:12:13 +05:30
Pieter Eendebak and GitHub
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
Kumar Aditya and GitHub
8e9d21c64b
gh-146558: JIT optimize dict access for objects with known hash ( #146559 )
2026-03-30 14:23:29 +00:00
Serhiy Storchaka and GitHub
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
Neko Asakura and GitHub
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 and GitHub
bfdaa3c565
gh-131798: JIT: split call method and call builtin opcodes into smaller uops ( #146463 )
2026-03-26 14:20:57 +00:00
Serhiy Storchaka and GitHub
0e543055b0
gh-145876: Do not mask AttributeErrors raised during dictionary unpacking (GH-145906)
...
AttributeErrors raised in keys() or __getitem__() during
dictionary unpacking ({**mymapping} or func(**mymapping)) are
no longer masked by TypeError.
2026-03-26 13:48:57 +00:00
Sacul and GitHub
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 and GitHub
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
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) <[email protected] >
2026-03-24 21:16:02 +08:00
Neko Asakura and GitHub
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
e36f8db7e5
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)
...
Co-authored-by: Ken Jin <[email protected] >
2026-03-23 00:57:23 +08:00
Mark Shannon and GitHub
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 and GitHub
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