MCPcopy Index your code
hub / github.com/python/mypy / LoadErrorValue

Class LoadErrorValue

mypyc/ir/ops.py:805–832  ·  view source on GitHub ↗

Load an error value. Each type has one reserved value that signals an error (exception). This loads the error value for a specific type.

Source from the content-addressed store, hash-verified

803
804@final
805class 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

Callers 10

gen_conditionMethod · 0.90
allocate_classFunction · 0.90
try_finally_entry_blocksFunction · 0.90
transform_del_itemFunction · 0.90
emit_yield_from_or_awaitFunction · 0.90
coerce_nullableMethod · 0.90
split_blocks_at_uninitsFunction · 0.90
spill_regsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…