summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-106529: Split FOR_ITER_{LIST,TUPLE} into uops (#106696)Guido van Rossum2023-07-141-1/+75
| | | | Also rename `_ITER_EXHAUSTED_XXX` to `_IS_ITER_EXHAUSTED_XXX` to make it clear this is a test.
* gh-106701: Move the hand-written Tier 2 uops to bytecodes.c (#106702)Guido van Rossum2023-07-131-0/+36
| | | | | | | This moves EXIT_TRACE, SAVE_IP, JUMP_TO_TOP, and _POP_JUMP_IF_{FALSE,TRUE} from ceval.c to bytecodes.c. They are no less special than before, but this way they are discoverable o the copy-and-patch tooling.
* GH-104909: Split `LOAD_ATTR_INSTANCE_VALUE` into micro-ops (GH-106678)Mark Shannon2023-07-131-0/+18
|
* gh-106529: Split FOR_ITER_RANGE into uops (#106638)Guido van Rossum2023-07-121-0/+34
| | | | For an example of what this does for Tier 1 and Tier 2, see https://github.com/python/cpython/issues/106529#issuecomment-1631649920
* gh-106656: Remove --emit-line-directives from regen-cases (#106657)Guido van Rossum2023-07-121-314/+0
| | | | | | | If you prefer to see `#line` directives in generated_cases.c.h, run ``` make regen-cases CASESFLAG=-l ``` But please don't commit the result.
* GH-104909: Break LOAD_GLOBAL specializations in micro-ops. (GH-106677)Mark Shannon2023-07-121-144/+170
|
* gh-106307: C API: Add PyMapping_GetOptionalItem() function (GH-106308)Serhiy Storchaka2023-07-111-275/+207
| | | | Also add PyMapping_GetOptionalItemString() function.
* GH-106529: Define POP_JUMP_IF_NONE in terms of POP_JUMP_IF_TRUE (GH-106599)Mark Shannon2023-07-111-48/+66
|
* gh-106572: Convert PyObject_DelAttr() to a function (#106611)Victor Stinner2023-07-111-1/+1
| | | | | | | | * Convert PyObject_DelAttr() and PyObject_DelAttrString() macros to functions. * Add PyObject_DelAttr() and PyObject_DelAttrString() functions to the stable ABI. * Replace PyObject_SetAttr(obj, name, NULL) with PyObject_DelAttr(obj, name).
* GH-100288: regen cases after #105990 (#106589)Kumar Aditya2023-07-101-7/+7
|
* GH-100288: Specialize LOAD_ATTR for simple class attributes. (#105990)Mark Shannon2023-07-101-35/+35
| | | * Add two more specializations of LOAD_ATTR.
* gh-104584: Allow unspecialized instructions in superblocks (#106497)Guido van Rossum2023-07-071-126/+430
| | | | | | | | | | | | | | | | This adds several of unspecialized opcodes to superblocks: TO_BOOL, BINARY_SUBSCR, STORE_SUBSCR, UNPACK_SEQUENCE, LOAD_GLOBAL, LOAD_ATTR, COMPARE_OP, BINARY_OP. While we may not want that eventually, for now this helps finding bugs. There is a rudimentary test checking for UNPACK_SEQUENCE. Once we're ready to undo this, that would be simple: just replace the call to variable_used_unspecialized with a call to variable_used (as shown in a comment). Or add individual opcdes to FORBIDDEN_NAMES_IN_UOPS.
* GH-106057: Handle recursion errors in inline class calls properly. (GH-106108)Mark Shannon2023-07-071-10/+10
|
* GH-104584: Fix ENTER_EXECUTOR (GH-106141)Mark Shannon2023-07-031-22/+22
| | | | | | * Check eval-breaker in ENTER_EXECUTOR. * Make sure that frame->prev_instr is set before entering executor.
* gh-106290: Fix edge cases around uops (#106319)Guido van Rossum2023-07-031-135/+156
| | | | | | | | | | - Tweak uops debugging output - Fix the bug from gh-106290 - Rename `SET_IP` to `SAVE_IP` (per https://github.com/faster-cpython/ideas/issues/558) - Add a `SAVE_IP` uop at the start of the trace (ditto) - Allow `unbound_local_error`; this gives us uops for `LOAD_FAST_CHECK`, `LOAD_CLOSURE`, and `DELETE_FAST` - Longer traces - Support `STORE_FAST_LOAD_FAST`, `STORE_FAST_STORE_FAST` - Add deps on pycore_uops.h to Makefile(.pre.in)
* gh-106267: Add type cast to generated code (#106289)Kirill Podoprigora2023-06-301-1/+1
|
* gh-106023: Update code using _PyObject_FastCall() (#106257)Victor Stinner2023-06-301-135/+135
| | | Replace _PyObject_FastCall() calls with PyObject_Vectorcall().
* GH-106008: Make implicit boolean conversions explicit (GH-106003)Brandt Bucher2023-06-291-241/+331
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-127/+127
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* gh-104584: Add #line directives to executor_cases.c.h (#106126)Guido van Rossum2023-06-271-0/+254
|
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-271-0/+1606
Added a new, experimental, tracing optimizer and interpreter (a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is infrastructure so we can experiment with optimizing passes. To enable it, pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set ``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no debug output and 4 is excessively verbose). All of this code is likely to change dramatically before the 3.13 feature freeze. But this is a first step.