summaryrefslogtreecommitdiffstats
path: root/Python/executor_cases.c.h
Commit message (Collapse)AuthorAgeFilesLines
* GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)Brandt Bucher2023-09-131-21/+119
|
* gh-109216: Fix possible memory leak in `BUILD_MAP` (#109257)Nikita Sobolev2023-09-121-3/+0
|
* gh-109214: Rename SAVE_IP to _SET_IP, and similar (#109285)Guido van Rossum2023-09-111-7/+7
| | | | | | | | * Rename SAVE_IP to _SET_IP * Rename EXIT_TRACE to _EXIT_TRACE * Rename SAVE_CURRENT_IP to _SAVE_CURRENT_IP * Rename INSERT to _INSERT (This is for Ken Jin's abstract interpreter) * Rename IS_NONE to _IS_NONE * Rename JUMP_TO_TOP to _JUMP_TO_TOP
* gh-109118: Fix runtime crash when NameError happens in PEP 695 function ↵Jelle Zijlstra2023-09-091-3/+39
| | | | (#109123)
* GH-108614: Unbreak emscripten build (GH-109132)Mark Shannon2023-09-081-2/+2
|
* GH-108614: Add `RESUME_CHECK` instruction (GH-108630)Mark Shannon2023-09-071-16/+9
|
* GH-108614: Remove `TIER_ONE` and `TIER_TWO` from `_PUSH_FRAME` (GH-108725)Mark Shannon2023-09-041-9/+11
|
* GH-108614: Remove non-debug uses of `#if TIER_ONE` and `#if TIER_TWO` from ↵Mark Shannon2023-08-311-11/+12
| | | | `_POP_FRAME` op. (GH-108685)
* GH-106581: Fix instrumentation in tier 2 (GH-108493)Brandt Bucher2023-08-251-4/+6
|
* gh-106581: Split CALL_BOUND_METHOD_EXACT_ARGS into uops (#108462)Guido van Rossum2023-08-251-0/+26
| | | Instead of using `GO_TO_INSTRUCTION(CALL_PY_EXACT_ARGS)` we just add the macro elements of the latter to the macro for the former. This requires lengthening the uops array in struct opcode_macro_expansion. (It also required changes to stacking.py that were merged already.)
* gh-106581: Project through calls (#108067)Guido van Rossum2023-08-171-1/+45
| | | | This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.
* GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for ↵Mark Shannon2023-08-171-2/+1
| | | | performance. (GH-108036)
* gh-106581: Split `CALL_PY_EXACT_ARGS` into uops (#107760)Guido van Rossum2023-08-161-9/+89
| | | | | | | | | | | | * Split `CALL_PY_EXACT_ARGS` into uops This is only the first step for doing `CALL` in Tier 2. The next step involves tracing into the called code object and back. After that we'll have to do the remaining `CALL` specialization. Finally we'll have to deal with `KW_NAMES`. Note: this moves setting `frame->return_offset` directly in front of `DISPATCH_INLINED()`, to make it easier to move it into `_PUSH_FRAME`.
* gh-107557: Setup abstract interpretation (#107847)Ken Jin2023-08-151-0/+9
| | | | Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com> Co-authored-by: Jules <57632293+juliapoo@users.noreply.github.com>
* gh-106797: Remove warning logs from Python/generated_cases.c.h and ↵Dong-hee Na2023-08-121-1/+1
| | | | | executor_cases.c.h (gh-107889) gh-106797: Remove warning logs from Python/generated_cases.c.h
* GH-106485: Dematerialize instance dictionaries when possible (GH-106539)Brandt Bucher2023-08-091-2/+4
|
* GH-105848: Simplify the arrangement of CALL's stack (GH-107788)Brandt Bucher2023-08-091-120/+111
|
* GH-107596: Specialize str[int] (GH-107597)Brandt Bucher2023-08-081-0/+23
|
* gh-106812: Refactor cases_generator to allow uops with array stack effects ↵Guido van Rossum2023-08-041-207/+404
| | | | | (#107564) Introducing a new file, stacking.py, that takes over several responsibilities related to symbolic evaluation of push/pop operations, with more generality.
* Use tstate->interp to get the interpreter state in bytecodes.c (GH-107506)Brandt Bucher2023-07-311-2/+2
|
* 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
|