pub enum Operand {
Show 22 variants
Const(u16),
Local(u16),
ModuleBinding(u16),
Offset(i32),
Function(FunctionId),
Builtin(BuiltinFunction),
Count(u16),
Property(u16),
ColumnIndex(u32),
TypedField {
type_id: u16,
field_idx: u16,
field_type_tag: u16,
},
TypedObjectAlloc {
schema_id: u16,
field_count: u16,
},
TypedMerge {
target_schema_id: u16,
left_size: u16,
right_size: u16,
},
ColumnAccess {
col_id: u32,
},
Name(StringId),
TypedMethodCall {
method_id: u16,
arg_count: u16,
string_id: u16,
receiver_type_tag: u8,
},
ForeignFunction(u16),
MatrixDims {
rows: u16,
cols: u16,
},
Width(NumericWidth),
TypedLocal(u16, NumericWidth),
TypedModuleBinding(u16, NumericWidth),
FieldOffset(u16),
ClosureAlloc {
fid: FunctionId,
escapes: bool,
},
}Expand description
Instruction operands
Variants§
Const(u16)
Constant pool index
Local(u16)
Local variable index
ModuleBinding(u16)
ModuleBinding variable index
Offset(i32)
Jump offset (can be negative)
Function(FunctionId)
Function index
Builtin(BuiltinFunction)
Built-in function ID
Count(u16)
Number of arguments/elements
Property(u16)
Property name index
ColumnIndex(u32)
Column index for DataFrame field access (compile-time resolved)
TypedField
Typed field access (type_id, field_idx, field_type_tag) Used with GetFieldTyped/SetFieldTyped for optimized field access. field_type_tag encodes the FieldType so the executor can read slots without a runtime schema lookup.
TypedObjectAlloc
Typed object allocation Used with NewTypedObject for creating TypedObject instances
Fields
TypedMerge
Typed object merge (compile-time registered intersection schema) Used with TypedMergeObject for O(1) merge operations
Fields
ColumnAccess
Typed column access on a RowView Used with LoadColF64/I64/Bool/Str for direct Arrow buffer reads
Name(StringId)
A named reference (e.g., trait name for BoxTraitObject)
TypedMethodCall
Typed method call using compile-time resolved MethodId.
For MethodId::DYNAMIC, the VM falls back to string lookup
using string_id from the string pool.
Fields
ForeignFunction(u16)
Foreign function index — indexes into program.foreign_functions
MatrixDims
Matrix dimensions (rows, cols) for NewMatrix opcode
Width(NumericWidth)
Numeric width tag for compact typed opcodes (AddTyped, SubTyped, etc.)
TypedLocal(u16, NumericWidth)
Local index + width for StoreLocalTyped
TypedModuleBinding(u16, NumericWidth)
Module binding index + width for StoreModuleBindingTyped
FieldOffset(u16)
Byte offset into a typed struct for FieldLoad/FieldStore v2 opcodes
ClosureAlloc
Closure allocation operand used exclusively by MakeClosure (Phase H5).
Carries both the function id and a compile-time escape flag. The flag is read at MIR lowering time to pick between stack-allocated (Phase E) and heap-allocated (Phase H2) codegen; the interpreter ignores it (both variants build a heap closure in the VM).
Operand::Function(fid) is also accepted by MakeClosure and is
equivalent to ClosureAlloc { fid, escapes: false } — the compiler
emits the richer form only when the storage planner has concluded the
closure escapes.
Trait Implementations§
impl Copy for Operand
Source§impl<'de> Deserialize<'de> for Operand
impl<'de> Deserialize<'de> for Operand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Operand
Auto Trait Implementations§
impl Freeze for Operand
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnsafeUnpin for Operand
impl UnwindSafe for Operand
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more