Skip to content

bloqade.lanes.dialects.stack_move.NewArray

← Module overview

classNewArraysource

bloqade.lanes.dialects.stack_move.NewArray

Bases: ir.Statement

Create an array.

Signature
class NewArray(values: typing.Sequence[ir.SSAValue], type_tag: int, dim0: int, dim1: int)

Bytecode stack effect: doesn’t pop (empty-array placeholder). Python construction accepts values=() in that case or a non-empty tuple when authoring stack_move IR directly from Python.

The result type is a fully-parameterised ArrayType[ElemType, Literal[dim0], Literal[dim1]] derived from the type_tag byte (via TYPE_TAG) and the two dimension attributes.

Parameters

NameTypeDescription
valuestyping.Sequence[ir.SSAValue]
type_tagint
dim0int
dim1int

Attributes

NameTypeDefaultDescription
traits—frozenset({lowering.FromPythonCall()})
valuestuple[ir.SSAValue, ...]required
type_tagintinfo.attribute()
dim0intinfo.attribute()
dim1intinfo.attribute()
resultir.ResultValueinfo.result(ArrayType[ElemType, Dim0Type, Dim1Type])