Victor Stinner
b7808820b1
gh-107211: No longer export internal functions (5) ( #108423 )
...
No longer export _PyCompile_AstOptimize() internal C API function.
Change comment style to "// comment" and add comment explaining why
other functions have to be exported.
2023-08-24 16:06:53 +00:00
Irit Katriel
2dfbd4f36d
gh-108113: Make it possible to optimize an AST ( #108282 )
2023-08-23 09:01:17 +01:00
Irit Katriel
bafedfbebd
gh-106149: move CFG and basicblock definitions into flowgraph.c, use them as opaque types in compile.c ( #107639 )
2023-08-10 13:03:47 +01:00
Victor Stinner
11306a91bd
gh-107211: No longer export internal functions (1) ( #107213 )
...
No longer export these 49 internal C API functions:
* _PyArgv_AsWstrList()
* _PyCode_New()
* _PyCode_Validate()
* _PyFloat_DebugMallocStats()
* _PyFloat_FormatAdvancedWriter()
* _PyImport_CheckSubinterpIncompatibleExtensionAllowed()
* _PyImport_ClearExtension()
* _PyImport_GetModuleId()
* _PyImport_SetModuleString()
* _PyInterpreterState_IDDecref()
* _PyInterpreterState_IDIncref()
* _PyInterpreterState_IDInitref()
* _PyInterpreterState_LookUpID()
* _PyWideStringList_AsList()
* _PyWideStringList_CheckConsistency()
* _PyWideStringList_Clear()
* _PyWideStringList_Copy()
* _PyWideStringList_Extend()
* _Py_ClearArgcArgv()
* _Py_DecodeUTF8Ex()
* _Py_DecodeUTF8_surrogateescape()
* _Py_EncodeLocaleRaw()
* _Py_EncodeUTF8Ex()
* _Py_GetEnv()
* _Py_GetForceASCII()
* _Py_GetLocaleEncoding()
* _Py_GetLocaleEncodingObject()
* _Py_GetLocaleconvNumeric()
* _Py_ResetForceASCII()
* _Py_device_encoding()
* _Py_dg_dtoa()
* _Py_dg_freedtoa()
* _Py_dg_strtod()
* _Py_get_blocking()
* _Py_get_env_flag()
* _Py_get_inheritable()
* _Py_get_osfhandle_noraise()
* _Py_get_xoption()
* _Py_open()
* _Py_open_osfhandle()
* _Py_open_osfhandle_noraise()
* _Py_read()
* _Py_set_blocking()
* _Py_str_to_int()
* _Py_wfopen()
* _Py_wgetcwd()
* _Py_wreadlink()
* _Py_wrealpath()
* _Py_write()
2023-07-25 03:44:11 +02:00
Inada Naoki
2566b74b26
gh-81283: compiler: remove indent from docstring ( #106411 )
...
Co-authored-by: Éric <merwok@netwok.org>
2023-07-15 19:33:32 +09:00
Irit Katriel
5290881009
gh-106149: move jump target resolution from optimizer to assembler ( #106150 )
2023-06-27 20:24:58 +01:00
Irit Katriel
f990bb8b2d
gh-105148: make _PyASTOptimizeState internal to ast_opt.c ( #105149 )
2023-05-31 20:21:46 +01:00
Carl Meyer
0589c6a4d3
gh-104615: don't make unsafe swaps in apply_static_swaps ( #104620 )
2023-05-18 21:22:03 +00:00
Carl Meyer
c3b595e73e
gh-97933: (PEP 709) inline list/dict/set comprehensions ( #101441 )
...
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-09 11:02:14 -06:00
Irit Katriel
2c2dc61e8d
gh-104240: make _PyCompile_CodeGen support different compilation modes ( #104241 )
2023-05-07 18:47:28 +01:00
Irit Katriel
80b714835d
gh-87092: Expose assembler to unit tests ( #103988 )
2023-05-01 22:29:30 +01:00
Irit Katriel
fbf3596c3e
gh-87092: change assembler to use instruction sequence instead of CFG ( #103933 )
2023-04-29 12:06:04 +01:00
Irit Katriel
33822d037a
gh-87092: move assembler related code from compile.c to assemble.c ( #103277 )
2023-04-11 11:15:09 +01:00
Irit Katriel
80163e17d3
gh-87092: move CFG related code from compile.c to flowgraph.c ( #103021 )
2023-03-31 18:17:59 +01:00
Irit Katriel
71db5dbcd7
gh-102371: move _Py_Mangle from compile.c to symtable.c ( #102372 )
2023-03-02 18:38:22 +00:00
Irit Katriel
a3ac9232f8
gh-87092: expose the compiler's codegen to python for unit tests (GH-99111)
2022-11-14 13:56:40 +00:00
Irit Katriel
6d683d8525
gh-87092: do not allocate PyFutureFeatures dynamically (GH-98913)
2022-11-02 15:13:07 +00:00
Irit Katriel
420f39f457
gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler optimization unit tests (GH-96007)
2022-08-24 11:02:53 +01:00
Serhiy Storchaka
face87c94e
bpo-42609: Check recursion depth in the AST validator and optimizer (GH-23744)
2021-04-25 13:38:00 +03:00
Victor Stinner
8370e07e1e
bpo-43244: Remove the pyarena.h header (GH-25007)
...
Remove the pyarena.h header file with functions:
* PyArena_New()
* PyArena_Free()
* PyArena_Malloc()
* PyArena_AddPyObject()
These functions were undocumented, excluded from the limited C API,
and were only used internally by the compiler.
Add pycore_pyarena.h header. Rename functions:
* PyArena_New() => _PyArena_New()
* PyArena_Free() => _PyArena_Free()
* PyArena_Malloc() => _PyArena_Malloc()
* PyArena_AddPyObject() => _PyArena_AddPyObject()
2021-03-24 02:23:01 +01:00
Victor Stinner
a81fca6ec8
bpo-43244: Add pycore_compile.h header file (GH-25000)
...
Remove the compiler functions using "struct _mod" type, because the
public AST C API was removed:
* PyAST_Compile()
* PyAST_CompileEx()
* PyAST_CompileObject()
* PyFuture_FromAST()
* PyFuture_FromASTObject()
These functions were undocumented and excluded from the limited C API.
Rename functions:
* PyAST_CompileObject() => _PyAST_Compile()
* PyFuture_FromASTObject() => _PyFuture_FromAST()
Moreover, _PyFuture_FromAST() is no longer exported (replace
PyAPI_FUNC() with extern). _PyAST_Compile() remains exported for
test_peg_generator.
Remove also compatibility functions:
* PyAST_Compile()
* PyAST_CompileEx()
* PyFuture_FromAST()
2021-03-24 00:51:50 +01:00