#include <lscript_bytecode.h>
Collaboration diagram for LLScriptByteCodeChunk:
Public Member Functions | |
LLScriptByteCodeChunk (BOOL b_need_jumps) | |
~LLScriptByteCodeChunk () | |
void | addByte (U8 byte) |
void | addU16 (U16 data) |
void | addBytes (U8 *bytes, S32 size) |
void | addBytes (char *bytes, S32 size) |
void | addBytes (S32 size) |
void | addBytesDontInc (S32 size) |
void | addInteger (S32 value) |
void | addFloat (F32 value) |
void | addLabel (char *name) |
void | addJump (char *name) |
void | connectJumps () |
Public Attributes | |
U8 * | mCodeChunk |
S32 | mCurrentOffset |
LLScriptJumpTable * | mJumpTable |
Definition at line 51 of file lscript_bytecode.h.
LLScriptByteCodeChunk::LLScriptByteCodeChunk | ( | BOOL | b_need_jumps | ) |
LLScriptByteCodeChunk::~LLScriptByteCodeChunk | ( | ) |
Definition at line 80 of file lscript_bytecode.cpp.
References mCodeChunk, and mCurrentOffset.
Referenced by add_exit_pops(), add_return(), cast2stack(), operation2stack(), LLScriptDeclaration::recurse(), LLScriptWhile::recurse(), LLScriptDoWhile::recurse(), LLScriptFor::recurse(), LLScriptIfElse::recurse(), LLScriptIf::recurse(), LLScriptExpressionStatement::recurse(), LLScriptReturn::recurse(), LLScriptJump::recurse(), LLScriptStateChange::recurse(), LLScriptPrint::recurse(), LLScriptFunctionCall::recurse(), LLScriptPostDecrement::recurse(), LLScriptPostIncrement::recurse(), LLScriptListInitializer::recurse(), LLScriptQuaternionInitializer::recurse(), LLScriptVectorInitializer::recurse(), LLScriptTypeCast::recurse(), LLScriptPreDecrement::recurse(), LLScriptPreIncrement::recurse(), LLScriptBitNot::recurse(), LLScriptBooleanNot::recurse(), LLScriptUnaryMinus::recurse(), LLScriptShiftRight::recurse(), LLScriptShiftLeft::recurse(), LLScriptBooleanOr::recurse(), LLScriptBooleanAnd::recurse(), LLScriptBitXor::recurse(), LLScriptBitOr::recurse(), LLScriptBitAnd::recurse(), LLScriptMod::recurse(), LLScriptDivide::recurse(), LLScriptTimes::recurse(), LLScriptMinus::recurse(), LLScriptPlus::recurse(), LLScriptGreaterThan::recurse(), LLScriptLessThan::recurse(), LLScriptGreaterEquals::recurse(), LLScriptLessEquals::recurse(), LLScriptNotEquals::recurse(), LLScriptEquality::recurse(), LLScriptModAssignment::recurse(), LLScriptDivAssignment::recurse(), LLScriptMulAssignment::recurse(), LLScriptSubAssignment::recurse(), LLScriptAddAssignment::recurse(), LLScriptLValue::recurse(), LLScriptListExpressionList::recurse(), LLScriptFuncExpressionList::recurse(), LLScriptForExpressionList::recurse(), LLScriptConstantString::recurse(), LLScriptConstantFloat::recurse(), LLScriptConstantInteger::recurse(), and store2stack().
Definition at line 104 of file lscript_bytecode.cpp.
References mCodeChunk, and mCurrentOffset.
Referenced by addFloat(), addInteger(), addU16(), LLScriptScript::recurse(), LLScriptState::recurse(), LLScriptGlobalFunctions::recurse(), LLScriptFunctionDec::recurse(), LLScriptEventHandler::recurse(), LLScriptDeclaration::recurse(), LLScriptWhile::recurse(), LLScriptDoWhile::recurse(), LLScriptFor::recurse(), LLScriptIfElse::recurse(), LLScriptIf::recurse(), LLScriptJump::recurse(), LLScriptNotAtRotTarget::recurse(), LLScriptAtRotTarget::recurse(), LLScriptNotAtTarget::recurse(), LLScriptAtTarget::recurse(), LLScriptNoSensorEvent::recurse(), LLScriptRezEvent::recurse(), LLScriptEmailEvent::recurse(), LLScriptMoneyEvent::recurse(), LLScriptHTTPResponseEvent::recurse(), LLScriptRemoteEvent::recurse(), LLScriptLinkMessageEvent::recurse(), LLScriptControlEvent::recurse(), LLScriptObjectRezEvent::recurse(), LLScriptSensorEvent::recurse(), LLScriptChatEvent::recurse(), LLScriptRTPEvent::recurse(), LLScriptMovingEndEvent::recurse(), LLScriptMovingStartEvent::recurse(), LLScriptTimerEvent::recurse(), LLScriptDataserverEvent::recurse(), LLScriptAttachEvent::recurse(), LLScriptInventoryEvent::recurse(), LLScriptLandCollisionEndEvent::recurse(), LLScriptLandCollisionEvent::recurse(), LLScriptLandCollisionStartEvent::recurse(), LLScriptCollisionEndEvent::recurse(), LLScriptCollisionEvent::recurse(), LLScriptCollisionStartEvent::recurse(), LLScriptTouchEndEvent::recurse(), LLScriptTouchEvent::recurse(), LLScriptTouchStartEvent::recurse(), LLScriptStateExitEvent::recurse(), LLScriptStateEntryEvent::recurse(), LLScriptGlobalVariable::recurse(), LLScriptSAList::recurse(), LLScriptSAIdentifier::recurse(), and LLScriptConstantString::recurse().
Definition at line 179 of file lscript_bytecode.cpp.
References addBytes(), float2bytestream(), and S32.
Referenced by LLScriptDeclaration::recurse(), LLScriptPostDecrement::recurse(), LLScriptPostIncrement::recurse(), LLScriptPreDecrement::recurse(), LLScriptPreIncrement::recurse(), LLScriptGlobalVariable::recurse(), and LLScriptConstantFloat::recurse().
Definition at line 171 of file lscript_bytecode.cpp.
References addBytes(), integer2bytestream(), and S32.
Referenced by LLScriptDeclaration::recurse(), LLScriptReturn::recurse(), LLScriptStateChange::recurse(), LLScriptFunctionCall::recurse(), LLScriptPostDecrement::recurse(), LLScriptPostIncrement::recurse(), LLScriptListInitializer::recurse(), LLScriptPreDecrement::recurse(), LLScriptPreIncrement::recurse(), LLScriptLValue::recurse(), LLScriptGlobalVariable::recurse(), LLScriptSAList::recurse(), LLScriptConstantString::recurse(), LLScriptConstantInteger::recurse(), and store2stack().
void LLScriptByteCodeChunk::addJump | ( | char * | name | ) |
Definition at line 195 of file lscript_bytecode.cpp.
References LLScriptJumpTable::addJump(), mCurrentOffset, and mJumpTable.
Referenced by LLScriptWhile::recurse(), LLScriptDoWhile::recurse(), LLScriptFor::recurse(), LLScriptIfElse::recurse(), LLScriptIf::recurse(), and LLScriptJump::recurse().
void LLScriptByteCodeChunk::addLabel | ( | char * | name | ) |
Definition at line 187 of file lscript_bytecode.cpp.
References LLScriptJumpTable::addLabel(), mCurrentOffset, and mJumpTable.
Referenced by LLScriptWhile::recurse(), LLScriptDoWhile::recurse(), LLScriptFor::recurse(), LLScriptIfElse::recurse(), LLScriptIf::recurse(), and LLScriptLabel::recurse().
Definition at line 96 of file lscript_bytecode.cpp.
References addBytes(), S32, and u162bytestream().
Referenced by LLScriptFunctionCall::recurse().
void LLScriptByteCodeChunk::connectJumps | ( | ) |
Definition at line 209 of file lscript_bytecode.cpp.
References integer2bytestream(), mCodeChunk, LLScriptJumpTable::mJumpMap, mJumpTable, LLScriptJumpTable::mLabelMap, and S32.
Referenced by LLScriptGlobalFunctions::recurse(), and LLScriptEventHandler::recurse().
Definition at line 69 of file lscript_bytecode.h.
Referenced by addByte(), addBytes(), addBytesDontInc(), LLScriptScriptCodeChunk::build(), connectJumps(), LLScriptScript::recurse(), LLScriptState::recurse(), LLScriptGlobalFunctions::recurse(), LLScriptEventHandler::recurse(), LLScriptGlobalVariable::recurse(), LLScriptSAQuaternion::recurse(), LLScriptSAVector::recurse(), and ~LLScriptByteCodeChunk().
Definition at line 70 of file lscript_bytecode.h.
Referenced by addByte(), addBytes(), addBytesDontInc(), addJump(), addLabel(), LLScriptScriptCodeChunk::build(), LLScriptState::recurse(), LLScriptGlobalFunctions::recurse(), LLScriptEventHandler::recurse(), LLScriptGlobalVariable::recurse(), LLScriptSAList::recurse(), LLScriptSAQuaternion::recurse(), LLScriptSAVector::recurse(), and LLScriptConstantString::recurse().
Definition at line 71 of file lscript_bytecode.h.
Referenced by addJump(), addLabel(), connectJumps(), LLScriptByteCodeChunk(), and ~LLScriptByteCodeChunk().