NaVM

NaVM abstract class

Constructors

this
this()

constructor

Destructor

~this
~this()
Undocumented in source.

Members

Functions

_readArg
T _readArg()
T _readArg(uinteger argAddr)

Gets an argument. **Do not use this when argument is array (string)**

_readArgArray
void _readArgArray(T[] array)

Reads an array from arguments. Will try to read enough bytes to fill array

_writeArg
bool _writeArg(uinteger argAddr, T val)

Changes value of an argument. **Do not use this when argument is array (string)**

execute
void execute(string labelName)
void execute(uinteger labelIndex)

starts execution from a label. Will do nothing if label invalid or doesnt exist

loadBytecode
string[] loadBytecode(NaBytecode code)

loads bytecode

Properties

instTable
NaInstTable instTable [@property getter]

instruction table.

labelNames
string[] labelNames [@property getter]

label names, at corresponding label index

Variables

_argIndex
uinteger _argIndex;

index next argument

_args
ubyte[] _args;

stores arguments

_instIndex
uinteger _instIndex;

index of next instruction

_instTable
NaInstTable _instTable;

instruction table

_instructions
void delegate()[] _instructions;

the instruction pointers

_labelArgIndexes
uinteger[] _labelArgIndexes;

argument indexes for labels

_labelInstIndexes
uinteger[] _labelInstIndexes;

instruction indexes for labels

_labelNames
string[] _labelNames;

label names

Meta