@@ -4543,9 +4543,9 @@ codegen_async_comprehension_generator(compiler *c, location loc,
45434543 else {
45444544 /* Sub-iter - calculate on the fly */
45454545 VISIT (c , expr , gen -> iter );
4546- ADDOP (c , LOC (gen -> iter ), GET_AITER );
45474546 }
45484547 }
4548+ ADDOP (c , LOC (gen -> iter ), GET_AITER );
45494549
45504550 USE_LABEL (c , start );
45514551 /* Runtime will push a block here, so we need to account for that */
@@ -4757,19 +4757,6 @@ pop_inlined_comprehension_state(compiler *c, location loc,
47574757 return SUCCESS ;
47584758}
47594759
4760- static inline int
4761- codegen_comprehension_iter (compiler * c , comprehension_ty comp )
4762- {
4763- VISIT (c , expr , comp -> iter );
4764- if (comp -> is_async ) {
4765- ADDOP (c , LOC (comp -> iter ), GET_AITER );
4766- }
4767- else {
4768- ADDOP (c , LOC (comp -> iter ), GET_ITER );
4769- }
4770- return SUCCESS ;
4771- }
4772-
47734760static int
47744761codegen_comprehension (compiler * c , expr_ty e , int type ,
47754762 identifier name , asdl_comprehension_seq * generators , expr_ty elt ,
@@ -4789,9 +4776,7 @@ codegen_comprehension(compiler *c, expr_ty e, int type,
47894776
47904777 outermost = (comprehension_ty ) asdl_seq_GET (generators , 0 );
47914778 if (is_inlined ) {
4792- if (codegen_comprehension_iter (c , outermost )) {
4793- goto error ;
4794- }
4779+ VISIT (c , expr , outermost -> iter );
47954780 if (push_inlined_comprehension_state (c , loc , entry , & inline_state )) {
47964781 goto error ;
47974782 }
0 commit comments