[3.6] [3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060) by miss-islington · Pull Request #6062 · python/cpython
basicblock *try, *except, *end, *after_try, *try_cleanup, *after_loop, *after_loop_else; *after_loop_else;
PyObject *stop_aiter_error = _PyUnicode_FromId(&PyId_StopAsyncIteration); if (stop_aiter_error == NULL) {
if (try == NULL || except == NULL || end == NULL || after_try == NULL || try_cleanup == NULL) || after_try == NULL || try_cleanup == NULL || after_loop_else == NULL) return 0;
ADDOP_JREL(c, SETUP_LOOP, after_loop); ADDOP_JREL(c, SETUP_LOOP, end); if (!compiler_push_fblock(c, LOOP, try)) return 0;
compiler_use_next_block(c, after_loop); ADDOP_JABS(c, JUMP_ABSOLUTE, end);
compiler_use_next_block(c, after_loop_else); VISIT_SEQ(c, stmt, s->v.For.orelse);
comprehension_ty gen; basicblock *anchor, *skip, *if_cleanup, *try, basicblock *anchor, *if_cleanup, *try, *after_try, *except, *try_cleanup; Py_ssize_t i, n;
if (skip == NULL || if_cleanup == NULL || anchor == NULL || if (if_cleanup == NULL || anchor == NULL || try == NULL || after_try == NULL || except == NULL || after_try == NULL) { except == NULL || try_cleanup == NULL) { return 0; }
compiler_use_next_block(c, skip); } compiler_use_next_block(c, if_cleanup); ADDOP_JABS(c, JUMP_ABSOLUTE, try);