NaInstruction

stores an data about available instruction

Constructors

this
this(string name, integer code, void delegate() pointer)

constructor, for instruction with no arg, no push/pop

this
this(string name, integer code, integer popCount, integer pushCount, void delegate() pointer)

constructor, for instruction with no arg, but pop and push

this
this(string name, integer code, bool needsArg, integer popCount, integer pushCount, void delegate() pointer)

full constructor but arg is not jump position

this
this(string name, integer code, bool needsArg, bool argIsJumpPos, integer popCount, integer pushCount, void delegate() pointer)

full constructor

Members

Functions

popCount
ubyte popCount(NaData arg)

Variables

argIsJumpPos
bool argIsJumpPos;

if the argument to this instruction is a jump position

code
ushort code;

value when read as a ubyte

name
string name;

name of instruction, in lowercase

needsArg
bool needsArg;

if this instruction needs an argument

pointer
void delegate() pointer;

pointer to the delegate behind this instruction

pushCount
ubyte pushCount;

number of elements it will push to stack

Meta