summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS ↵Jelle Zijlstra2024-06-011-9/+26
| | | | | | | | | | | | | (#119822) (#119889) dSupport non-dict globals in LOAD_FROM_DICT_OR_GLOBALS The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated, but that seems like it may get hairy since the two operations have different operands. This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too, and we should backport to 3.13 and 3.12 if possible. (cherry picked from commit 80a4e3899420faaa012c82b4e82cdb6675a6a944)
* [3.13] gh-74929: PEP 667 C API documentation (gh-119892)Miss Islington (bot)2024-06-011-1/+1
| | | | | | | | | | | * Add docs for new APIs * Add soft-deprecation notices * Add What's New porting entries * Update comments referencing `PyFrame_LocalsToFast()` to mention the proxy instead * Other related cleanups found when looking for refs to the deprecated APIs (cherry picked from commit 3859e09e3d92d004978dd838f0511364e7edfb94) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-118692: Avoid creating unnecessary StopIteration instances for ↵Miss Islington (bot)2024-05-241-6/+2
| | | | | | | | | | monitoring (GH-119216) (#119497) * gh-118692: Avoid creating unnecessary StopIteration instances for monitoring (GH-119216) (cherry picked from commit 6e9863d7a3516cc76d6ce13923b15620499f3855) --------- Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-118414: Fix assertion in YIELD_VALUE when tracing lines or instrs (#118683)Tian Gao2024-05-071-1/+3
|
* GH-115709: Invalidate executors when a local variable is changed via ↵Mark Shannon2024-05-061-0/+3
| | | | | frame.f_locals (#118639) Also fix unrelated assert in debug Tier2/JIT builds.
* GH-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵Mark Shannon2024-05-041-34/+201
| | | | | | | | | | support of calls. (GH-118322) * Add CALL_PY_GENERAL, CALL_BOUND_METHOD_GENERAL and call CALL_NON_PY_GENERAL specializations. * Remove CALL_PY_WITH_DEFAULTS specialization * Use CALL_NON_PY_GENERAL in more cases when otherwise failing to specialize
* gh-107674: Improve performance of `sys.settrace` (GH-117133)Tian Gao2024-05-031-15/+16
| | | | | | * Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing
* GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵Mark Shannon2024-05-021-7/+9
| | | | (GH-118482)
* GH-118095: Make invalidating and clearing executors memory safe (GH-118459)Mark Shannon2024-05-011-3/+9
|
* gh-118335: Configure Tier 2 interpreter at build time (#118339)Guido van Rossum2024-05-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | The code for Tier 2 is now only compiled when configured with `--enable-experimental-jit[=yes|interpreter]`. We drop support for `PYTHON_UOPS` and -`Xuops`, but you can disable the interpreter or JIT at runtime by setting `PYTHON_JIT=0`. You can also build it without enabling it by default using `--enable-experimental-jit=yes-off`; enable with `PYTHON_JIT=1`. On Windows, the `build.bat` script supports `--experimental-jit`, `--experimental-jit-off`, `--experimental-interpreter`. In the C code, `_Py_JIT` is defined as before when the JIT is enabled; the new variable `_Py_TIER2` is defined when the JIT *or* the interpreter is enabled. It is actually a bitmask: 1: JIT; 2: default-off; 4: interpreter.
* gh-117657: Don't specialize RESUME_CHECK when specialization is disabled ↵Ken Jin2024-04-301-0/+2
| | | | (GH-118349)
* gh-117657: Fix small issues with instrumentation and TSAN (#118064)Dino Viehland2024-04-301-1/+1
| | | Small TSAN fixups for instrumentation
* GH-118095: Add tier 2 support for YIELD_VALUE (GH-118380)Mark Shannon2024-04-301-4/+14
|
* GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 ↵Mark Shannon2024-04-261-16/+41
| | | | (GH-118279)
* GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)Mark Shannon2024-04-251-28/+12
|
* gh-112075: Make instance attributes stored in inline "dict" thread safe ↵Dino Viehland2024-04-221-8/+5
| | | | | (#114742) Make instance attributes stored in inline "dict" thread safe on free-threaded builds
* gh-116818: Make `sys.settrace`, `sys.setprofile`, and monitoring thread-safe ↵Dino Viehland2024-04-191-5/+13
| | | | | | | (#116775) Makes sys.settrace, sys.setprofile, and monitoring generally thread-safe. Mostly uses a stop-the-world approach and synchronization around the code object's _co_instrumentation_version. There may be a little bit of extra synchronization around the monitoring data that's required to be TSAN clean.
* gh-112075: Make _PyDict_LoadGlobal thread safe (#117529)Dino Viehland2024-04-041-1/+0
| | | Make _PyDict_LoadGlobal threadsafe
* gh-116968: Reimplement Tier 2 counters (#117144)Guido van Rossum2024-04-041-50/+37
| | | | | | | | | | | | Introduce a unified 16-bit backoff counter type (``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer and the Tier 2 optimizer. The API used for adaptive specialization counters is changed but the behavior is (supposed to be) identical. The behavior of the Tier 2 counters is changed: - There are no longer dynamic thresholds (we never varied these). - All counters now use the same exponential backoff. - The counter for ``JUMP_BACKWARD`` starts counting down from 16. - The ``temperature`` in side exits starts counting down from 64.
* GH-115776: Embed the values array into the object, for "normal" Python ↵Mark Shannon2024-04-021-29/+25
| | | | objects. (GH-116115)
* gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)Sam Gross2024-03-291-12/+7
| | | Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
* GH-116422: Tier2 hot/cold splitting (GH-116813)Mark Shannon2024-03-261-57/+65
| | | | | Splits the "cold" path, deopts and exits, from the "hot" path, reducing the size of most jitted instructions, at the cost of slower exits.
* GH-115802: Reduce the size of _INIT_CALL_PY_EXACT_ARGS. (GH-116856)Mark Shannon2024-03-151-16/+12
|
* gh-116735: Use `MISSING` for `CALL` event if argument is absent (GH-116737)Tian Gao2024-03-151-1/+1
|
* GH-116422: Modify a few uops so that they can be supported by tier 2 with ↵Mark Shannon2024-03-151-17/+15
| | | | hot/cold splitting (GH-116832)
* GH-116422: Factor out eval breaker checks at end of calls into its own ↵Mark Shannon2024-03-141-186/+244
| | | | micro-op. (GH-116817)
* gh-116760: Fix pystats for trace attempts (GH-116761)Michael Droettboom2024-03-131-1/+0
| | | | | | | | There are now at least two bytecodes that may attempt to optimize, JUMP_BACK, and more recently, COLD_EXIT. Only the JUMP_BACK was counting the attempt in the stats. This moves that counter to uop_optimize itself so it should always happen no matter where it is called from.
* gh-116626: Emit `CALL` events for all `INSTRUMENTED_CALL_FUNCTION_EX` ↵Tian Gao2024-03-131-14/+14
| | | | (GH-116627)
* GH-116468: Use constants instead of `oparg` in stack effects when `oparg` is ↵Mark Shannon2024-03-111-39/+35
| | | | known to be a constant. (GH-116469)
* gh-116381: Remove bad specializations, add fail stats (GH-116464)Ken Jin2024-03-071-67/+4
| | | * Remove bad specializations, add fail stats
* gh-116437: Use new C API PyDict_Pop() to simplify the code (GH-116438)Serhiy Storchaka2024-03-071-7/+7
|
* gh-116381: Specialize CONTAINS_OP (GH-116385)Ken Jin2024-03-061-2/+132
| | | | | | | | | | | * Specialize CONTAINS_OP * 📜🤖 Added by blurb_it. * Add PyAPI_FUNC for JIT --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* GH-115685: Split `_TO_BOOL_ALWAYS_TRUE` into micro-ops (GH-116352)Mark Shannon2024-03-051-8/+15
|
* gh-116098: Revert "gh-107674: Improve performance of `sys.settrace` ↵Tian Gao2024-03-011-17/+16
| | | | | | | (GH-114986)" (GH-116178) Revert "gh-107674: Improve performance of `sys.settrace` (GH-114986)" This reverts commit 0a61e237009bf6b833e13ac635299ee063377699.
* gh-115999: Disable the specializing adaptive interpreter in free-threaded ↵Brett Simmers2024-03-011-0/+55
| | | | | builds (#116013) For now, disable all specialization when the GIL might be disabled.
* GH-115802: JIT "small" code for Windows (GH-115964)Brandt Bucher2024-02-291-4/+4
|
* gh-107674: Improve performance of `sys.settrace` (GH-114986)Tian Gao2024-02-281-16/+17
|
* gh-115778: Add `tierN` annotation for instruction definitions (#115815)Kirill Podoprigora2024-02-231-35/+0
| | | | | This replaces the old `TIER_{ONE,TWO}_ONLY` macros. Note that `specialized` implies `tier1`. Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-115651: Convert `LOAD_MODULE_ATTR` into `LOAD_INLINE_CONST` when the ↵Mark Shannon2024-02-221-2/+2
| | | | module is itself a constant. (GH-115711)
* gh-115733: Fix crash involving exhausted list iterator (#115740)Sam Gross2024-02-201-1/+1
| | | | | * gh-115733: Fix crash involving exhausted iterator * Add blurb
* gh-112175: Add `eval_breaker` to `PyThreadState` (#115194)Brett Simmers2024-02-201-3/+3
| | | | | | | | | | | This change adds an `eval_breaker` field to `PyThreadState`. The primary motivation is for performance in free-threaded builds: with thread-local eval breakers, we can stop a specific thread (e.g., for an async exception) without interrupting other threads. The source of truth for the global instrumentation version is stored in the `instrumentation_version` field in PyInterpreterState. Threads usually read the version from their local `eval_breaker`, where it continues to be colocated with the eval breaker bits.
* gh-115687: Split up guards from COMPARE_OP (GH-115688)Ken Jin2024-02-201-40/+58
|
* GH-115457: Support splitting and replication of micro ops. (GH-115558)Mark Shannon2024-02-201-11/+7
|
* GH-112354: Initial implementation of warm up on exits and trace-stitching ↵Mark Shannon2024-02-201-13/+18
| | | | (GH-114142)
* gh-114626: add PyCFunctionFast and PyCFunctionFastWithKeywords (GH-114627)David Hewitt2024-02-151-7/+7
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-112087: Make __sizeof__ and listiter_{len, next} to be threadsafe (gh-114843)Donghee Na2024-02-141-1/+4
|
* GH-113710: Backedge counter improvements. (GH-115166)Mark Shannon2024-02-131-13/+16
|
* gh-114058: Foundations of the Tier2 redundancy eliminator (GH-115085)Ken Jin2024-02-131-1/+1
| | | | | | | --------- Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com> Co-authored-by: Jules <57632293+JuliaPoo@users.noreply.github.com> Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
* GH-114695: Add `sys._clear_internal_caches` (GH-115152)Brandt Bucher2024-02-121-18/+7
|
* GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)Mark Shannon2024-01-241-22/+13
| | | | * Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.