#[repr(u8)]pub enum OpCode {
Show 185 variants
PushConst = 0,
PushNull = 1,
Pop = 2,
Dup = 3,
Swap = 4,
Add = 16,
Sub = 17,
Mul = 18,
Div = 19,
Mod = 20,
Neg = 21,
Pow = 22,
BitAnd = 23,
BitOr = 24,
BitShl = 25,
BitShr = 26,
BitNot = 27,
BitXor = 28,
Gt = 32,
Lt = 33,
Gte = 34,
Lte = 35,
Eq = 36,
Neq = 37,
GtInt = 38,
GtNumber = 39,
GtDecimal = 40,
LtInt = 41,
LtNumber = 42,
LtDecimal = 43,
GteInt = 44,
GteNumber = 45,
GteDecimal = 46,
LteInt = 47,
And = 48,
Or = 49,
Not = 50,
AddInt = 51,
AddNumber = 52,
AddDecimal = 53,
SubInt = 54,
SubNumber = 55,
SubDecimal = 56,
MulInt = 57,
MulNumber = 58,
MulDecimal = 59,
DivInt = 60,
DivNumber = 61,
DivDecimal = 62,
ModInt = 63,
Jump = 64,
JumpIfFalse = 65,
JumpIfTrue = 66,
Call = 67,
Return = 68,
ReturnValue = 69,
CallValue = 70,
LoadLocal = 80,
StoreLocal = 81,
LoadModuleBinding = 82,
StoreModuleBinding = 83,
LoadClosure = 84,
StoreClosure = 85,
MakeClosure = 86,
CloseUpvalue = 87,
MakeRef = 88,
DerefLoad = 89,
DerefStore = 90,
SetIndexRef = 91,
BoxLocal = 92,
BoxModuleBinding = 93,
NewArray = 96,
NewObject = 97,
GetProp = 98,
SetProp = 99,
Length = 100,
ArrayPush = 101,
ArrayPop = 102,
MergeObject = 103,
SetLocalIndex = 104,
SetModuleBindingIndex = 105,
ArrayPushLocal = 106,
NewMatrix = 107,
NewTypedArray = 108,
LoopStart = 112,
LoopEnd = 113,
Break = 114,
Continue = 115,
IterNext = 116,
IterDone = 117,
Pattern = 131,
CallMethod = 136,
PushTimeframe = 137,
PopTimeframe = 138,
RunSimulation = 139,
BuiltinCall = 144,
TypeCheck = 145,
Convert = 146,
ModNumber = 147,
ModDecimal = 148,
PowInt = 149,
PowNumber = 150,
PowDecimal = 151,
LteNumber = 152,
LteDecimal = 153,
EqInt = 154,
EqNumber = 155,
NeqInt = 156,
NeqNumber = 157,
SetupTry = 160,
PopHandler = 161,
Throw = 162,
TryUnwrap = 163,
UnwrapOption = 164,
ErrorContext = 165,
IsOk = 166,
IsErr = 167,
UnwrapOk = 168,
UnwrapErr = 169,
SliceAccess = 176,
NullCoalesce = 177,
MakeRange = 178,
AddTyped = 179,
SubTyped = 180,
MulTyped = 181,
DivTyped = 182,
ModTyped = 183,
CmpTyped = 184,
GetDataField = 192,
GetDataRow = 193,
GetFieldTyped = 208,
SetFieldTyped = 209,
NewTypedObject = 210,
TypedMergeObject = 211,
WrapTypeAnnotation = 212,
Yield = 224,
Suspend = 225,
Resume = 226,
Poll = 227,
AwaitBar = 228,
AwaitTick = 229,
Await = 230,
SpawnTask = 231,
EmitAlert = 232,
EmitEvent = 233,
JoinInit = 234,
JoinAwait = 235,
CancelTask = 236,
AsyncScopeEnter = 237,
AsyncScopeExit = 238,
LoadColF64 = 194,
LoadColI64 = 195,
LoadColBool = 196,
LoadColStr = 197,
BindSchema = 198,
BoxTraitObject = 239,
DynMethodCall = 199,
DropCall = 200,
DropCallAsync = 201,
AddIntTrusted = 202,
SubIntTrusted = 203,
MulIntTrusted = 204,
DivIntTrusted = 205,
AddNumberTrusted = 206,
SubNumberTrusted = 207,
MulNumberTrusted = 213,
DivNumberTrusted = 214,
LoadLocalTrusted = 215,
JumpIfFalseTrusted = 216,
GtIntTrusted = 217,
LtIntTrusted = 218,
GteIntTrusted = 219,
LteIntTrusted = 220,
GtNumberTrusted = 221,
LtNumberTrusted = 222,
GteNumberTrusted = 223,
LteNumberTrusted = 158,
Nop = 240,
Halt = 241,
Debug = 242,
IntToNumber = 243,
NumberToInt = 244,
CallForeign = 245,
StoreLocalTyped = 246,
CastWidth = 247,
}Variants§
PushConst = 0
Push a constant onto the stack
PushNull = 1
Push null onto the stack
Pop = 2
Pop value from stack
Dup = 3
Duplicate top of stack
Swap = 4
Swap top two values
Add = 16
Add two numbers
Sub = 17
Subtract two numbers
Mul = 18
Multiply two numbers
Div = 19
Divide two numbers
Mod = 20
Modulo operation
Neg = 21
Negate number
Pow = 22
Power operation
BitAnd = 23
Bitwise AND
BitOr = 24
Bitwise OR
BitShl = 25
Bitwise shift left
BitShr = 26
Bitwise shift right
BitNot = 27
Bitwise NOT
BitXor = 28
Bitwise XOR
Gt = 32
Greater than
Lt = 33
Less than
Gte = 34
Greater than or equal
Lte = 35
Less than or equal
Eq = 36
Equal
Neq = 37
Not equal
GtInt = 38
Greater than (int × int → bool)
GtNumber = 39
Greater than (f64 × f64 → bool)
GtDecimal = 40
Greater than (decimal × decimal → bool)
LtInt = 41
Less than (int × int → bool)
LtNumber = 42
Less than (f64 × f64 → bool)
LtDecimal = 43
Less than (decimal × decimal → bool)
GteInt = 44
Greater than or equal (int × int → bool)
GteNumber = 45
Greater than or equal (f64 × f64 → bool)
GteDecimal = 46
Greater than or equal (decimal × decimal → bool)
LteInt = 47
Less than or equal (int × int → bool)
And = 48
Logical AND
Or = 49
Logical OR
Not = 50
Logical NOT
AddInt = 51
Add (int × int → int)
AddNumber = 52
Add (f64 × f64 → f64)
AddDecimal = 53
Add (decimal × decimal → decimal)
SubInt = 54
Subtract (int × int → int)
SubNumber = 55
Subtract (f64 × f64 → f64)
SubDecimal = 56
Subtract (decimal × decimal → decimal)
MulInt = 57
Multiply (int × int → int)
MulNumber = 58
Multiply (f64 × f64 → f64)
MulDecimal = 59
Multiply (decimal × decimal → decimal)
DivInt = 60
Divide (int × int → int)
DivNumber = 61
Divide (f64 × f64 → f64)
DivDecimal = 62
Divide (decimal × decimal → decimal)
ModInt = 63
Modulo (int × int → int)
Jump = 64
Unconditional jump
JumpIfFalse = 65
Jump if false (pop condition)
JumpIfTrue = 66
Jump if true (pop condition)
Call = 67
Function call
Return = 68
Return from function
ReturnValue = 69
Return with value
CallValue = 70
Call a value (function/closure) from the stack
LoadLocal = 80
Load local variable
StoreLocal = 81
Store local variable
LoadModuleBinding = 82
Load module_binding variable
StoreModuleBinding = 83
Store module_binding variable
LoadClosure = 84
Load from closure upvalue
StoreClosure = 85
Store to closure upvalue
MakeClosure = 86
Create a closure with captured upvalues
CloseUpvalue = 87
Close upvalue - moves stack local to heap when leaving scope
MakeRef = 88
Create a reference to a local variable’s stack slot
DerefLoad = 89
Load the value that a reference points to
DerefStore = 90
Store a value through a reference
SetIndexRef = 91
Set an index on the array that a reference points to (in-place mutation)
BoxLocal = 92
Box a local variable into a SharedCell for mutable closure capture. Converts the local slot to a SharedCell (if not already one), then pushes the SharedCell ValueWord onto the stack for MakeClosure to consume.
BoxModuleBinding = 93
Box a module binding into a SharedCell for mutable closure capture. Same as BoxLocal but operates on the module_bindings vector.
NewArray = 96
Create new array
NewObject = 97
Create new object
GetProp = 98
Get property/index
SetProp = 99
Set property/index
Length = 100
Get array/object length
ArrayPush = 101
Push value to array
ArrayPop = 102
Pop value from array
MergeObject = 103
Merge object fields from stack into another object
SetLocalIndex = 104
Set index on a local array without loading/cloning through the stack
SetModuleBindingIndex = 105
Set index on a module_binding array without loading/cloning through the stack
ArrayPushLocal = 106
Push value to array stored in a local variable, mutating in-place
NewMatrix = 107
Create a new Matrix from rows*cols f64 values on the stack
NewTypedArray = 108
Create a typed array (IntArray/FloatArray/BoolArray) from N homogeneous elements Operand: Count(n) — number of elements to pop At runtime, inspects element types and packs into the appropriate typed array
LoopStart = 112
Start of loop (for break/continue)
LoopEnd = 113
End of loop
Break = 114
Break from loop
Continue = 115
Continue to next iteration
IterNext = 116
Iterator next
IterDone = 117
Check if iterator done
Pattern = 131
Pattern match (generic pattern matching, not domain-specific)
CallMethod = 136
Call method on value (series.mean(), etc.)
PushTimeframe = 137
Push timeframe context
PopTimeframe = 138
Pop timeframe context
RunSimulation = 139
Execute simulation with config object on stack (generic state simulation)
BuiltinCall = 144
Call built-in function
TypeCheck = 145
Type check
Convert = 146
Convert type
ModNumber = 147
Modulo (f64 × f64 → f64)
ModDecimal = 148
Modulo (decimal × decimal → decimal)
PowInt = 149
Power (int × int → int)
PowNumber = 150
Power (f64 × f64 → f64)
PowDecimal = 151
Power (decimal × decimal → decimal)
LteNumber = 152
Less than or equal (f64 × f64 → bool)
LteDecimal = 153
Less than or equal (decimal × decimal → bool)
EqInt = 154
Equal (int × int → bool)
EqNumber = 155
Equal (f64 × f64 → bool)
NeqInt = 156
Not equal (int × int → bool)
NeqNumber = 157
Not equal (f64 × f64 → bool)
SetupTry = 160
Set up try/catch block (operand: offset to catch handler)
PopHandler = 161
Pop exception handler (successful try block completion)
Throw = 162
Throw an exception (push error value first)
TryUnwrap = 163
Try operator: unified Result/Option propagation with early return on Err/None
UnwrapOption = 164
Unwrap Option: extract inner value from Some, panic on None
ErrorContext = 165
Add context to Result/Option failures and lift success into Result
IsOk = 166
Check whether Result is Ok(value)
IsErr = 167
Check whether Result is Err(error)
UnwrapOk = 168
Extract inner payload from Ok(value)
UnwrapErr = 169
Extract inner payload from Err(error)
SliceAccess = 176
Slice access (array[start:end])
NullCoalesce = 177
Null coalescing (a ?? b)
MakeRange = 178
Range constructor (start..end)
AddTyped = 179
Width-typed add: Operand::Width selects I8..F64
SubTyped = 180
Width-typed subtract: Operand::Width selects I8..F64
MulTyped = 181
Width-typed multiply: Operand::Width selects I8..F64
DivTyped = 182
Width-typed divide: Operand::Width selects I8..F64
ModTyped = 183
Width-typed modulo: Operand::Width selects I8..F64
CmpTyped = 184
Width-typed comparison (ordered): Operand::Width selects I8..F64 Result semantics: pushes -1 (a<b), 0 (a==b), or 1 (a>b)
GetDataField = 192
Get field from data row by column index (generic, industry-agnostic)
GetDataRow = 193
Get row reference (lightweight, no data copy)
GetFieldTyped = 208
Get field from typed object using precomputed offset
SetFieldTyped = 209
Set field on typed object using precomputed offset
NewTypedObject = 210
Create a new typed object with fields from stack
TypedMergeObject = 211
Merge two typed objects into a new typed object
WrapTypeAnnotation = 212
Wrap a value with a type annotation for meta formatting
Yield = 224
Yield to event loop for cooperative scheduling
Suspend = 225
Suspend until a condition is met
Resume = 226
Resume from suspension (internal use)
Poll = 227
Poll event queue
AwaitBar = 228
Await next data bar from a source
AwaitTick = 229
Await next timer tick
Await = 230
General-purpose await: suspends on Future values
SpawnTask = 231
Spawn an async task from the expression on top of stack
EmitAlert = 232
Emit an alert to the alert pipeline
EmitEvent = 233
Emit a generic event to the event queue
JoinInit = 234
Initialize a join group from spawned tasks on the stack
JoinAwait = 235
Await a TaskGroup to completion according to its join strategy
CancelTask = 236
Cancel a running task
AsyncScopeEnter = 237
Enter an async scope (structured concurrency boundary)
AsyncScopeExit = 238
Exit an async scope (structured concurrency boundary)
LoadColF64 = 194
Load f64 from typed column on a RowView
LoadColI64 = 195
Load i64 from typed column on a RowView
LoadColBool = 196
Load bool from typed column on a RowView
LoadColStr = 197
Load string from typed column on a RowView
BindSchema = 198
Bind a DataTable to a TypeSchema at runtime (safety net for dynamic paths)
BoxTraitObject = 239
Box a concrete value into a trait object with a vtable
DynMethodCall = 199
Call a method on a trait object via vtable dispatch
DropCall = 200
Call Drop::drop on the value at the top of stack (sync)
DropCallAsync = 201
Call Drop::drop on the value at the top of stack (async)
AddIntTrusted = 202
Add (int x int -> int) – trusted: skips runtime type guard
SubIntTrusted = 203
Sub (int x int -> int) – trusted: skips runtime type guard
MulIntTrusted = 204
Mul (int x int -> int) – trusted: skips runtime type guard
DivIntTrusted = 205
Div (int x int -> int) – trusted: skips runtime type guard
AddNumberTrusted = 206
Add (f64 x f64 -> f64) – trusted: skips runtime type guard
SubNumberTrusted = 207
Sub (f64 x f64 -> f64) – trusted: skips runtime type guard
MulNumberTrusted = 213
Mul (f64 x f64 -> f64) – trusted: skips runtime type guard
DivNumberTrusted = 214
Div (f64 x f64 -> f64) – trusted: skips runtime type guard
LoadLocalTrusted = 215
LoadLocal (trusted) – skips tag validation, reads slot directly
JumpIfFalseTrusted = 216
JumpIfFalse (trusted) – condition is known bool, direct bool check
GtIntTrusted = 217
Gt (int x int -> bool) – trusted: skips runtime type guard
LtIntTrusted = 218
Lt (int x int -> bool) – trusted: skips runtime type guard
GteIntTrusted = 219
Gte (int x int -> bool) – trusted: skips runtime type guard
LteIntTrusted = 220
Lte (int x int -> bool) – trusted: skips runtime type guard
GtNumberTrusted = 221
Gt (f64 x f64 -> bool) – trusted: skips runtime type guard
LtNumberTrusted = 222
Lt (f64 x f64 -> bool) – trusted: skips runtime type guard
GteNumberTrusted = 223
Gte (f64 x f64 -> bool) – trusted: skips runtime type guard
LteNumberTrusted = 158
Lte (f64 x f64 -> bool) – trusted: skips runtime type guard
Nop = 240
No operation
Halt = 241
Halt execution
Debug = 242
Debug breakpoint
IntToNumber = 243
Coerce int to number (i64 -> f64)
NumberToInt = 244
Coerce number to int (f64 -> i64, truncating)
CallForeign = 245
Call a linked foreign function. Dispatches through language runtime extensions or the VM native C ABI path. Operand: ForeignFunction(u16) — index into program.foreign_functions Stack: pops N args (count pushed as a constant by the stub), pushes 1 result
StoreLocalTyped = 246
Store a local with width truncation. Operand: TypedLocal(u16, NumericWidth) — local index + width Pops one value, truncates to declared width, stores to local.
CastWidth = 247
Cast a value to a specific integer width (bit-truncation, Rust-style as).
Operand: Width(NumericWidth) — target width
Pops one value, truncates, pushes result.
Implementations§
Source§impl OpCode
impl OpCode
Sourcepub const fn category(self) -> OpcodeCategory
pub const fn category(self) -> OpcodeCategory
Returns the category this opcode belongs to.
Sourcepub const fn stack_pops(self) -> u8
pub const fn stack_pops(self) -> u8
Returns the number of values this opcode pops from the stack. Returns 0 for variable-arity opcodes (Call, CallMethod, NewArray, etc.).
Sourcepub const fn stack_pushes(self) -> u8
pub const fn stack_pushes(self) -> u8
Returns the number of values this opcode pushes onto the stack. Returns 0 for variable-arity opcodes.
Source§impl OpCode
impl OpCode
Sourcepub const fn is_trusted(self) -> bool
pub const fn is_trusted(self) -> bool
Returns true if this is a trusted opcode variant (compiler-proved types, no runtime guard).
Sourcepub const fn guarded_variant(self) -> Option<OpCode>
pub const fn guarded_variant(self) -> Option<OpCode>
Map a trusted opcode back to its guarded (runtime-checked) counterpart.
This is the inverse of trusted_variant(): given a trusted opcode, it
returns the equivalent guarded opcode. Used for differential testing and
bytecode post-processing.
Sourcepub const fn trusted_variant(self) -> Option<OpCode>
pub const fn trusted_variant(self) -> Option<OpCode>
Map a guarded typed opcode to its trusted variant (if one exists).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OpCode
impl<'de> Deserialize<'de> for OpCode
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 Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnsafeUnpin for OpCode
impl UnwindSafe for OpCode
Blanket Implementations§
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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