summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
Commit message (Collapse)AuthorAgeFilesLines
...
* GH-99729: Unlink frames before clearing them (GH-100030)Brandt Bucher2022-12-061-1/+4
|
* gh-89189: More compact range iterator (GH-27986)Serhiy Storchaka2022-11-301-3/+4
|
* GH-98831: Add `macro` and `op` and their implementation to DSL (#99495)Guido van Rossum2022-11-231-19/+13
| | | | | | | | | | | | | | Newly supported interpreter definition syntax: - `op(NAME, (input_stack_effects -- output_stack_effects)) { ... }` - `macro(NAME) = OP1 + OP2;` Also some other random improvements: - Convert `WITH_EXCEPT_START` to use stack effects - Fix lexer to balk at unrecognized characters, e.g. `@` - Fix moved output names; support object pointers in cache - Introduce `error()` method to print errors - Introduce read_uint16(p) as equivalent to `*p` Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* GH-98831: Refactor and fix cases generator (#99526)Guido van Rossum2022-11-181-38/+25
| | | | Also complete cache effects for BINARY_SUBSCR family.
* GH-99298: Clean up attribute specializations (GH-99398)Brandt Bucher2022-11-171-10/+2
|
* GH-98686: Get rid of BINARY_OP_GENERIC and COMPARE_OP_GENERIC (GH-99399)Brandt Bucher2022-11-171-31/+20
|
* Add a macro for "inlining" new frames (GH-99490)Brandt Bucher2022-11-171-43/+9
|
* GH-98831: Implement basic cache effects (#99313)Guido van Rossum2022-11-161-39/+30
|
* gh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code ↵Hood Chatham2022-11-151-3/+3
| | | | paths (#99461)
* GH-98831: Remove all remaining DISPATCH() calls from bytecodes.c (#99271)Guido van Rossum2022-11-101-94/+88
| | | | | Also mark those opcodes that have no stack effect as such. Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* GH-99298: Don't perform jumps before error handling (GH-99299)Brandt Bucher2022-11-101-15/+19
|
* GH-96421: Insert shim frame on entry to interpreter (GH-96319)Mark Shannon2022-11-101-80/+61
| | | | | | * Adds EXIT_INTERPRETER instruction to exit PyEval_EvalDefault() * Simplifies RETURN_VALUE, YIELD_VALUE and RETURN_GENERATOR instructions as they no longer need to check for entry frames.
* gh-99300: Use Py_NewRef() in Python/ceval.c (#99318)Victor Stinner2022-11-101-56/+30
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in Python/ceval.c and related files.
* GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)Brandt Bucher2022-11-091-207/+116
|
* GH-98831: Simple input-output stack effects for bytecodes.c (#99120)Guido van Rossum2022-11-081-192/+88
|
* GH-96793: Specialize FOR_ITER for generators. (GH-98772)Mark Shannon2022-11-071-4/+40
|
* GH-98831: Implement super-instruction generation (#99084)Guido van Rossum2022-11-061-61/+6
| | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)Guido van Rossum2022-11-051-7/+16
| | | Also tweak the labels near the end of bytecodes.c.
* GH-98831: Add some macros definitions to bytecodes.c to reduce IDE warnings. ↵Mark Shannon2022-11-041-2/+29
| | | | (#99093)
* GH-98831: Auto-generate PREDICTED() macro calls (#99102)Guido van Rossum2022-11-041-16/+0
| | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* GH-96793: Implement PEP 479 in bytecode. (GH-99006)Mark Shannon2022-11-031-0/+43
| | | | | * Handle converting StopIteration to RuntimeError in bytecode. * Add custom instruction for converting StopIteration into RuntimeError.
* GH-98831: "Generate" the interpreter (#98830)Guido van Rossum2022-11-031-0/+4006
The switch cases (really TARGET(opcode) macros) have been moved from ceval.c to generated_cases.c.h. That file is generated from instruction definitions in bytecodes.c (which impersonates a C file so the C code it contains can be edited without custom support in e.g. VS Code). The code generator lives in Tools/cases_generator (it has a README.md explaining how it works). The DSL used to describe the instructions is a work in progress, described in https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md. This is surely a work-in-progress. An easy next step could be auto-generating super-instructions. **IMPORTANT: Merge Conflicts** If you get a merge conflict for instruction implementations in ceval.c, your best bet is to port your changes to bytecodes.c. That file looks almost the same as the original cases, except instead of `TARGET(NAME)` it uses `inst(NAME)`, and the trailing `DISPATCH()` call is omitted (the code generator adds it automatically).