MCPcopy Create free account
hub / github.com/python/mypy / convert_from_t_ext_item

Function convert_from_t_ext_item

mypyc/irbuild/vec.py:381–386  ·  view source on GitHub ↗

Convert an owned VecNestedBufItem to the corresponding RVec value.

(builder: LowLevelIRBuilder, item: Value, vec_type: RVec)

Source from the content-addressed store, hash-verified

379
380
381def convert_from_t_ext_item(builder: LowLevelIRBuilder, item: Value, vec_type: RVec) -> Value:
382 """Convert an owned VecNestedBufItem to the corresponding RVec value."""
383 vec_len = builder.add(GetElement(item, "len"))
384 vec_items = builder.add(GetElement(item, "items"))
385 temp = builder.add(SetElement(Undef(vec_type), "len", vec_len))
386 return builder.add(SetElement(temp, "items", vec_items))
387
388
389def vec_item_type(builder: LowLevelIRBuilder, item_type: RType, line: int) -> Value:

Callers 1

vec_popFunction · 0.85

Calls 4

GetElementClass · 0.90
SetElementClass · 0.90
UndefClass · 0.90
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…