Skip to content

Commit e2a3cbc

Browse files
committed
address review
1 parent 3a6abef commit e2a3cbc

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
Move constant folding to the peephole optimizer. Rename AST optimization
2-
related files/structs/functions.
2+
related files (ast_opt.c -> ast_process.c), structs (_PyASTOptimizeState -> _PyASTProcessState)
3+
and functions (_PyAST_Optimize -> _PyAST_Process, _PyCompile_AstOptimize -> _PyCompile_AstProcess).

Python/ast_process.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ astfold_type_param(type_param_ty node_, PyArena *ctx_, _PyASTProcessState *state
942942

943943
int
944944
_PyAST_Process(mod_ty mod, PyArena *arena, PyObject *filename, int optimize,
945-
int ff_features, int syntax_check_only)
945+
int ff_features, int syntax_check_only)
946946
{
947947
_PyASTProcessState state;
948948
memset(&state, 0, sizeof(_PyASTProcessState));

Python/compile.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,7 @@ _PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
14821482

14831483
int
14841484
_PyCompile_AstProcess(mod_ty mod, PyObject *filename, PyCompilerFlags *cf,
1485-
int optimize, PyArena *arena, int no_const_folding)
1485+
int optimize, PyArena *arena, int no_const_folding)
14861486
{
14871487
_PyFutureFeatures future;
14881488
if (!_PyFuture_FromAST(mod, filename, &future)) {

0 commit comments

Comments
 (0)