(self)
| 490 | ) |
| 491 | |
| 492 | def _push_defined_outputs(self) -> None: |
| 493 | defined_output = "" |
| 494 | for output in self.outputs: |
| 495 | if output.in_local and not output.memory_offset and not output.item.peek: |
| 496 | defined_output = output.name |
| 497 | if not defined_output: |
| 498 | return |
| 499 | self.clear_inputs(f"when output '{defined_output}' is defined") |
| 500 | undefined = "" |
| 501 | for out in self.outputs: |
| 502 | if out.in_local: |
| 503 | if undefined: |
| 504 | f"Locals not defined in stack order. " |
| 505 | f"Expected '{undefined}' to be defined before '{out.name}'" |
| 506 | else: |
| 507 | undefined = out.name |
| 508 | while len(self.outputs) > self.peeks and not self.needs_defining(self.outputs[self.peeks]): |
| 509 | out = self.outputs.pop(self.peeks) |
| 510 | self.stack.push(out) |
| 511 | |
| 512 | def locals_cached(self) -> bool: |
| 513 | for out in self.outputs: |
no test coverage detected