Lines Matching refs:state
57 fold_unaryop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state)
445 fold_binop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state)
542 fold_tuple(expr_ty node, PyArena *arena, _PyASTOptimizeState *state)
554 fold_subscr(expr_ty node, PyArena *arena, _PyASTOptimizeState *state)
579 fold_iter(expr_ty arg, PyArena *arena, _PyASTOptimizeState *state)
608 fold_compare(expr_ty node, PyArena *arena, _PyASTOptimizeState *state)
621 if (!fold_iter((expr_ty)asdl_seq_GET(args, i), arena, state)) {
628 static int astfold_mod(mod_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
629 static int astfold_stmt(stmt_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
630 static int astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
631 static int astfold_arguments(arguments_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
632 static int astfold_comprehension(comprehension_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
633 static int astfold_keyword(keyword_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
634 static int astfold_arg(arg_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
635 static int astfold_withitem(withitem_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
636 static int astfold_excepthandler(excepthandler_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
637 static int astfold_match_case(match_case_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
638 static int astfold_pattern(pattern_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
641 if (!FUNC((ARG), ctx_, state)) \
645 if ((ARG) != NULL && !FUNC((ARG), ctx_, state)) \
653 if (elt != NULL && !FUNC(elt, ctx_, state)) \
660 astfold_body(asdl_stmt_seq *stmts, PyArena *ctx_, _PyASTOptimizeState *state)
683 astfold_mod(mod_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
705 astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
707 if (++state->recursion_depth > state->recursion_limit) {
810 state->recursion_depth--;
811 return make_const(node_, PyBool_FromLong(!state->optimize), ctx_);
823 state->recursion_depth--;
828 astfold_keyword(keyword_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
835 astfold_comprehension(comprehension_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
846 astfold_arguments(arguments_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
859 astfold_arg(arg_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
861 if (!(state->ff_features & CO_FUTURE_ANNOTATIONS)) {
868 astfold_stmt(stmt_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
870 if (++state->recursion_depth > state->recursion_limit) {
880 if (!(state->ff_features & CO_FUTURE_ANNOTATIONS)) {
888 if (!(state->ff_features & CO_FUTURE_ANNOTATIONS)) {
914 if (!(state->ff_features & CO_FUTURE_ANNOTATIONS)) {
990 state->recursion_depth--;
995 astfold_excepthandler(excepthandler_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
1009 astfold_withitem(withitem_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
1017 astfold_pattern(pattern_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
1022 if (++state->recursion_depth > state->recursion_limit) {
1058 state->recursion_depth--;
1063 astfold_match_case(match_case_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
1079 _PyAST_Optimize(mod_ty mod, PyArena *arena, _PyASTOptimizeState *state)
1094 state->recursion_depth = starting_recursion_depth;
1095 state->recursion_limit = (recursion_limit < INT_MAX / COMPILER_STACK_FRAME_SCALE) ?
1098 int ret = astfold_mod(mod, arena, state);
1102 if (ret && state->recursion_depth != starting_recursion_depth) {
1105 starting_recursion_depth, state->recursion_depth);