Load an error value. Each type has one reserved value that signals an error (exception). This loads the error value for a specific type.
| 803 | |
| 804 | @final |
| 805 | class LoadErrorValue(RegisterOp): |
| 806 | """Load an error value. |
| 807 | |
| 808 | Each type has one reserved value that signals an error (exception). This |
| 809 | loads the error value for a specific type. |
| 810 | """ |
| 811 | |
| 812 | error_kind = ERR_NEVER |
| 813 | |
| 814 | def __init__( |
| 815 | self, rtype: RType, line: int = -1, is_borrowed: bool = False, undefines: bool = False |
| 816 | ) -> None: |
| 817 | super().__init__(line) |
| 818 | self.type = rtype |
| 819 | self.is_borrowed = is_borrowed |
| 820 | # Undefines is true if this should viewed by the definedness |
| 821 | # analysis pass as making the register it is assigned to |
| 822 | # undefined (and thus checks should be added on uses). |
| 823 | self.undefines = undefines |
| 824 | |
| 825 | def sources(self) -> list[Value]: |
| 826 | return [] |
| 827 | |
| 828 | def set_sources(self, new: list[Value]) -> None: |
| 829 | assert not new |
| 830 | |
| 831 | def accept(self, visitor: OpVisitor[T]) -> T: |
| 832 | return visitor.visit_load_error_value(self) |
| 833 | |
| 834 | |
| 835 | @final |
no outgoing calls
no test coverage detected
searching dependent graphs…