summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-115376: fix segfault in _testinternalcapi.compiler_codegen on bad input ↵Irit Katriel2024-02-151-14/+28
| | | | (#115379)
* gh-115347: avoid emitting redundant NOP for the docstring with -OO (#115494)Irit Katriel2024-02-151-18/+20
|
* gh-112066: Use `PyDict_SetDefaultRef` in place of `PyDict_SetDefault`. (#112211)Sam Gross2024-02-071-12/+17
| | | | | This changes a number of internal usages of `PyDict_SetDefault` to use `PyDict_SetDefaultRef`. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-114569: Use PyMem_* APIs for non-PyObjects in compiler (#114587)Erlend E. Aasland2024-01-291-13/+12
|
* GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)Mark Shannon2024-01-241-0/+10
| | | | * Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
* gh-107901: synthetic jumps which are not at end of loop no longer check the ↵Irit Katriel2024-01-061-20/+20
| | | | eval breaker (#113721)
* GH-111485: Generate instruction and uop metadata (GH-113287)Mark Shannon2023-12-201-30/+7
|
* gh-99606: Make code generated for an empty f-string identical to that of a ↵Irit Katriel2023-11-261-2/+6
| | | | normal empty string (#112407)
* gh-107149: make new opcode util functions private rather than public and ↵Irit Katriel2023-11-141-8/+8
| | | | unstable (#112042)
* gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and ↵Irit Katriel2023-11-031-2/+2
| | | | frame state (#111648)
* gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 ↵Irit Katriel2023-11-021-2/+2
| | | | (#111459)
* gh-108082: Use PyErr_FormatUnraisable() (GH-111580)Serhiy Storchaka2023-11-021-3/+2
| | | | | | Replace most of calls of _PyErr_WriteUnraisableMsg() and some calls of PyErr_WriteUnraisable(NULL) with PyErr_FormatUnraisable(). Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-111354: define names for RESUME oparg values (#111365)Irit Katriel2023-10-261-3/+3
|
* gh-105658: fix excess trace events for except block ending with a ↵Irit Katriel2023-09-141-14/+2
| | | | conditional block (#109384)
* GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)Brandt Bucher2023-09-131-10/+12
|
* gh-109195: fix source location for super load before LOAD_SUPER_ATTR (#109289)Carl Meyer2023-09-111-1/+1
|
* gh-106320: Remove private _PyErr_WriteUnraisableMsg() (#108863)Victor Stinner2023-09-041-0/+1
| | | | | | Move the private _PyErr_WriteUnraisableMsg() functions to the internal C API (pycore_pyerrors.h). Move write_unraisable_exc() from _testcapi to _testinternalcapi.
* gh-108654: restore comprehension locals before handling exception (#108659)Carl Meyer2023-08-301-14/+53
| | | Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. ↵Irit Katriel2023-08-231-0/+1
| | | | (#108367)
* gh-108308: Replace PyDict_GetItem() with PyDict_GetItemRef() (#108309)Victor Stinner2023-08-231-7/+27
| | | | | | | | | Replace PyDict_GetItem() calls with PyDict_GetItemRef() or PyDict_GetItemWithError() to handle errors. * Replace PyLong_AS_LONG() with _PyLong_AsInt() and check for errors. * Check for PyDict_Contains() error. * pycore_init_builtins() checks for _PyType_Lookup() failure.
* gh-108113: Make it possible to optimize an AST (#108282)Irit Katriel2023-08-231-0/+18
|
* gh-105724: Add location information to `assert` errors (GH-105935)Nikita Sobolev2023-08-161-1/+1
|
* gh-106149: move CFG and basicblock definitions into flowgraph.c, use them as ↵Irit Katriel2023-08-101-364/+68
| | | | opaque types in compile.c (#107639)
* GH-105848: Simplify the arrangement of CALL's stack (GH-107788)Brandt Bucher2023-08-091-10/+9
|
* gh-106149: fix comment on stackdepth of generators (#107321)Irit Katriel2023-07-261-2/+3
|
* gh-106149: Simplify stack depth calculation. Replace asserts by exceptions. ↵Irit Katriel2023-07-261-16/+31
| | | | (#107255)
* gh-107211: Rename PySymtable_Lookup() to _PySymtable_Lookup() (#107212)Victor Stinner2023-07-251-2/+2
| | | | Rename the internal PySymtable_Lookup() function to _PySymtable_Lookup() and no longer export it.
* gh-106320: Move private _PySet API to the internal API (#107041)Victor Stinner2023-07-221-1/+2
| | | | | | | | * Add pycore_setobject.h header file. * Move the following API to the internal C API: * _PySet_Dummy * _PySet_NextEntry() * _PySet_Update()
* gh-106916: Add missing error check _PyCompile_CleanDoc (#106921)Kirill Podoprigora2023-07-211-0/+6
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-105481: Generate the opcode lists in dis from data extracted from ↵Irit Katriel2023-07-181-0/+18
| | | | bytecodes.c (#106758)
* gh-106843: fix memleak in _PyCompile_CleanDoc (#106846)Inada Naoki2023-07-181-1/+4
|
* gh-81283: compiler: remove indent from docstring (#106411)Inada Naoki2023-07-151-1/+98
| | | Co-authored-by: Éric <merwok@netwok.org>
* gh-105481: expose opcode metadata via the _opcode module (#106688)Irit Katriel2023-07-141-0/+32
|
* gh-105481: move Python/opcode_metadata.h to ↵Irit Katriel2023-07-121-1/+1
| | | | Include/internal/pycore_opcode_metadata.h (#106673)
* gh-106320: Remove private _PyInterpreterState functions (#106325)Victor Stinner2023-07-021-0/+1
| | | | | | | | | Remove private _PyThreadState and _PyInterpreterState C API functions: move them to the internal C API (pycore_pystate.h and pycore_interp.h). Don't export most of these functions anymore, but still export functions used by tests. Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C API, but keep it in the stable API.
* GH-106008: Make implicit boolean conversions explicit (GH-106003)Brandt Bucher2023-06-291-5/+16
|
* gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)hms2023-06-291-0/+2
| | | | | | This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
* gh-106149: move jump target resolution from optimizer to assembler (#106150)Irit Katriel2023-06-271-12/+5
|
* GH-91095: Specialize calls to normal Python classes. (GH-99331)Mark Shannon2023-06-221-0/+3
|
* gh-105908: fix `barry_as_FLUFL` future import (#105909)Crowthebird2023-06-191-6/+10
|
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-12/+5
| | | | replace by their new versions (#105865)
* gh-105481: add HAS_JUMP flag to opcode metadata (#105791)Irit Katriel2023-06-141-1/+4
|
* GH-77273: Better bytecodes for f-strings (GH-6132)Mark Shannon2023-06-141-14/+14
|
* gh-105481: add flags to each instr in the opcode metadata table, to replace ↵Irit Katriel2023-06-131-0/+2
| | | | opcode.hasarg/hasname/hasconst (#105482)
* GH-105678: Split MAKE_FUNCTION into MAKE_FUNCTION and SET_FUNCTION_ATTRIBUTE ↵Mark Shannon2023-06-131-1/+15
| | | | (GH-105680)
* gh-105481: add pseudo-instructions to the bytecodes DSL (#105506)Irit Katriel2023-06-111-1/+11
|
* gh-105375: Improve error handling in compiler_enter_scope() (#105494)Erlend E. Aasland2023-06-091-1/+5
|
* gh-103906: Remove immortal refcounting in compile/marshal.c (gh-103922)Dong-hee Na2023-06-051-3/+3
|
* gh-105164: Detect annotations inside match blocks (#105177)Jelle Zijlstra2023-06-051-0/+10
|
* gh-103277: remove unused macros (#105247)Irit Katriel2023-06-031-19/+0
|