summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-129173: Use `_PyUnicodeError_GetParams` in `PyCodec_NameReplaceErrors` ↵Bénédikt Tran2025-02-081-111/+123
| | | | (GH-129135)
* gh-100239: replace BINARY_SUBSCR & family by BINARY_OP with oparg NB_SUBSCR ↵Irit Katriel2025-02-0711-626/+477
| | | | (#129700)
* GH-129715: Remove _DYNAMIC_EXIT (GH-129716)Brandt Bucher2025-02-076-96/+6
|
* GH-129709: Clean up tier two (GH-129710)Brandt Bucher2025-02-077-290/+71
|
* GH-129763: Remove the LLTRACE macro (GH-129764)Brandt Bucher2025-02-074-31/+9
|
* gh-128563: Move assignment of opcode into ifdef (GH-129803)Ken Jin2025-02-071-666/+458
|
* gh-129766: Fix crash on calling `warnings._release_lock` with no lock (#129771)sobolevn2025-02-071-3/+6
|
* gh-129533: Update PyGC_Enable/Disable/IsEnabled to use atomic operation ↵Donghee Na2025-02-061-11/+7
| | | | (gh-129563)
* gh-128002: use per threads tasks linked list in asyncio (#128869)Kumar Aditya2025-02-061-1/+11
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-129732: Fix race on `shared->array` in qsbr code under free-threading ↵Peter Hawkins2025-02-061-6/+6
| | | | | | (gh-129738) The read of `shared->array` should happen under the lock to avoid a race.
* gh-128563: A new tail-calling interpreter (GH-128718)Ken Jin2025-02-065-548/+3268
| | | | | Co-authored-by: Garrett Gu <garrettgu777@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-129201: Use prefetch in GC mark alive phase. (gh-129203)Neil Schemenauer2025-02-051-42/+430
| | | For the free-threaded version of the cyclic GC, restructure the "mark alive" phase to use software prefetch instructions. This gives a speedup in most cases when the number of objects is large enough. The prefetching is enabled conditionally based on the number of long-lived objects the GC finds.
* gh-129354: Use PyErr_FormatUnraisable() function (#129523)Victor Stinner2025-02-051-3/+7
| | | | | | | | | | Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable(). Update tests: * test_coroutines * test_exceptions * test_generators * test_struct
* gh-128911: Use PyImport_ImportModuleAttr() function (#129657)Victor Stinner2025-02-052-29/+9
| | | | | | * Replace PyImport_ImportModule() + PyObject_GetAttr() with PyImport_ImportModuleAttr(). * Replace PyImport_ImportModule() + PyObject_GetAttrString() with PyImport_ImportModuleAttrString().
* GH-128682: Mark two more macros as escaping. (GH-129645)Mark Shannon2025-02-045-36/+125
| | | Expand out SETLOCAL so that code generator can see the decref. Mark Py_CLEAR as escaping
* GH-128682: Spill the stack pointer in labels, as well as instructions ↵Mark Shannon2025-02-044-38/+62
| | | | (GH-129618)
* gh-126835: Fix reference leak in ↵Yan Yanchii2025-02-041-2/+8
| | | | `Python/flowgrapc.::optimize_if_const_subscr` (#129634)
* gh-126835: Move constant subscript folding to CFG (#129568)Yan Yanchii2025-02-043-21/+83
| | | | | Move folding of constant subscription from AST optimizer to CFG. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* GH-128563: Generate `opcode = ...` in instructions that need `opcode` ↵Mark Shannon2025-02-035-62/+474
| | | | | (GH-129608) * Remove support for GO_TO_INSTRUCTION
* GH-128682: Make `PyStackRef_CLOSE` escaping. (GH-129404)Mark Shannon2025-02-036-558/+1266
|
* GH-129231: Group executable JIT code in memory (GH-129232)Diego Russo2025-02-021-5/+5
|
* GH-128842: Collect JIT memory stats (GH-128941)Diego Russo2025-02-022-0/+16
|
* GH-128872: Remove unused argument from _PyCode_Quicken (GH-128873)Yan Yanchii2025-02-021-2/+1
| | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-126835: Move optimization of constant sequence creation from codegen to ↵Kirill Podoprigora2025-02-012-47/+71
| | | | | | | | | | | | | | | | | | | | | | CFG (#129426) Codegen phase has an optimization that transforms ``` LOAD_CONST x LOAD_CONST y LOAD_CONXT z BUILD_LIST/BUILD_SET (3) ``` -> ``` BUILD_LIST/BUILD_SET (0) LOAD_CONST (x, y, z) LIST_EXTEND/SET_UPDATE 1 ``` This optimization has now been moved to CFG phase to make #128802 work. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
* GH-128563: Move some labels, to simplify implementing tailcalling ↵Mark Shannon2025-01-314-49/+86
| | | | interpreter. (GH-129525)
* gh-128509: Add `sys._is_immortal` for identifying immortal objects (#128510)Peter Bierma2025-01-312-1/+49
| | | Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* gh-126108: Fix potential null pointer dereference in ↵Valery Fedorenko2025-01-311-3/+4
| | | | `PySys_AddWarnOptionUnicode` (#126118)
* gh-129354: Use PyErr_FormatUnraisable() function (#129514)Victor Stinner2025-01-312-14/+26
| | | Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
* GH-128563: Simplify recursion check in `_PyEval_EvalFrameDefault` (GH-129481)Mark Shannon2025-01-311-6/+5
| | | Simplify recursion check in _PyEval_EvalFrameDefault
* gh-129354: Fix grammar in PyErr_FormatUnraisable() (#129475)Victor Stinner2025-01-318-29/+42
| | | Replace "on verb+ing" with "while verb+ing".
* gh-129354: Use PyErr_FormatUnraisable() function (#129435)Victor Stinner2025-01-301-1/+1
| | | Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
* gh-128911: Add PyImport_ImportModuleAttr() function (#128912)Victor Stinner2025-01-302-6/+6
| | | | | | | | | | | Add PyImport_ImportModuleAttr() and PyImport_ImportModuleAttrString() functions. * Add unit tests. * Replace _PyImport_GetModuleAttr() with PyImport_ImportModuleAttr(). * Replace _PyImport_GetModuleAttrString() with PyImport_ImportModuleAttrString(). * Remove "pycore_import.h" includes, no longer needed.
* gh-129236: Use `stackpointer` in free threaded GC (#129240)Sam Gross2025-01-291-28/+52
| | | | | | The stack pointers in interpreter frames are nearly always valid now, so use them when visiting each thread's frame. For now, don't collect objects with deferred references in the rare case that we see a frame with a NULL stack pointer.
* gh-100239: specialize bitwise logical binary ops on ints (#128927)Irit Katriel2025-01-292-1/+55
|
* GH-126599: Remove the PyOptimizer API (GH-129194)Brandt Bucher2025-01-297-132/+164
|
* gh-115999: Enable free-threaded specialization of LOAD_CONST (#129365)T. Wouters2025-01-292-4/+24
| | | | Enable free-threaded specialization of LOAD_CONST.
* GH-128914: Remove all but one conditional stack effects (GH-129226)Mark Shannon2025-01-279-436/+229
| | | | | | | | | | | | | * Remove all 'if (0)' and 'if (1)' conditional stack effects * Use array instead of conditional for BUILD_SLICE args * Refactor LOAD_GLOBAL to use a common conditional uop * Remove conditional stack effects from LOAD_ATTR specializations * Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array. * Remove conditional stack effects from CALL_FUNCTION_EX
* gh-111178: fix UBSan failures in `Python/traceback.c` (GH-128259)Bénédikt Tran2025-01-271-16/+26
|
* gh-128563: Move labels in ceval.c to bytecodes.c (GH-129112)Ken Jin2025-01-273-135/+276
|
* gh-128799: Add frame of except* to traceback when wrapping a naked exception ↵Irit Katriel2025-01-254-5/+15
| | | | (#128971)
* gh-129244: Remove workaround for MSVC compiler crash (#129263)Michael Droettboom2025-01-251-21/+0
| | | | | * Remove compiler workaround * Remote _Py_USING_PGO
* Remove unused DPRINTF in ceval.c (GH-129282)Chris Eibl2025-01-251-7/+0
| | | remove unused DPRINTF in ceval.c
* gh-129185: Simplify PyTraceMalloc_Track() (#129256)Victor Stinner2025-01-242-26/+3
| | | | | | | | | | Since tracemalloc uses PyMutex, it becomes safe to use TABLES_LOCK() even after _PyTraceMalloc_Fini(): remove the "pre-check" in PyTraceMalloc_Track() and PyTraceMalloc_Untrack(). PyTraceMalloc_Untrack() no longer needs to acquire the GIL. _PyTraceMalloc_Fini() can be called earlier during Python finalization.
* gh-129185: Use PyMutex in tracemalloc (#129246)Victor Stinner2025-01-241-14/+3
|
* gh-129173: Use `_PyUnicodeError_GetParams` in `PyCodec_IgnoreErrors` (#129174)Bénédikt Tran2025-01-241-19/+43
| | | | We also cleanup `PyCodec_StrictErrors` and the error message rendered when an object of incorrect type is passed to codec error handlers.
* gh-126004: Fix positions handling in `codecs.backslashreplace_errors` (#127676)Bénédikt Tran2025-01-231-65/+64
| | | | This fixes how `PyCodec_BackslashReplaceErrors` handles the `start` and `end` attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
* gh-129185: Remove internal TRACE_RAW_MALLOC macro (#129218)Victor Stinner2025-01-231-45/+3
| | | Always build tracemalloc with PyMem_RawMalloc() hooks.
* gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)Victor Stinner2025-01-232-3/+26
| | | | | | | | | Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack() during late Python finalization. * Call _PyTraceMalloc_Fini() later in Python finalization. * Test also PyTraceMalloc_Untrack() without the GIL * PyTraceMalloc_Untrack() now gets the GIL. * Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().
* gh-126004: Fix positions handling in `codecs.replace_errors` (#127674)Bénédikt Tran2025-01-231-24/+22
| | | | This fixes how `PyCodec_ReplaceErrors` handles the `start` and `end` attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
* gh-126004: Fix positions handling in `codecs.xmlcharrefreplace_errors` (#127675)Bénédikt Tran2025-01-231-88/+101
| | | | This fixes how `PyCodec_XMLCharRefReplaceErrors` handles the `start` and `end` attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.