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

Method setup_rarray

mypyc/irbuild/ll_builder.py:2087–2095  ·  view source on GitHub ↗

Declare and initialize a new RArray, returning its address.

(
        self, item_type: RType, values: Sequence[Value], line: int, *, object_ptr: bool = False
    )

Source from the content-addressed store, hash-verified

2085 return self.primitive_op(new_set_op, values, line)
2086
2087 def setup_rarray(
2088 self, item_type: RType, values: Sequence[Value], line: int, *, object_ptr: bool = False
2089 ) -> Value:
2090 """Declare and initialize a new RArray, returning its address."""
2091 array = Register(RArray(item_type, len(values)))
2092 self.add(AssignMulti(array, list(values), line))
2093 return self.add(
2094 LoadAddress(object_pointer_rprimitive if object_ptr else c_pointer_rprimitive, array)
2095 )
2096
2097 def shortcircuit_helper(
2098 self,

Callers 3

_py_vector_callMethod · 0.95

Calls 7

addMethod · 0.95
RegisterClass · 0.90
RArrayClass · 0.90
AssignMultiClass · 0.90
LoadAddressClass · 0.90
lenFunction · 0.85
listClass · 0.85

Tested by

no test coverage detected