mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-108113: Make it possible to optimize an AST (#108282)
This commit is contained in:
parent
79fdacc005
commit
2dfbd4f36d
6 changed files with 77 additions and 48 deletions
|
|
@ -19,6 +19,14 @@ PyAPI_FUNC(PyCodeObject*) _PyAST_Compile(
|
|||
int optimize,
|
||||
struct _arena *arena);
|
||||
|
||||
/* AST optimizations */
|
||||
PyAPI_FUNC(int) _PyCompile_AstOptimize(
|
||||
struct _mod *mod,
|
||||
PyObject *filename,
|
||||
PyCompilerFlags *flags,
|
||||
int optimize,
|
||||
struct _arena *arena);
|
||||
|
||||
static const _PyCompilerSrcLocation NO_LOCATION = {-1, -1, -1, -1};
|
||||
|
||||
extern int _PyAST_Optimize(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue