CodeStream
Engine/source/console/compiler.h
Utility class to emit and patch bytecode.
Code fixing stacks
}
{
bool
inLoop()
pushFixScope(bool isLoop)
addBreakLine(U32 lineNumber, U32 ip)
emitCodeStream(U32 * size, U32 ** stream, U32 ** lineBreaks)
Vector< bool >
Public Types
Detailed Description
Utility class to emit and patch bytecode.
Emitted code
{
CodeData * mCode
CodeData * mCodeHead
U32 mCodePos
Code fixing stacks
}
{
CodeStream()
~CodeStream()
allocCode(U32 sz)
emit(U32 code)
patch(U32 addr, U32 code)
emitSTE(const char * code)
tell()
inLoop()
emitFix(FixType type)
pushFixScope(bool isLoop)
popFixScope()
fixLoop(U32 loopBlockStart, U32 breakPoint, U32 continuePoint)
addBreakLine(U32 lineNumber, U32 ip)
getNumLineBreaks()
emitCodeStream(U32 * size, U32 ** stream, U32 ** lineBreaks)
reset()
Vector< U32 > mFixList
Vector< U32 > mFixStack
Vector< bool > mFixLoopStack
Vector< PatchEntry > mPatchList
Vector< U32 > mBreakLines
}
Line numbers