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

Function translate_call

mypyc/irbuild/expression.py:400–411  ·  view source on GitHub ↗
(builder: IRBuilder, expr: CallExpr, callee: Expression)

Source from the content-addressed store, hash-verified

398
399
400def translate_call(builder: IRBuilder, expr: CallExpr, callee: Expression) -> Value:
401 # The common case of calls is refexprs
402 if isinstance(callee, RefExpr):
403 return apply_function_specialization(builder, expr, callee) or translate_refexpr_call(
404 builder, expr, callee
405 )
406
407 function = builder.accept(callee)
408 args = [builder.accept(arg) for arg in expr.args]
409 return builder.py_call(
410 function, args, expr.line, arg_kinds=expr.arg_kinds, arg_names=expr.arg_names
411 )
412
413
414def translate_refexpr_call(builder: IRBuilder, expr: CallExpr, callee: RefExpr) -> Value:

Callers 3

transform_call_exprFunction · 0.85
translate_method_callFunction · 0.85

Calls 5

isinstanceFunction · 0.85
translate_refexpr_callFunction · 0.85
acceptMethod · 0.45
py_callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…