aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/compile.c
diff options
context:
space:
mode:
authorYan Yanchii <yyanchiy@gmail.com>2025-05-04 20:07:35 +0200
committerGitHub <noreply@github.com>2025-05-04 21:07:35 +0300
commit0a1fedb70b94217055114357fa5f5be5ea62bdbe (patch)
tree944d91dc5c995c29584a52deebd0bd1fe141ceaf /Python/compile.c
parent8eaaf1640232191319f83917ef72e7853af25681 (diff)
downloadcpython-0a1fedb70b94217055114357fa5f5be5ea62bdbe.tar.gz
cpython-0a1fedb70b94217055114357fa5f5be5ea62bdbe.zip
gh-126835: Rename `ast_opt.c` to `ast_preprocess.c` and related stuff after moving const folding to the peephole optimizier (#131830)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 15ef7214d44..c04391e682f 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -135,7 +135,7 @@ compiler_setup(compiler *c, mod_ty mod, PyObject *filename,
c->c_optimize = (optimize == -1) ? _Py_GetConfig()->optimization_level : optimize;
c->c_save_nested_seqs = false;
- if (!_PyAST_Optimize(mod, arena, filename, c->c_optimize, merged, 0)) {
+ if (!_PyAST_Preprocess(mod, arena, filename, c->c_optimize, merged, 0)) {
return ERROR;
}
c->c_st = _PySymtable_Build(mod, filename, &c->c_future);
@@ -1481,8 +1481,8 @@ _PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
}
int
-_PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
- int optimize, PyArena *arena, int no_const_folding)
+_PyCompile_AstPreprocess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
+ int optimize, PyArena *arena, int no_const_folding)
{
_PyFutureFeatures future;
if (!_PyFuture_FromAST(mod, filename, &future)) {
@@ -1492,7 +1492,7 @@ _PyCompile_AstOptimize(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
if (optimize == -1) {
optimize = _Py_GetConfig()->optimization_level;
}
- if (!_PyAST_Optimize(mod, arena, filename, optimize, flags, no_const_folding)) {
+ if (!_PyAST_Preprocess(mod, arena, filename, optimize, flags, no_const_folding)) {
return -1;
}
return 0;