()
| 1378 | builder.nonlocal_control[-1].gen_break(builder, line) |
| 1379 | |
| 1380 | def else_body() -> None: |
| 1381 | # Do a next() or a .send(). It will return NULL on exception |
| 1382 | # but it won't automatically propagate. |
| 1383 | _y = builder.call_c( |
| 1384 | send_op, [builder.read(iter_reg, line), builder.read(received_reg, line)], line |
| 1385 | ) |
| 1386 | ok, stop = BasicBlock(), BasicBlock() |
| 1387 | builder.add(Branch(_y, stop, ok, Branch.IS_ERROR)) |
| 1388 | |
| 1389 | # Everything's fine. Yield it. |
| 1390 | builder.activate_block(ok) |
| 1391 | builder.assign(to_yield_reg, _y, line) |
| 1392 | builder.nonlocal_control[-1].gen_continue(builder, line) |
| 1393 | |
| 1394 | # Try extracting a return value from a StopIteration and return it. |
| 1395 | # If it wasn't, this rereaises the exception. |
| 1396 | builder.activate_block(stop) |
| 1397 | builder.assign(result, builder.call_c(check_stop_op, [], line), line) |
| 1398 | builder.nonlocal_control[-1].gen_break(builder, line) |
| 1399 | |
| 1400 | builder.push_loop_stack(loop_block, done_block) |
| 1401 | transform_try_except(builder, try_body, [(None, None, except_body)], else_body, line) |
no test coverage detected
searching dependent graphs…