summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* gh-114083: apply optimization of LOAD_CONST instructions to the whole CFG ↵Irit Katriel2024-01-221-140/+179
| | | | before optimize_basic_block. (#114408)
* gh-113102: Fix typo in INSTRUMENTED_RESUME (GH-114349)Guido van Rossum2024-01-222-2/+2
|
* gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect ↵Nikita Sobolev2024-01-211-1/+1
| | | | implementation (#114385)
* gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157)Sam Gross2024-01-201-6/+7
| | | | | | | | | | * gh-112529: Use GC heaps for GC allocations in free-threaded builds The free-threaded build's garbage collector implementation will need to find GC objects by traversing mimalloc heaps. This hooks up the allocation calls with the correct heaps by using a thread-local "current_obj_heap" variable. * Refactor out setting heap based on type
* gh-114265: move line number propagation before cfg optimization, remove ↵Irit Katriel2024-01-191-53/+54
| | | | guarantee_lineno_for_exits (#114267)
* gh-111968: Use per-thread freelists for generator in free-threading (gh-114189)Donghee Na2024-01-184-4/+3
|
* Delete unused macro (GH-114238)Mark Shannon2024-01-181-3/+0
|
* Update copyright years to 2024. (GH-113608)solya0x2024-01-161-1/+1
| | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-111968: Use per-thread freelists for PyContext in free-threading (gh-114122)Donghee Na2024-01-165-28/+18
|
* gh-113626: Add allow_code parameter in marshal functions (GH-113648)Serhiy Storchaka2024-01-162-43/+282
| | | | | Passing allow_code=False prevents serialization and de-serialization of code objects which is incompatible between Python versions.
* GH-113655: Lower the C recursion limit on various platforms (GH-113944)Mark Shannon2024-01-165-22/+13
|
* gh-111968: Use per-thread slice_cache in free-threading (gh-113972)Donghee Na2024-01-152-3/+2
|
* GH-112354: `_GUARD_IS_TRUE_POP` side-exits to target the next instruction, ↵Mark Shannon2024-01-153-14/+27
| | | | not themselves. (GH-114078)
* gh-113710: Add types to the interpreter DSL (#113711)Ken Jin2024-01-122-41/+26
| | | | Co-authored-by: Jules <57632293+JuliaPoo@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-107901: duplicate blocks with no lineno that have an eval break and ↵Irit Katriel2024-01-121-10/+22
| | | | multiple predecessors (#113950)
* GH-113860: Get rid of `_PyUOpExecutorObject` (GH-113954)Brandt Bucher2024-01-126-29/+27
|
* gh-111968: Use per-thread freelists for tuple in free-threading (gh-113921)Donghee Na2024-01-114-3/+2
|
* gh-113845: Fix a compiler warning in Python/suggestions.c (GH-113949)Serhiy Storchaka2024-01-111-2/+0
|
* GH-113853: Guarantee forward progress in executors (GH-113854)Mark Shannon2024-01-113-73/+118
|
* gh-107901: jump leaving an exception handler doesn't need an eval break ↵Irit Katriel2024-01-111-1/+1
| | | | check (#113943)
* gh-89811: Check for valid tp_version_tag in specializer (GH-113558)Peter Lazorchak2024-01-111-1/+29
|
* gh-111968: Use per-thread freelists for float in free-threading (gh-113886)Donghee Na2024-01-104-3/+2
|
* GH-113860: All executors are now defined in terms of micro ops. Convert ↵Mark Shannon2024-01-104-130/+111
| | | | counter executor to use uops. (GH-113864)
* gh-111968: Introduce _PyFreeListState and _PyFreeListState_GET API (gh-113584)Donghee Na2024-01-095-17/+71
|
* Fix opcode name printing in debug mode (#113870)Guido van Rossum2024-01-091-3/+3
| | | Fix a few places where the lltrace debug output printed ``(null)`` instead of an opcode name, because it was calling ``_PyUOpName()`` on a Tier-1 opcode.
* gh-113842: Add missing error check for PyIter_Next() in Python/symtable.c ↵Yan Yanchii2024-01-091-0/+6
| | | | (GH-113843)
* gh-110721: Remove unused code from suggestions.c after moving PyErr_Display ↵Pablo Galindo Salgado2024-01-082-219/+1
| | | | to use the traceback module (#113712)
* gh-73965: Move PYTHON_HISTORY into the correct usage section (#113798)Hugo van Kemenade2024-01-081-1/+1
| | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-73965: New environment variable PYTHON_HISTORY (#13208)Zackery Spytz2024-01-071-0/+1
| | | | | | | | It can be used to set the location of a .python_history file --------- Co-authored-by: Levi Sabah <0xl3vi@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-107901: synthetic jumps which are not at end of loop no longer check the ↵Irit Katriel2024-01-062-23/+36
| | | | eval breaker (#113721)
* gh-113688: Split up gcmodule.c (gh-113715)Sam Gross2024-01-051-0/+1958
| | | | | This splits part of Modules/gcmodule.c of into Python/gc.c, which now contains the core garbage collection implementation. The Python module remain in the Modules/gcmodule.c file.
* gh-112532: Tag mimalloc heaps and pages (#113742)Sam Gross2024-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | * gh-112532: Tag mimalloc heaps and pages Mimalloc pages are data structures that contain contiguous allocations of the same block size. Note that they are distinct from operating system pages. Mimalloc pages are contained in segments. When a thread exits, it abandons any segments and contained pages that have live allocations. These segments and pages may be later reclaimed by another thread. To support GC and certain thread-safety guarantees in free-threaded builds, we want pages to only be reclaimed by the corresponding heap in the claimant thread. For example, we want pages containing GC objects to only be claimed by GC heaps. This allows heaps and pages to be tagged with an integer tag that is used to ensure that abandoned pages are only claimed by heaps with the same tag. Heaps can be initialized with a tag (0-15); any page allocated by that heap copies the corresponding tag. * Fix conversion warning
* GH-113486: Do not emit spurious PY_UNWIND events for optimized calls to ↵Mark Shannon2024-01-053-5/+6
| | | | classes. (GH-113680)
* gh-112532: Isolate abandoned segments by interpreter (#113717)Sam Gross2024-01-041-0/+5
| | | | | | | | | | | | | | | * gh-112532: Isolate abandoned segments by interpreter Mimalloc segments are data structures that contain memory allocations along with metadata. Each segment is "owned" by a thread. When a thread exits, it abandons its segments to a global pool to be later reclaimed by other threads. This changes the pool to be per-interpreter instead of process-wide. This will be important for when we use mimalloc to find GC objects in the `--disable-gil` builds. We want heaps to only store Python objects from a single interpreter. Absent this change, the abandoning and reclaiming process could break this isolation. * Add missing '&_mi_abandoned_default' to 'tld_empty'
* GH-113689: Fix broken handling of invalid executors (GH-113694)Brandt Bucher2024-01-042-2/+4
|
* gh-113603: Compiler no longer tries to maintain the no-empty-block invariant ↵Irit Katriel2024-01-031-78/+38
| | | | (#113636)
* GH-113595: Don't enter invalid executor (GH-113596)Mark Shannon2024-01-032-19/+39
|
* GH-113657: Add back missing _SET_IP uops in tier two (GH-113662)Brandt Bucher2024-01-021-2/+3
|
* gh-73427: deprecate `_enablelegacywindowsfsencoding` (#107729)Inada Naoki2023-12-281-0/+7
|
* gh-112532: Use separate mimalloc heaps for GC objects (gh-113263)Sam Gross2023-12-262-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | * gh-112532: Use separate mimalloc heaps for GC objects In `--disable-gil` builds, we now use four separate heaps in anticipation of using mimalloc to find GC objects when the GIL is disabled. To support this, we also make a few changes to mimalloc: * `mi_heap_t` and `mi_tld_t` initialization is split from allocation. This allows us to have a `mi_tld_t` per-`PyThreadState`, which is important to keep interpreter isolation, since the same OS thread may run in multiple interpreters (using different PyThreadStates.) * Heap abandoning (mi_heap_collect_ex) can now be called from a different thread than the one that created the heap. This is necessary because we may clear and delete the containing PyThreadStates from a different thread during finalization and after fork(). * Use enum instead of defines and guard mimalloc includes. * The enum typedef will be convenient for future PRs that use the type. * Guarding the mimalloc includes allows us to unconditionally include pycore_mimalloc.h from other header files that rely on things like `struct _mimalloc_thread_state`. * Only define _mimalloc_thread_state in Py_GIL_DISABLED builds
* gh-106905: Use separate structs to track recursion depth in each ↵Yilei Yang2023-12-251-312/+377
| | | | | | PyAST_mod2obj call. (GH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* GH-111485: Fix handling of FOR_ITER in Tier 2 (GH-113394)Mark Shannon2023-12-241-12/+5
|
* gh-113297: Fix segfault in compiler for with statement with 19 context ↵Irit Katriel2023-12-221-1/+2
| | | | managers (#113327)
* gh-113343: Fix error check on mmap(2) (#113342)Namhyung Kim2023-12-211-1/+1
| | | | | | | | | | | | Fix error check on mmap(2) It should check MAP_FAILED instead of NULL for error. On mmap(2) man page: RETURN VALUE On success, mmap() returns a pointer to the mapped area. On error, the value MAP_FAILED (that is, (void *) -1) is returned, and errno is set to indicate the error.
* GH-111485: Delete the old generator code. (GH-113321)Mark Shannon2023-12-213-1019/+52
|
* gh-111375: Use `NULL` rather than `None` in the exception stack to indicate ↵Carey Metcalfe2023-12-214-6/+6
| | | | that an exception was handled (#113302)
* GH-111485: Generate `TARGET` table for computed goto dispatch. (GH-113319)Mark Shannon2023-12-201-1/+2
|
* GH-111485: Generate instruction and uop metadata (GH-113287)Mark Shannon2023-12-208-83/+93
|
* gh-113054: Compiler no longer replaces a redundant jump with no line number ↵Irit Katriel2023-12-191-1/+16
| | | | by a NOP (#113139)
* gh-112535: Implement fallback implementation of _Py_ThreadId() (gh-113185)Donghee Na2023-12-181-0/+14
| | | | | --------- Co-authored-by: Sam Gross <colesbury@gmail.com>