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

Class Call

mypyc/ir/ops.py:631–656  ·  view source on GitHub ↗

Native call f(arg, ...). The call target can be a module-level function or a class.

Source from the content-addressed store, hash-verified

629
630@final
631class Call(RegisterOp):
632 """Native call f(arg, ...).
633
634 The call target can be a module-level function or a class.
635 """
636
637 def __init__(self, fn: FuncDecl, args: Sequence[Value], line: int) -> None:
638 self.fn = fn
639 self.args = list(args)
640 assert len(self.args) == len(fn.sig.args)
641 self.type = fn.sig.ret_type
642 ret_type = fn.sig.ret_type
643 if not ret_type.error_overlap:
644 self.error_kind = ERR_MAGIC
645 else:
646 self.error_kind = ERR_MAGIC_OVERLAPPING
647 super().__init__(line)
648
649 def sources(self) -> list[Value]:
650 return list(self.args.copy())
651
652 def set_sources(self, new: list[Value]) -> None:
653 self.args = new[:]
654
655 def accept(self, visitor: OpVisitor[T]) -> T:
656 return visitor.visit_call(self)
657
658
659@final

Callers 12

translate_object_newFunction · 0.90
instantiate_env_classFunction · 0.90
allocate_classFunction · 0.90
callMethod · 0.90
test_callMethod · 0.90
test_call_two_argsMethod · 0.90

Calls

no outgoing calls

Tested by 2

test_callMethod · 0.72
test_call_two_argsMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…