summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
* GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. ↵Mark Shannon2024-06-181-8/+31
| | | | | | | | | (#120640) * Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions. * Add LOAD_SPECIAL instruction * Reimplement `with` and `async with` statements using LOAD_SPECIAL
* GH-120619: Clean up `RETURN_VALUE` instruction (GH-120624)Mark Shannon2024-06-171-2/+5
| | | | | * Rename _POP_FRAME to _RETURN_VALUE as it returns a value as well as popping a frame. * Remove remaining _POP_FRAMEs
* gh-119180: PEP 649 compiler changes (#119361)Jelle Zijlstra2024-06-111-0/+5
|
* gh-74929: PEP 667 C API documentation (gh-119379)Alyssa Coghlan2024-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
* gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS (#119822)Jelle Zijlstra2024-05-311-29/+1
| | | | | | | | | Support 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.
* GH-119258: Handle STORE_ATTR_WITH_HINT in tier two (GH-119481)Brandt Bucher2024-05-281-1/+61
|
* GH-119476: Split _CHECK_FUNCTION_VERSION out of _CHECK_FUNCTION_EXACT_ARGS ↵Brandt Bucher2024-05-281-9/+1
| | | | (GH-119510)
* gh-119180: Add LOAD_COMMON_CONSTANT opcode (#119321)Jelle Zijlstra2024-05-221-2/+13
| | | | | | | | | | The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. 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-118095: Use broader specializations of CALL in tier 1, for better tier 2 ↵Mark Shannon2024-05-041-2/+147
| | | | | | | | | | 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-113464: Remove the extra jump via `_SIDE_EXIT` in `_EXIT_TRACE` (GH-118545)Mark Shannon2024-05-041-9/+1
|
* gh-107674: Improve performance of `sys.settrace` (GH-117133)Tian Gao2024-05-031-1/+1
| | | | | | * Check tracing in RESUME_CHECK * Only change to RESUME_CHECK if not tracing
* GH-118095: Unify the behavior of tier 2 FOR_ITER branch micro-ops (GH-118420)Mark Shannon2024-05-021-3/+1
| | | | | | * Target _FOR_ITER_TIER_TWO at POP_TOP following the matching END_FOR * Modify _GUARD_NOT_EXHAUSTED_RANGE, _GUARD_NOT_EXHAUSTED_LIST and _GUARD_NOT_EXHAUSTED_TUPLE so that they also target the POP_TOP following the matching END_FOR
* GH-117442: Check eval-breaker at start (rather than end) of tier 2 loops ↵Mark Shannon2024-05-021-11/+0
| | | | (GH-118482)
* GH-118095: Add tier 2 support for YIELD_VALUE (GH-118380)Mark Shannon2024-04-301-0/+41
|
* GH-118095: Allow a variant of RESUME_CHECK in tier 2 (GH-118286)Mark Shannon2024-04-291-0/+27
|
* GH-118095: Add dynamic exit support and FOR_ITER_GEN support to tier 2 ↵Mark Shannon2024-04-261-1/+60
| | | | (GH-118279)
* GH-118095: Handle `RETURN_GENERATOR` in tier 2 (GH-118180)Mark Shannon2024-04-251-12/+31
|
* GH-115419: Move setting the instruction pointer to error exit stubs (GH-118088)Mark Shannon2024-04-241-0/+2
|
* GH-115480: Reduce guard strength for binary ops when type of one operand is ↵Mark Shannon2024-04-221-0/+40
| | | | known already (GH-118050)
* gh-112075: Make instance attributes stored in inline "dict" thread safe ↵Dino Viehland2024-04-221-6/+4
| | | | | (#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-1/+1
| | | | | | | (#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-116202: Incorporate invalidation check into _START_EXECUTOR. (GH-118044)Mark Shannon2024-04-191-0/+4
|
* gh-117457: Regen executor cases post PR #117477 (#117559)Erlend E. Aasland2024-04-051-2/+8
|
* GH-117457: Correct pystats uop "miss" counts (GH-117477)Michael Droettboom2024-04-041-134/+536
|
* 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-5/+6
| | | | | | | | | | | | 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-116168: Remove extra `_CHECK_STACK_SPACE` uops (#117242)Peter Lazorchak2024-04-031-0/+8
| | | This merges all `_CHECK_STACK_SPACE` uops in a trace into a single `_CHECK_STACK_SPACE_OPERAND` uop that checks whether there is enough stack space for all calls included in the entire trace.
* GH-115776: Embed the values array into the object, for "normal" Python ↵Mark Shannon2024-04-021-24/+20
| | | | 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-423/+315
| | | | | 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-48/+36
|
* 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-15/+5
| | | | micro-op. (GH-116817)
* GH-116468: Use constants instead of `oparg` in stack effects when `oparg` is ↵Mark Shannon2024-03-111-34/+30
| | | | known to be a constant. (GH-116469)
* GH-113710: Fix optimization of globals using `_CHECK_FUNCTION` (GH-116460)Mark Shannon2024-03-081-2/+3
|
* gh-116381: Remove bad specializations, add fail stats (GH-116464)Ken Jin2024-03-071-55/+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-0/+90
| | | | | | | | | | | * 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-113710: Tier 2 optimizer: check the function instead of checking globals. ↵Mark Shannon2024-03-061-9/+3
| | | | (GH-116410)
* GH-115685: Split `_TO_BOOL_ALWAYS_TRUE` into micro-ops (GH-116352)Mark Shannon2024-03-051-6/+1
|
* gh-116098: Revert "gh-107674: Improve performance of `sys.settrace` ↵Tian Gao2024-03-011-1/+1
| | | | | | | (GH-114986)" (GH-116178) Revert "gh-107674: Improve performance of `sys.settrace` (GH-114986)" This reverts commit 0a61e237009bf6b833e13ac635299ee063377699.
* gh-115685: Type/values propagate for TO_BOOL in tier 2 (GH-115686)Ken Jin2024-02-291-0/+11
|
* 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-1/+1
|
* gh-115778: Add `tierN` annotation for instruction definitions (#115815)Kirill Podoprigora2024-02-231-13/+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-0/+1
| | | | | * gh-115733: Fix crash involving exhausted iterator * Add blurb
* gh-112175: Add `eval_breaker` to `PyThreadState` (#115194)Brett Simmers2024-02-201-1/+1
| | | | | | | | | | | 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-6/+0
|