Namespace VM.Core.Instructions
Classes
AddInstruction
Adds the top two stack values.
AndInstruction
Performs logical AND on top two boolean values.
CallInstruction
Calls a function at the specified address.
CallStack
Represents the call stack for managing function calls and returns.
CmpInstruction
Compares the top two stack values (-1, 0, or 1 result).
DataStack
Represents the data stack for storing operands during execution.
DivInstruction
Divides the top two stack values.
DupInstruction
Duplicates the top stack value.
EqInstruction
Tests for equality of top two stack values.
GetIndexInstruction
Gets an array element at specified index.
HaltInstruction
Terminates virtual machine execution.
InputInstruction
Reads input from console and pushes onto stack.
Instruction
Abstract base class for all virtual machine instructions.
JmpInstruction
Performs an unconditional jump.
JnzInstruction
Jumps if top stack value is not zero.
JzInstruction
Jumps if top stack value is zero.
LoadInstruction
Loads a local variable onto the stack.
ModInstruction
Computes modulus of the top two integer values.
MulInstruction
Multiplies the top two stack values.
NegInstruction
Negates the top numeric stack value.
NeqInstruction
Tests for inequality of top two stack values.
NewArrayInstruction
Creates a new array and pushes it onto the stack.
NotInstruction
Logically negates the top boolean stack value.
OrInstruction
Performs logical OR on top two boolean values.
OverInstruction
Copies the second stack value to the top.
PopInstruction
Pops and discards the top stack value.
PrintInstruction
Pops and prints the top stack value to console.
PushInstruction
Pushes an integer constant onto the stack.
PushStringInstruction
Pushes a string constant onto the stack.
RetInstruction
Returns from a function call.
SetIndexInstruction
Sets an array element at specified index.
StoreInstruction
Stores the top stack value into a local variable.
SubInstruction
Subtracts the top two stack values.
SwapInstruction
Swaps the top two stack values.
VmArray
Represents an array of values in the virtual machine.
VmException
The base exception class for all virtual machine runtime errors.
VmHaltException
Special exception thrown by HALT instruction to terminate execution.
VmMemoryException
Represents errors that occur during memory access operations in the virtual machine.
VmStackException
Represents errors that occur during stack operations in the virtual machine.
VmTypeException
Represents errors that occur when type checking fails in the virtual machine.
Structs
VmValue
Represents a typed value in the virtual machine.
Enums
OpCode
Represents the bytecode operation codes (opcodes) for the virtual machine.
VmType
Represents the data types supported by the virtual machine.