@@ -3272,30 +3272,29 @@ compiler_for(struct compiler *c, stmt_ty s)
3272
3272
NEW_JUMP_TARGET_LABEL (c , cleanup );
3273
3273
NEW_JUMP_TARGET_LABEL (c , end );
3274
3274
3275
- if (compiler_push_fblock (c , loc , FOR_LOOP , start , end , NULL ) < 0 ) {
3276
- return 0 ;
3277
- }
3278
- _VISIT (c , expr , s -> v .For .iter );
3279
- _ADDOP (c , loc , GET_ITER );
3275
+ RETURN_IF_ERROR (compiler_push_fblock (c , loc , FOR_LOOP , start , end , NULL ));
3276
+
3277
+ VISIT (c , expr , s -> v .For .iter );
3278
+ ADDOP (c , loc , GET_ITER );
3280
3279
3281
3280
USE_LABEL (c , start );
3282
- _ADDOP_JUMP (c , loc , FOR_ITER , cleanup );
3281
+ ADDOP_JUMP (c , loc , FOR_ITER , cleanup );
3283
3282
3284
3283
USE_LABEL (c , body );
3285
- _VISIT (c , expr , s -> v .For .target );
3286
- _VISIT_SEQ (c , stmt , s -> v .For .body );
3284
+ VISIT (c , expr , s -> v .For .target );
3285
+ VISIT_SEQ (c , stmt , s -> v .For .body );
3287
3286
/* Mark jump as artificial */
3288
- _ADDOP_JUMP (c , NO_LOCATION , JUMP , start );
3287
+ ADDOP_JUMP (c , NO_LOCATION , JUMP , start );
3289
3288
3290
3289
USE_LABEL (c , cleanup );
3291
- _ADDOP (c , NO_LOCATION , END_FOR );
3290
+ ADDOP (c , NO_LOCATION , END_FOR );
3292
3291
3293
3292
compiler_pop_fblock (c , FOR_LOOP , start );
3294
3293
3295
- _VISIT_SEQ (c , stmt , s -> v .For .orelse );
3294
+ VISIT_SEQ (c , stmt , s -> v .For .orelse );
3296
3295
3297
3296
USE_LABEL (c , end );
3298
- return 1 ;
3297
+ return SUCCESS ;
3299
3298
}
3300
3299
3301
3300
@@ -4225,7 +4224,7 @@ compiler_visit_stmt(struct compiler *c, stmt_ty s)
4225
4224
case AnnAssign_kind :
4226
4225
return compiler_annassign (c , s ) == SUCCESS ? 1 : 0 ;
4227
4226
case For_kind :
4228
- return compiler_for (c , s );
4227
+ return compiler_for (c , s ) == SUCCESS ? 1 : 0 ;
4229
4228
case While_kind :
4230
4229
return compiler_while (c , s );
4231
4230
case If_kind :
0 commit comments