- addBookmark
integer addBookmark()
adds a "bookmark" to the last element on stack, so later on, relative to current peek index, bookmark index
can be read.
- addInstruction
bool addInstruction(string instName, string argument, string error)
bool addInstruction(string instName, string argument)
- addInstructionToTable
bool addInstructionToTable(NaInstruction instruction)
adds an instruction to the instruction table
- addJumpPos
void addJumpPos(string name)
- bookmarkRelIndex
integer bookmarkRelIndex(uinteger id)
gets relative index from current stack index to a bookmark
- getArgumentsNaData
NaData[] getArgumentsNaData()
Call resolve before this.
- getBytecodeCodes
ushort[] getBytecodeCodes()
Call resolve before this or prepare for crashes
- getBytecodePointers
void delegate()[] getBytecodePointers()
Call resolve before this or prepare for crashes
- getBytecodePretty
string[] getBytecodePretty()
- hasInstruction
bool hasInstruction(string name, NaInstruction instruction)
bool hasInstruction(string name)
- readByteCode
string[] readByteCode(string[] input)
Reads from a string[] (follows spec/syntax.md)
- removeBookmark
bool removeBookmark(uinteger id)
- resolve
string[] resolve()
goes over bytecode, checks if there are any errors, and converts jump positions to indexes
i.e: makes the byte code a bit more ready for execution
Class used for storing/constructing bytecode