summaryrefslogtreecommitdiffstats
path: root/Python/ceval_macros.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-106581: Project through calls (#108067)Guido van Rossum2023-08-171-0/+4
| | | | 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-1/+1
| | | | performance. (GH-108036)
* gh-106581: Split `CALL_PY_EXACT_ARGS` into uops (#107760)Guido van Rossum2023-08-161-0/+5
| | | | | | | | | | | | * 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-106701: Move _PyUopExecute to Python/executor.c (GH-106924)Brandt Bucher2023-07-201-1/+13
|
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-181-0/+1
| | | | bytecodes.c (#106758)
* gh-106581: Add 10 new opcodes by allowing `assert(kwnames == NULL)` (#106707)Guido van Rossum2023-07-171-0/+2
| | | | | | | | | | | | | 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-104584: Fix ENTER_EXECUTOR (GH-106141)Mark Shannon2023-07-031-1/+3
| | | | | | * Check eval-breaker in ENTER_EXECUTOR. * Make sure that frame->prev_instr is set before entering executor.
* gh-104584: Change DEOPT_IF in uops executor (#106146)Guido van Rossum2023-06-271-2/+1
| | | This effectively reverts bb578a0, restoring the original DEOPT_IF() macro in ceval_macros.h, and redefining it in the Tier 2 interpreter. We can get rid of the PREDICTED() macros there as well!
* gh-104584: Fix assert in DEOPT macro -- should fix buildbot (#106131)Guido van Rossum2023-06-271-1/+2
|
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-271-1/+9
| | | | | 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.
* gh-105481: add HAS_JUMP flag to opcode metadata (#105791)Irit Katriel2023-06-141-0/+6
|
* GH-100987: Allow objects other than code objects as the "executable" of an ↵Mark Shannon2023-06-141-5/+7
| | | | | | | | | | internal frame. (GH-105727) * Add table describing possible executable classes for out-of-process debuggers. * Remove shim code object creation code as it is no longer needed. * Make lltrace a bit more robust w.r.t. non-standard frames.
* gh-105481: add flags to each instr in the opcode metadata table, to replace ↵Irit Katriel2023-06-131-0/+5
| | | | opcode.hasarg/hasname/hasconst (#105482)
* GH-104610: Remove the use of `PREDICT` macros. (GH-104651)Mark Shannon2023-06-071-15/+0
|
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-1/+0
|
* GH-104580: Don't cache eval breaker in interpreter (GH-104581)Mark Shannon2023-05-181-1/+1
| | | Move eval-breaker to the front of the interpreter state.
* GH-104405: Add missing PEP 523 checks (GH-104406)Brandt Bucher2023-05-121-0/+1
|
* GH-103082: Filter LINE events in VM, to simplify tool implementation. ↵Mark Shannon2023-05-121-3/+2
| | | | | | | | (GH-104387) When monitoring LINE events, instrument all instructions that can have a predecessor on a different line. Then check that the a new line has been hit in the instrumentation code. This brings the behavior closer to that of 3.11, simplifying implementation and porting of tools.
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-45/+16
| | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs
* gh-101975: Fixed a potential SegFault on garbage collection (GH-102803)gaogaotiantian2023-03-181-0/+1
|
* GH-102300: Reuse objects with refcount == 1 in float specialized binary ops. ↵Mark Shannon2023-03-131-0/+20
| | | | (GH-102301)
* gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)Steve Dower2023-02-201-9/+9
| | | | | | * gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h * Make cases_generator correct on Windows
* gh-98831: Modernize CALL and family (#101508)Guido van Rossum2023-02-081-0/+3
| | | Includes a slight improvement to `DECREF_INPUTS()`.
* GH-98831: Move assorted macros from ceval.h to a new header (#101116)Guido van Rossum2023-01-181-0/+349