Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-104530: Enable native Win32 condition variables by default (GH-104531) | Andrew Rogers | 2024-02-02 | 4 | -30/+35 |
| | |||||
* | GH-113710: Add a "globals to constants" pass (GH-114592) | Mark Shannon | 2024-02-02 | 5 | -37/+333 |
| | | | Converts specializations of `LOAD_GLOBAL` into constants during tier 2 optimization. | ||||
* | gh-107901: make compiler inline basic blocks with no line number and no ↵ | Irit Katriel | 2024-02-02 | 1 | -21/+54 |
| | | | | fallthrough (#114750) | ||||
* | gh-111968: Use per-thread freelists for dict in free-threading (gh-114323) | Donghee Na | 2024-02-01 | 4 | -4/+7 |
| | |||||
* | gh-112529: Remove PyGC_Head from object pre-header in free-threaded build ↵ | Sam Gross | 2024-02-01 | 2 | -6/+25 |
| | | | | | | | | | | | | | | | | | (#114564) * gh-112529: Remove PyGC_Head from object pre-header in free-threaded build This avoids allocating space for PyGC_Head in the free-threaded build. The GC implementation for free-threaded CPython does not use the PyGC_Head structure. * The trashcan mechanism uses the `ob_tid` field instead of `_gc_prev` in the free-threaded build. * The GDB libpython.py file now determines the offset of the managed dict field based on whether the running process is a free-threaded build. Those are identified by the `ob_ref_local` field in PyObject. * Fixes `_PySys_GetSizeOf()` which incorrectly incorrectly included the size of `PyGC_Head` in the size of static `PyTypeObject`. | ||||
* | GH-114806. Don't specialize calls to classes with metaclasses. (GH-114870) | Mark Shannon | 2024-02-01 | 1 | -0/+5 |
| | |||||
* | Remove unused Py_XDECREF from _PyFrame_ClearExceptCode (GH-106158) | Anders Kaseorg | 2024-02-01 | 1 | -1/+0 |
| | | | | | | frame->frame_obj was set to NULL a few lines earlier. Signed-off-by: Anders Kaseorg <andersk@mit.edu> | ||||
* | gh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817) | Sam Gross | 2024-02-01 | 1 | -73/+29 |
| | | | | | | | | | | | | | | The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build. Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs. A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like `gc.set_threshold(1, 0, 0)`. | ||||
* | gh-112606: Use pthread_cond_timedwait_relative_np() in parking_lot.c when ↵ | Matt Prodani | 2024-01-30 | 1 | -1/+5 |
| | | | | | | | available (#112616) Add a configure define for HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP and replaces pthread_cond_timedwait() with pthread_cond_timedwait_relative_np() for relative time when supported in semaphore waiting logic. | ||||
* | gh-103323: Remove current_fast_get() unused parameter (#114593) | Victor Stinner | 2024-01-30 | 1 | -26/+24 |
| | | | | The current_fast_get() static inline function doesn't use its 'runtime' parameter, so just remove it. | ||||
* | gh-114569: Use PyMem_* APIs for non-PyObjects in compiler (#114587) | Erlend E. Aasland | 2024-01-29 | 2 | -16/+15 |
| | |||||
* | gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686) | Nikita Sobolev | 2024-01-29 | 1 | -1/+1 |
| | |||||
* | GH-113464: Add a JIT backend for tier 2 (GH-113465) | Brandt Bucher | 2024-01-29 | 4 | -1/+407 |
| | | | | | | | Add an option (--enable-experimental-jit for configure-based builds or --experimental-jit for PCbuild-based ones) to build an *experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf). See Tools/jit/README.md for more information on how to install the required build-time tooling. | ||||
* | gh-113055: Use pointer for interp->obmalloc state (gh-113412) | Neil Schemenauer | 2024-01-27 | 2 | -8/+22 |
| | | | | | | | | | For interpreters that share state with the main interpreter, this points to the same static memory structure. For interpreters with their own obmalloc state, it is heap allocated. Add free_obmalloc_arenas() which will free the obmalloc arenas and radix tree structures for interpreters with their own obmalloc state. Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com> | ||||
* | gh-111968: Unify freelist naming schema to Eric's suggestion (gh-114581) | Donghee Na | 2024-01-26 | 2 | -4/+4 |
| | |||||
* | gh-107901: compiler replaces POP_BLOCK instruction by NOPs before ↵ | Irit Katriel | 2024-01-25 | 1 | -1/+2 |
| | | | | optimisations (#114530) | ||||
* | gh-112529: Implement GC for free-threaded builds (#114262) | Sam Gross | 2024-01-25 | 4 | -6/+1794 |
| | | | | | | | * gh-112529: Implement GC for free-threaded builds This implements a mark and sweep GC for the free-threaded builds of CPython. The implementation relies on mimalloc to find GC tracked objects (i.e., "containers"). | ||||
* | gh-114265: remove i_loc_propagated, jump threading does not consider line ↵ | Irit Katriel | 2024-01-25 | 1 | -41/+47 |
| | | | | numbers anymore (#114535) | ||||
* | gh-114312: Collect stats for unlikely events (GH-114493) | Michael Droettboom | 2024-01-25 | 3 | -0/+30 |
| | |||||
* | Update outdated comment in ``Python/bytecodes.c`` (#114522) | Kirill Podoprigora | 2024-01-24 | 1 | -2/+2 |
| | |||||
* | GH-112354: `END_FOR` instruction to only pop one value. (GH-114247) | Mark Shannon | 2024-01-24 | 4 | -37/+39 |
| | | | | * Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops. | ||||
* | GH-113710: Add a tier 2 peephole optimization pass. (GH-114487) | Mark Shannon | 2024-01-24 | 5 | -3/+60 |
| | | | | | * Convert _LOAD_CONST to inline versions * Remove PEP 523 checks | ||||
* | gh-111964: Implement stop-the-world pauses (gh-112471) | Sam Gross | 2024-01-23 | 2 | -14/+264 |
| | | | | | | | | | | | | | | | | | The `--disable-gil` builds occasionally need to pause all but one thread. Some examples include: * Cyclic garbage collection, where this is often called a "stop the world event" * Before calling `fork()`, to ensure a consistent state for internal data structures * During interpreter shutdown, to ensure that daemon threads aren't accessing Python objects This adds the following functions to implement global and per-interpreter pauses: * `_PyEval_StopTheWorldAll()` and `_PyEval_StartTheWorldAll()` (for the global runtime) * `_PyEval_StopTheWorld()` and `_PyEval_StartTheWorld()` (per-interpreter) (The function names may change.) These functions are no-ops outside of the `--disable-gil` build. | ||||
* | gh-114083: apply optimization of LOAD_CONST instructions to the whole CFG ↵ | Irit Katriel | 2024-01-22 | 1 | -140/+179 |
| | | | | before optimize_basic_block. (#114408) | ||||
* | gh-113102: Fix typo in INSTRUMENTED_RESUME (GH-114349) | Guido van Rossum | 2024-01-22 | 2 | -2/+2 |
| | |||||
* | gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect ↵ | Nikita Sobolev | 2024-01-21 | 1 | -1/+1 |
| | | | | implementation (#114385) | ||||
* | gh-112529: Use GC heaps for GC allocations in free-threaded builds (gh-114157) | Sam Gross | 2024-01-20 | 1 | -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 Katriel | 2024-01-19 | 1 | -53/+54 |
| | | | | guarantee_lineno_for_exits (#114267) | ||||
* | gh-111968: Use per-thread freelists for generator in free-threading (gh-114189) | Donghee Na | 2024-01-18 | 4 | -4/+3 |
| | |||||
* | Delete unused macro (GH-114238) | Mark Shannon | 2024-01-18 | 1 | -3/+0 |
| | |||||
* | Update copyright years to 2024. (GH-113608) | solya0x | 2024-01-16 | 1 | -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 Na | 2024-01-16 | 5 | -28/+18 |
| | |||||
* | gh-113626: Add allow_code parameter in marshal functions (GH-113648) | Serhiy Storchaka | 2024-01-16 | 2 | -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 Shannon | 2024-01-16 | 5 | -22/+13 |
| | |||||
* | gh-111968: Use per-thread slice_cache in free-threading (gh-113972) | Donghee Na | 2024-01-15 | 2 | -3/+2 |
| | |||||
* | GH-112354: `_GUARD_IS_TRUE_POP` side-exits to target the next instruction, ↵ | Mark Shannon | 2024-01-15 | 3 | -14/+27 |
| | | | | not themselves. (GH-114078) | ||||
* | gh-113710: Add types to the interpreter DSL (#113711) | Ken Jin | 2024-01-12 | 2 | -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 Katriel | 2024-01-12 | 1 | -10/+22 |
| | | | | multiple predecessors (#113950) | ||||
* | GH-113860: Get rid of `_PyUOpExecutorObject` (GH-113954) | Brandt Bucher | 2024-01-12 | 6 | -29/+27 |
| | |||||
* | gh-111968: Use per-thread freelists for tuple in free-threading (gh-113921) | Donghee Na | 2024-01-11 | 4 | -3/+2 |
| | |||||
* | gh-113845: Fix a compiler warning in Python/suggestions.c (GH-113949) | Serhiy Storchaka | 2024-01-11 | 1 | -2/+0 |
| | |||||
* | GH-113853: Guarantee forward progress in executors (GH-113854) | Mark Shannon | 2024-01-11 | 3 | -73/+118 |
| | |||||
* | gh-107901: jump leaving an exception handler doesn't need an eval break ↵ | Irit Katriel | 2024-01-11 | 1 | -1/+1 |
| | | | | check (#113943) | ||||
* | gh-89811: Check for valid tp_version_tag in specializer (GH-113558) | Peter Lazorchak | 2024-01-11 | 1 | -1/+29 |
| | |||||
* | gh-111968: Use per-thread freelists for float in free-threading (gh-113886) | Donghee Na | 2024-01-10 | 4 | -3/+2 |
| | |||||
* | GH-113860: All executors are now defined in terms of micro ops. Convert ↵ | Mark Shannon | 2024-01-10 | 4 | -130/+111 |
| | | | | counter executor to use uops. (GH-113864) | ||||
* | gh-111968: Introduce _PyFreeListState and _PyFreeListState_GET API (gh-113584) | Donghee Na | 2024-01-09 | 5 | -17/+71 |
| | |||||
* | Fix opcode name printing in debug mode (#113870) | Guido van Rossum | 2024-01-09 | 1 | -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 Yanchii | 2024-01-09 | 1 | -0/+6 |
| | | | | (GH-113843) | ||||
* | gh-110721: Remove unused code from suggestions.c after moving PyErr_Display ↵ | Pablo Galindo Salgado | 2024-01-08 | 2 | -219/+1 |
| | | | | to use the traceback module (#113712) |