summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_code.h
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-106550: Fix sign conversion in pycore_code.h (GH-112613) (#112696)Miss Islington (bot)2023-12-041-10/+12
| | | | | | | | | gh-106550: Fix sign conversion in pycore_code.h (GH-112613) Fix sign conversion in pycore_code.h: use unsigned integers and cast explicitly when needed. (cherry picked from commit a74902a14cdc0952abf7bfabcf529c9b132c5cce) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270)Carl Meyer2023-05-111-5/+2
|
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-0/+1
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-103978: avoid using 'class' as an identifier (#103979)Carl Meyer2023-04-281-1/+1
|
* gh-87729: specialize LOAD_SUPER_ATTR_METHOD (#103809)Carl Meyer2023-04-251-0/+11
|
* GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵Mark Shannon2023-04-121-26/+4
| | | | | | | | | | (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-88691: Shrink the CALL caches (GH-103230)Brandt Bucher2023-04-051-1/+0
|
* GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)Brandt Bucher2023-03-291-2/+0
|
* GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)Brandt Bucher2023-03-231-1/+1
|
* GH-90997: Shrink the LOAD_GLOBAL caches (#102569)Brandt Bucher2023-03-111-1/+1
|
* GH-87849: Simplify stack effect of SEND and specialize it for generators and ↵Mark Shannon2023-02-131-0/+7
| | | | coroutines. (GH-101788)
* GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)Mark Shannon2023-01-161-1/+1
|
* GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924)Mark Shannon2023-01-111-1/+21
|
* GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code ↵Mark Shannon2022-12-141-24/+24
| | | | unit. (GH-100223)
* GH-98522: Add version number to code objects. (GH-98525)Mark Shannon2022-12-091-0/+2
| | | | | | * Add version number to code object for better versioning of functions. * Improves specialization for closures and list comprehensions.
* GH-91054: Add code object watchers API (GH-99859)Itamar Ostricher2022-12-021-0/+2
| | | | | | * Add API to allow extensions to set callback function on creation and destruction of PyCodeObject Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
* GH-98831: Add `macro` and `op` and their implementation to DSL (#99495)Guido van Rossum2022-11-231-0/+6
| | | | | | | | | | | | | | 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-99298: Clean up attribute specializations (GH-99398)Brandt Bucher2022-11-171-3/+3
|
* GH-96421: Insert shim frame on entry to interpreter (GH-96319)Mark Shannon2022-11-101-0/+10
| | | | | | * 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-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)Brandt Bucher2022-11-091-12/+33
|
* GH-96793: Specialize FOR_ITER for generators. (GH-98772)Mark Shannon2022-11-071-1/+1
|
* GH-98686: Quicken everything (GH-98687)Brandt Bucher2022-11-021-26/+6
|
* GH-90997: Improve inline cache performance for MSVC (GH-96781)Brandt Bucher2022-09-151-74/+19
|
* GH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)Ken Jin2022-08-171-0/+1
|
* GH-94739: Mark stacks of exception handling blocks for setting ↵Mark Shannon2022-07-181-0/+13
| | | | frame.f_lineno in the debugger. (GH-94958)
* GH-93841: Allow stats to be turned on and off, cleared and dumped at ↵Mark Shannon2022-06-211-8/+8
| | | | runtime. (GH-93843)
* GH-91432: Specialize FOR_ITER (GH-91713)Dennis Sweeney2022-06-211-0/+7
| | | | | * Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations. * Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
* gh-87347: Add parenthesis around macro arguments (#93915)Victor Stinner2022-06-201-5/+5
| | | Add unit test on Py_MEMBER_SIZE() and some other macros.
* GH-93516: Speedup line number checks when tracing. (GH-93763)Mark Shannon2022-06-201-0/+29
| | | | * Use a lookup table to reduce overhead of getting line numbers during tracing.
* GH-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` (GH-93430)Ken Jin2022-06-141-7/+5
|
* Shrink the LOAD_METHOD cache by one codeunit. (#93537)Mark Shannon2022-06-071-1/+0
|
* GH-93354: Use exponential backoff to avoid excessive specialization ↵Mark Shannon2022-05-311-3/+44
| | | | attempts. (GH-93355)
* GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` ↵Mark Shannon2022-05-271-0/+5
| | | | (GH-93284)
* GH-90690: Remove `PRECALL` instruction (GH-92925)Mark Shannon2022-05-191-8/+0
|
* Improve object stats (#92845)Mark Shannon2022-05-161-49/+0
| | | | | * Add incref/decref stats * Show ratios for allocation in summary
* Add more stats for freelist use and allocations. (GH-92211)Mark Shannon2022-05-031-0/+8
|
* gh-89479: Export _Py_GetSpecializationStats() internal function (#92011)Victor Stinner2022-04-281-2/+3
| | | | | | When Python is built with "./configure --enable-pystats" (if the Py_STATS macro is defined), the _Py_GetSpecializationStats() function must be exported, since it's used by the _opcode extension which is built as a shared library.
* GH-88116: Use a compact format to represent end line and column offsets. ↵Mark Shannon2022-04-211-14/+35
| | | | | | | | | | | | (GH-91666) * Stores all location info in linetable to conform to PEP 626. * Remove column table from code objects. * Remove end-line table from code objects. * Document new location table format
* Merge deoptimization blocks in interpreter (GH-32155)Mark Shannon2022-03-301-0/+2
|
* bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)Dennis Sweeney2022-03-251-1/+1
| | | | | * Don't deopt if refcounts are too big * Detect more at specialization time
* bpo-46841: Quicken code in-place (GH-31888)Brandt Bucher2022-03-211-12/+5
| | | | | | | | | | | | | | | | | | | * Moves the bytecode to the end of the corresponding PyCodeObject, and quickens it in-place. * Removes the almost-always-unused co_varnames, co_freevars, and co_cellvars member caches * _PyOpcode_Deopt is a new mapping from all opcodes to their un-quickened forms. * _PyOpcode_InlineCacheEntries is renamed to _PyOpcode_Caches * _Py_IncrementCountAndMaybeQuicken is renamed to _PyCode_Warmup * _Py_Quicken is renamed to _PyCode_Quicken * _co_quickened is renamed to _co_code_adaptive (and is now a read-only memoryview). * Do not emit unused nonzero opargs anymore in the compiler.
* bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742)Brandt Bucher2022-03-081-0/+6
|
* bpo-46841: Use inline caching for calls (GH-31709)Brandt Bucher2022-03-071-115/+26
|
* bpo-46903: Handle str-subclasses in virtual instance dictionaries. (GH-31658)Mark Shannon2022-03-041-0/+1
|
* bpo-46841: Use inline caching for attribute accesses (GH-31640)Brandt Bucher2022-03-031-25/+112
|
* bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618)Mark Shannon2022-03-011-1/+10
|
* bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)Brandt Bucher2022-03-011-4/+12
|
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-281-9/+48
|
* bpo-46841: Use inline caching for `UNPACK_SEQUENCE` (GH-31591)Brandt Bucher2022-02-281-1/+8
|
* Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)Kumar Aditya2022-02-261-1/+1
|