(self, other: "Stack", out: CWriter)
| 377 | ) |
| 378 | |
| 379 | def align(self, other: "Stack", out: CWriter) -> None: |
| 380 | if self.logical_sp != other.logical_sp: |
| 381 | raise StackError("Cannot align stacks: differing logical top") |
| 382 | if self.physical_sp == other.physical_sp: |
| 383 | return |
| 384 | diff = other.physical_sp - self.physical_sp |
| 385 | out.start_line() |
| 386 | out.emit(f"stack_pointer += {diff.to_c()};\n") |
| 387 | self.physical_sp = other.physical_sp |
| 388 | |
| 389 | def merge(self, other: "Stack", out: CWriter) -> None: |
| 390 | if len(self.variables) != len(other.variables): |
no test coverage detected