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

Function vec_init_item_unsafe

mypyc/irbuild/vec.py:361–371  ·  view source on GitHub ↗
(
    builder: LowLevelIRBuilder, base: Value, index: Value, item: Value, line: int
)

Source from the content-addressed store, hash-verified

359
360
361def vec_init_item_unsafe(
362 builder: LowLevelIRBuilder, base: Value, index: Value, item: Value, line: int
363) -> None:
364 assert isinstance(base.type, RVec)
365 index = as_platform_int(builder, index, line)
366 vtype = base.type
367 item_addr = vec_item_ptr(builder, base, index)
368 item_type = vtype.item_type
369 item = builder.coerce(item, item_type, line)
370 vec_set_mem_item(builder, item_addr, item_type, item)
371 builder.keep_alive([base], line)
372
373
374def convert_to_t_ext_item(builder: LowLevelIRBuilder, item: Value) -> Value:

Callers 1

set_itemFunction · 0.90

Calls 6

isinstanceFunction · 0.85
as_platform_intFunction · 0.85
vec_item_ptrFunction · 0.85
vec_set_mem_itemFunction · 0.85
keep_aliveMethod · 0.80
coerceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…