| 82 | |
| 83 | |
| 84 | class FnError: |
| 85 | def __init__(self, source: Op | BasicBlock, desc: str) -> None: |
| 86 | self.source = source |
| 87 | self.desc = desc |
| 88 | |
| 89 | def __eq__(self, other: object) -> bool: |
| 90 | return ( |
| 91 | isinstance(other, FnError) and self.source == other.source and self.desc == other.desc |
| 92 | ) |
| 93 | |
| 94 | def __repr__(self) -> str: |
| 95 | return f"FnError(source={self.source}, desc={self.desc})" |
| 96 | |
| 97 | |
| 98 | def check_func_ir(fn: FuncIR) -> list[FnError]: |
no outgoing calls
searching dependent graphs…