(self, expr_reg: Value, target_type: RType)
| 799 | """Generate IR for an async for loop.""" |
| 800 | |
| 801 | def init(self, expr_reg: Value, target_type: RType) -> None: |
| 802 | # Define targets to contain the expression, along with the |
| 803 | # iterator that will be used for the for-loop. We are inside |
| 804 | # of a generator function, so we will spill these into |
| 805 | # environment class. |
| 806 | builder = self.builder |
| 807 | iter_reg = builder.call_c(aiter_op, [expr_reg], self.line) |
| 808 | builder.maybe_spill(expr_reg) |
| 809 | self.iter_target = builder.maybe_spill(iter_reg) |
| 810 | self.target_type = target_type |
| 811 | self.stop_reg = Register(bool_rprimitive) |
| 812 | |
| 813 | def gen_condition(self) -> None: |
| 814 | # This does the test and fetches the next value |
no test coverage detected