summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_code.h
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] GH-94739: Backport GH-94958 to 3.11 (#94965)Mark Shannon2022-07-251-0/+13
|
* [3.11] GH-93354: Use exponential backoff to avoid excessive specialization ↵Mark Shannon2022-06-301-3/+44
| | | | | | attempts (GH-93355) (GH-93379) Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing ↵Mark Shannon2022-06-221-0/+29
| | | | | (GH-94127) Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* 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
|
* bpo-45316: Move private PyCode C API to internal C API (GH-31576)Victor Stinner2022-02-251-18/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename private functions (no exported), add an underscore prefix: * PyLineTable_InitAddressRange() => _PyLineTable_InitAddressRange() * PyLineTable_NextAddressRange() => _PyLineTable_NextAddressRange() * PyLineTable_PreviousAddressRange() => _PyLineTable_PreviousAddressRange() Move private functions to the internal C API: * _PyCode_Addr2EndLine() * _PyCode_Addr2EndOffset() * _PyCode_Addr2Offset() * _PyCode_InitAddressRange() * _PyCode_InitEndAddressRange( * _PyLineTable_InitAddressRange() * _PyLineTable_NextAddressRange() * _PyLineTable_PreviousAddressRange() No longer export the following internal functions: * _PyCode_GetVarnames() * _PyCode_GetCellvars() * _PyCode_GetFreevars() * _Py_GetSpecializationStats() Add "extern" to pycore_code.h functions to identify them more easiliy (they are still not exported).
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-251-1/+8
|
* bpo-44337: Shrink the LOAD_ATTR/STORE_ATTR caches (GH-31517)Brandt Bucher2022-02-231-1/+1
|
* Move call specializations from CALL to PRECALL. (GH-31496)Mark Shannon2022-02-221-1/+3
|
* bpo-46702: Specialize UNPACK_SEQUENCE (GH-31240)Brandt Bucher2022-02-161-0/+2
|
* bpo-46430: Intern strings in deep-frozen modules (GH-30683)Kumar Aditya2022-02-091-0/+2
|
* bpo-46072: Add some frame stats. (GH-31060)Mark Shannon2022-02-021-0/+2
|
* bpo-46072: Add some object layout and allocation stats (GH-31051)Mark Shannon2022-02-011-0/+12
|
* bpo-46072: Add simple stats for Python calls. (GH-30989)Mark Shannon2022-01-281-0/+8
|
* bpo-46329: Split calls into precall and call instructions. (GH-30855)Mark Shannon2022-01-281-2/+3
| | | | | | | | | | | | | | * Add PRECALL_FUNCTION opcode. * Move 'call shape' varaibles into struct. * Replace CALL_NO_KW and CALL_KW with KW_NAMES and CALL instructions. * Specialize for builtin methods taking using the METH_FASTCALL | METH_KEYWORDS protocol. * Allow kwnames for specialized calls to builtin types. * Specialize calls to tuple(arg) and str(arg).
* bpo-46476: Simplify and fix _PyStaticCode_Dealloc (GH-30965)Christian Heimes2022-01-271-1/+1
|
* bpo-46476: Fix memory leak in code objects generated by deepfreeze (GH-30853)Kumar Aditya2022-01-271-0/+2
| | | Add _Py_Deepfreeze_Fini() and _PyStaticCode_Dealloc() functions.
* bpo-46072: Add top level stats struct (GH-30169)Mark Shannon2021-12-171-8/+21
|
* bpo-46072: Add --with-pystats configure option to simplify gathering of VM ↵Mark Shannon2021-12-151-15/+2
| | | | | | | | | stats (GH-30116) * Simplify specialization stats collection macros. * Add --enable-pystats option to configure. * Update specialization summary script to handle larger number of kinds
* bpo-44525: Split calls into PRECALL and CALL (GH-30011)Mark Shannon2021-12-141-2/+2
| | | | | | | | | | * Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
* bpo-45885: Specialize COMPARE_OP (GH-29734)Dennis Sweeney2021-12-031-0/+2
| | | | | | | * Add COMPARE_OP_ADAPTIVE adaptive instruction. * Add COMPARE_OP_FLOAT_JUMP, COMPARE_OP_INT_JUMP and COMPARE_OP_STR_JUMP specialized instructions. * Introduce and use _PyUnicode_Equal
* bpo-45753: Interpreter internal tweaks (GH-29575)Mark Shannon2021-12-011-11/+12
| | | | | | | | | | * Split exit paths into exceptional and non-exceptional. * Move exit tracing code to individual bytecodes. * Wrap all trace entry and exit events in macros to make them clearer and easier to enhance. * Move return sequence into RETURN_VALUE, YIELD_VALUE and YIELD_FROM. Distinguish between normal trace events and dtrace events.
* bpo-45609: Specialize STORE_SUBSCR (GH-29242)Dennis Sweeney2021-11-191-0/+1
| | | | | * Specialize STORE_SUBSCR for list[int], and dict[object] * Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
* bpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. ↵Mark Shannon2021-11-181-1/+2
| | | | (GH-29592)
* bpo-45636: Merge all numeric operators (GH-29482)Brandt Bucher2021-11-111-2/+2
|
* bpo-45527: Don't count cache hits, just misses. (GH-29092)Mark Shannon2021-10-201-47/+0
|
* bpo-44525: Specialize simple Python calls. (GH-29033)Mark Shannon2021-10-201-0/+7
|
* bpo-44525: Specialize ``CALL_FUNCTION`` for C function calls (GH-26934)Ken Jin2021-10-191-0/+1
|
* bpo-45367: Specialize BINARY_MULTIPLY (GH-28727)Dennis Sweeney2021-10-141-1/+2
|
* bpo-44945: Specialize BINARY_ADD (GH-27967)Mark Shannon2021-08-271-0/+1
|
* bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)Ken Jin2021-08-171-0/+7
| | | | | | | | Adds four new instructions: * LOAD_METHOD_ADAPTIVE * LOAD_METHOD_CACHED * LOAD_METHOD_MODULE * LOAD_METHOD_CLASS
* bpo-44890: Fix AMD build error (GH-27740)Irit Katriel2021-08-121-2/+7
|
* bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)Irit Katriel2021-08-121-5/+8
|
* Classify specialization failures. Provides more useful stats, with lower ↵Mark Shannon2021-08-101-1/+3
| | | | overhead. (GH-27701)
* bpo-44826: Specialize STORE_ATTR (GH-27590)Mark Shannon2021-08-091-2/+3
| | | | | | | * Generalize cache names for LOAD_ATTR to allow store and delete specializations. * Factor out specialization of attribute dictionary access. * Specialize STORE_ATTR.
* Add option to write specialization stats to files and script to summarize. ↵Mark Shannon2021-08-041-0/+1
| | | | | | | (GH-27575) * Add option to write stats to random file in a directory. * Add script to summarize stats.
* Minor fixes to specialization stats. (GH-27457)Mark Shannon2021-07-291-0/+2
| | | | | * Use class, not value for fail stats for BINARY_SUBSCR. * Fix counts for unquickened instructions.