IRstate

struct IRstate {
OutBuffer codebuf;
Statement breakTarget;
Statement continueTarget;
ScopeStatement scopeContext;
uint[] fixups;
uint locali;
uint nlocals;
}

Members

Functions

addFixup
void addFixup(uint index)

Add this IP to list of jump instructions to patch.

alloc
uint alloc(size_t nlocals)

Allocate a block of local variables, and return an index to them.

doFixups
void doFixups()

Go through the list of fixups and patch them.

genX
void genX(Loc loc, uint opcode, Args args)

Generate code.

getIP
uint getIP()

Get the current "instruction pointer"

patchJmp
void patchJmp(uint index, uint value)

Patch a value into the existing codebuf.

release
void release(uint local, uint n)

Release this block of n locals starting at local.

Meta