Lines Matching refs:expr_ty
8 make_const(expr_ty node, PyObject *val, PyArena *arena) in make_const()
39 fold_unaryop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) in fold_unaryop()
41 expr_ty arg = node->v.UnaryOp.operand; in fold_unaryop()
216 fold_binop(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) in fold_binop()
218 expr_ty lhs, rhs; in fold_binop()
277 expr_ty e = (expr_ty)asdl_seq_GET(elts, i); in make_const_tuple()
289 expr_ty e = (expr_ty)asdl_seq_GET(elts, i); in make_const_tuple()
298 fold_tuple(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) in fold_tuple()
310 fold_subscr(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) in fold_subscr()
313 expr_ty arg, idx; in fold_subscr()
335 fold_iter(expr_ty arg, PyArena *arena, _PyASTOptimizeState *state) in fold_iter()
343 expr_ty e = (expr_ty)asdl_seq_GET(elts, i); in fold_iter()
368 fold_compare(expr_ty node, PyArena *arena, _PyASTOptimizeState *state) in fold_compare()
382 if (!fold_iter((expr_ty)asdl_seq_GET(args, i), arena, state)) { in fold_compare()
391 static int astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTOptimizeState *state);
438 expr_ty expr = JoinedStr(values, st->lineno, st->col_offset, in astfold_body()
459 CALL(astfold_expr, expr_ty, node_->v.Expression.body); in astfold_mod()
468 astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTOptimizeState *state) in astfold_expr()
472 CALL_SEQ(astfold_expr, expr_ty, node_->v.BoolOp.values); in astfold_expr()
475 CALL(astfold_expr, expr_ty, node_->v.BinOp.left); in astfold_expr()
476 CALL(astfold_expr, expr_ty, node_->v.BinOp.right); in astfold_expr()
477 CALL(fold_binop, expr_ty, node_); in astfold_expr()
480 CALL(astfold_expr, expr_ty, node_->v.UnaryOp.operand); in astfold_expr()
481 CALL(fold_unaryop, expr_ty, node_); in astfold_expr()
485 CALL(astfold_expr, expr_ty, node_->v.Lambda.body); in astfold_expr()
488 CALL(astfold_expr, expr_ty, node_->v.IfExp.test); in astfold_expr()
489 CALL(astfold_expr, expr_ty, node_->v.IfExp.body); in astfold_expr()
490 CALL(astfold_expr, expr_ty, node_->v.IfExp.orelse); in astfold_expr()
493 CALL_SEQ(astfold_expr, expr_ty, node_->v.Dict.keys); in astfold_expr()
494 CALL_SEQ(astfold_expr, expr_ty, node_->v.Dict.values); in astfold_expr()
497 CALL_SEQ(astfold_expr, expr_ty, node_->v.Set.elts); in astfold_expr()
500 CALL(astfold_expr, expr_ty, node_->v.ListComp.elt); in astfold_expr()
504 CALL(astfold_expr, expr_ty, node_->v.SetComp.elt); in astfold_expr()
508 CALL(astfold_expr, expr_ty, node_->v.DictComp.key); in astfold_expr()
509 CALL(astfold_expr, expr_ty, node_->v.DictComp.value); in astfold_expr()
513 CALL(astfold_expr, expr_ty, node_->v.GeneratorExp.elt); in astfold_expr()
517 CALL(astfold_expr, expr_ty, node_->v.Await.value); in astfold_expr()
520 CALL_OPT(astfold_expr, expr_ty, node_->v.Yield.value); in astfold_expr()
523 CALL(astfold_expr, expr_ty, node_->v.YieldFrom.value); in astfold_expr()
526 CALL(astfold_expr, expr_ty, node_->v.Compare.left); in astfold_expr()
527 CALL_SEQ(astfold_expr, expr_ty, node_->v.Compare.comparators); in astfold_expr()
528 CALL(fold_compare, expr_ty, node_); in astfold_expr()
531 CALL(astfold_expr, expr_ty, node_->v.Call.func); in astfold_expr()
532 CALL_SEQ(astfold_expr, expr_ty, node_->v.Call.args); in astfold_expr()
536 CALL(astfold_expr, expr_ty, node_->v.FormattedValue.value); in astfold_expr()
537 CALL_OPT(astfold_expr, expr_ty, node_->v.FormattedValue.format_spec); in astfold_expr()
540 CALL_SEQ(astfold_expr, expr_ty, node_->v.JoinedStr.values); in astfold_expr()
543 CALL(astfold_expr, expr_ty, node_->v.Attribute.value); in astfold_expr()
546 CALL(astfold_expr, expr_ty, node_->v.Subscript.value); in astfold_expr()
547 CALL(astfold_expr, expr_ty, node_->v.Subscript.slice); in astfold_expr()
548 CALL(fold_subscr, expr_ty, node_); in astfold_expr()
551 CALL(astfold_expr, expr_ty, node_->v.Starred.value); in astfold_expr()
554 CALL_OPT(astfold_expr, expr_ty, node_->v.Slice.lower); in astfold_expr()
555 CALL_OPT(astfold_expr, expr_ty, node_->v.Slice.upper); in astfold_expr()
556 CALL_OPT(astfold_expr, expr_ty, node_->v.Slice.step); in astfold_expr()
559 CALL_SEQ(astfold_expr, expr_ty, node_->v.List.elts); in astfold_expr()
562 CALL_SEQ(astfold_expr, expr_ty, node_->v.Tuple.elts); in astfold_expr()
563 CALL(fold_tuple, expr_ty, node_); in astfold_expr()
580 CALL(astfold_expr, expr_ty, node_->value); in astfold_keyword()
587 CALL(astfold_expr, expr_ty, node_->target); in astfold_comprehension()
588 CALL(astfold_expr, expr_ty, node_->iter); in astfold_comprehension()
589 CALL_SEQ(astfold_expr, expr_ty, node_->ifs); in astfold_comprehension()
591 CALL(fold_iter, expr_ty, node_->iter); in astfold_comprehension()
602 CALL_SEQ(astfold_expr, expr_ty, node_->kw_defaults); in astfold_arguments()
604 CALL_SEQ(astfold_expr, expr_ty, node_->defaults); in astfold_arguments()
612 CALL_OPT(astfold_expr, expr_ty, node_->annotation); in astfold_arg()
624 CALL_SEQ(astfold_expr, expr_ty, node_->v.FunctionDef.decorator_list); in astfold_stmt()
626 CALL_OPT(astfold_expr, expr_ty, node_->v.FunctionDef.returns); in astfold_stmt()
632 CALL_SEQ(astfold_expr, expr_ty, node_->v.AsyncFunctionDef.decorator_list); in astfold_stmt()
634 CALL_OPT(astfold_expr, expr_ty, node_->v.AsyncFunctionDef.returns); in astfold_stmt()
638 CALL_SEQ(astfold_expr, expr_ty, node_->v.ClassDef.bases); in astfold_stmt()
641 CALL_SEQ(astfold_expr, expr_ty, node_->v.ClassDef.decorator_list); in astfold_stmt()
644 CALL_OPT(astfold_expr, expr_ty, node_->v.Return.value); in astfold_stmt()
647 CALL_SEQ(astfold_expr, expr_ty, node_->v.Delete.targets); in astfold_stmt()
650 CALL_SEQ(astfold_expr, expr_ty, node_->v.Assign.targets); in astfold_stmt()
651 CALL(astfold_expr, expr_ty, node_->v.Assign.value); in astfold_stmt()
654 CALL(astfold_expr, expr_ty, node_->v.AugAssign.target); in astfold_stmt()
655 CALL(astfold_expr, expr_ty, node_->v.AugAssign.value); in astfold_stmt()
658 CALL(astfold_expr, expr_ty, node_->v.AnnAssign.target); in astfold_stmt()
660 CALL(astfold_expr, expr_ty, node_->v.AnnAssign.annotation); in astfold_stmt()
662 CALL_OPT(astfold_expr, expr_ty, node_->v.AnnAssign.value); in astfold_stmt()
665 CALL(astfold_expr, expr_ty, node_->v.For.target); in astfold_stmt()
666 CALL(astfold_expr, expr_ty, node_->v.For.iter); in astfold_stmt()
670 CALL(fold_iter, expr_ty, node_->v.For.iter); in astfold_stmt()
673 CALL(astfold_expr, expr_ty, node_->v.AsyncFor.target); in astfold_stmt()
674 CALL(astfold_expr, expr_ty, node_->v.AsyncFor.iter); in astfold_stmt()
679 CALL(astfold_expr, expr_ty, node_->v.While.test); in astfold_stmt()
684 CALL(astfold_expr, expr_ty, node_->v.If.test); in astfold_stmt()
697 CALL_OPT(astfold_expr, expr_ty, node_->v.Raise.exc); in astfold_stmt()
698 CALL_OPT(astfold_expr, expr_ty, node_->v.Raise.cause); in astfold_stmt()
707 CALL(astfold_expr, expr_ty, node_->v.Assert.test); in astfold_stmt()
708 CALL_OPT(astfold_expr, expr_ty, node_->v.Assert.msg); in astfold_stmt()
711 CALL(astfold_expr, expr_ty, node_->v.Expr.value); in astfold_stmt()
724 CALL_OPT(astfold_expr, expr_ty, node_->v.ExceptHandler.type); in astfold_excepthandler()
736 CALL(astfold_expr, expr_ty, node_->context_expr); in astfold_withitem()
737 CALL_OPT(astfold_expr, expr_ty, node_->optional_vars); in astfold_withitem()