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

Function translate_vec_append

mypyc/irbuild/specialize.py:1539–1548  ·  view source on GitHub ↗
(builder: IRBuilder, expr: CallExpr, callee: RefExpr)

Source from the content-addressed store, hash-verified

1537
1538@specialize_function("librt.vecs.append")
1539def translate_vec_append(builder: IRBuilder, expr: CallExpr, callee: RefExpr) -> Value | None:
1540 if len(expr.args) == 2 and expr.arg_kinds == [ARG_POS, ARG_POS]:
1541 vec_arg = expr.args[0]
1542 item_arg = expr.args[1]
1543 vec_type = builder.node_type(vec_arg)
1544 if isinstance(vec_type, RVec):
1545 vec_value = builder.accept(vec_arg)
1546 arg_value = builder.accept(item_arg)
1547 return vec_append(builder.builder, vec_value, arg_value, item_arg.line)
1548 return None
1549
1550
1551@specialize_function("librt.vecs.extend")

Callers

nothing calls this directly

Calls 5

vec_appendFunction · 0.90
lenFunction · 0.85
isinstanceFunction · 0.85
node_typeMethod · 0.80
acceptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…