summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
...
* GH-104909: Move unused cache entries from uops to macros (#107444)Guido van Rossum2023-07-311-4/+0
| | | | | | There's no need to use a dummy uop to skip unused cache entries. The macro syntax lets you write `unused/1` instead. Similarly, move `unused/5` from op `_LOAD_ATTR_INSTANCE_VALUE` to macro `LOAD_ATTR_INSTANCE_VALUE`.
* GH-106895: Raise a `ValueError` when attempting to disable events that ↵Mark Shannon2023-07-271-1/+6
| | | | cannot be disabled. (GH-107337)
* gh-106917: fix super classmethod calls to non-classmethods (#106977)Carl Meyer2023-07-241-1/+1
|
* GH-106701: Move _PyUopExecute to Python/executor.c (GH-106924)Brandt Bucher2023-07-201-26/+26
|
* gh-105481: do not auto-generate pycore_intrinsics.h (#106913)Irit Katriel2023-07-201-2/+2
|
* GH-104584: Miscellaneous fixes for -Xuops (GH-106908)Brandt Bucher2023-07-201-0/+8
|
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-181-1/+1
| | | | bytecodes.c (#106758)
* gh-106603: Make uop struct a triple (opcode, oparg, operand) (#106794)Guido van Rossum2023-07-171-5/+80
|
* gh-106581: Add 10 new opcodes by allowing `assert(kwnames == NULL)` (#106707)Guido van Rossum2023-07-171-0/+329
| | | | | | | | | | | | | By turning `assert(kwnames == NULL)` into a macro that is not in the "forbidden" list, many instructions that formerly were skipped because they contained such an assert (but no other mention of `kwnames`) are now supported in Tier 2. This covers 10 instructions in total (all specializations of `CALL` that invoke some C code): - `CALL_NO_KW_TYPE_1` - `CALL_NO_KW_STR_1` - `CALL_NO_KW_TUPLE_1` - `CALL_NO_KW_BUILTIN_O` - `CALL_NO_KW_BUILTIN_FAST` - `CALL_NO_KW_LEN` - `CALL_NO_KW_ISINSTANCE` - `CALL_NO_KW_METHOD_DESCRIPTOR_O` - `CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS` - `CALL_NO_KW_METHOD_DESCRIPTOR_FAST`
* gh-106529: Fix subtle Tier 2 edge case with list iterator (#106756)Guido van Rossum2023-07-151-2/+12
| | | | | | | | | | | | The Tier 2 opcode _IS_ITER_EXHAUSTED_LIST (and _TUPLE) didn't set it->it_seq to NULL, causing a subtle bug that resulted in test_exhausted_iterator in list_tests.py to fail when running all tests with -Xuops. The bug was introduced in gh-106696. Added this as an explicit test. Also fixed the dependencies for ceval.o -- it depends on executor_cases.c.h.
* 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.