(self, ir: ClassIR)
| 164 | """Contains information about implicit generator function classes.""" |
| 165 | |
| 166 | def __init__(self, ir: ClassIR) -> None: |
| 167 | super().__init__(ir) |
| 168 | # This register holds the label number that the '__next__' function should go to the next |
| 169 | # time it is called. |
| 170 | self._next_label_reg: Value | None = None |
| 171 | self._next_label_target: AssignmentTarget | None = None |
| 172 | |
| 173 | # These registers hold the error values for the generator object for the case that the |
| 174 | # 'throw' function is called. |
| 175 | self.exc_regs: tuple[Value, Value, Value] | None = None |
| 176 | |
| 177 | # Holds the arg passed to send |
| 178 | self.send_arg_reg: Value | None = None |
| 179 | |
| 180 | # Holds the PyObject ** pointer through which return value can be passed |
| 181 | # instead of raising StopIteration(ret_value) (only if not NULL). This |
| 182 | # is used for faster native-to-native calls. |
| 183 | self.stop_iter_value_reg: Value | None = None |
| 184 | |
| 185 | # The switch block is used to decide which instruction to go using the value held in the |
| 186 | # next-label register. |
| 187 | self.switch_block = BasicBlock() |
| 188 | self.continuation_blocks: list[BasicBlock] = [] |
| 189 | |
| 190 | @property |
| 191 | def next_label_reg(self) -> Value: |
nothing calls this directly
no test coverage detected