#include <lscript_execute.h>
Collaboration diagram for LLScriptExecute:
Public Member Functions | |
LLScriptExecute (FILE *fp) | |
LLScriptExecute (U8 *buffer) | |
~LLScriptExecute () | |
void | init () |
U32 | run (BOOL b_print, const LLUUID &id, char **errorstr, BOOL &state_transition) |
Public Attributes | |
BOOL(* | mExecuteFuncs [0x100])(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) |
U32 | mInstructionCount |
U8 * | mBuffer |
LLScriptEventData | mEventData |
Static Public Attributes | |
static S64 | sGlobalInstructionCount = 0 |
Private Member Functions | |
void | recordBoundaryError (const LLUUID &id) |
void | setStateEventOpcoodeStartSafely (S32 state, LSCRIPTStateEventType event, const LLUUID &id) |
Definition at line 367 of file lscript_execute.h.
LLScriptExecute::LLScriptExecute | ( | FILE * | fp | ) |
Definition at line 64 of file lscript_execute.cpp.
References bytestream2integer(), init(), llendl, llwarns, mBuffer, and S32.
LLScriptExecute::LLScriptExecute | ( | U8 * | buffer | ) |
LLScriptExecute::~LLScriptExecute | ( | ) |
void LLScriptExecute::init | ( | ) |
Definition at line 99 of file lscript_execute.cpp.
References binary_operations, float_float_operation(), float_integer_operation(), float_list_operation(), float_operation(), float_vector_operation(), i, integer_float_operation(), integer_integer_operation(), integer_list_operation(), integer_operation(), integer_vector_operation(), j, key_key_operation(), key_list_operation(), key_string_operation(), list_float_operation(), list_integer_operation(), list_key_operation(), list_list_operation(), list_quaternion_operation(), list_string_operation(), list_vector_operation(), LOPC_ADD, LOPC_BITAND, LOPC_BITNOT, LOPC_BITOR, LOPC_BITXOR, LOPC_BOOLAND, LOPC_BOOLNOT, LOPC_BOOLOR, LOPC_CALL, LOPC_CALLLIB, LOPC_CALLLIB_TWO_BYTE, LOPC_CAST, LOPC_DIV, LOPC_DUP, LOPC_DUPL, LOPC_DUPQ, LOPC_DUPS, LOPC_DUPV, LOPC_EQ, LOPC_GEQ, LOPC_GREATER, LOPC_JUMP, LOPC_JUMPIF, LOPC_JUMPNIF, LOPC_LEQ, LOPC_LESS, LOPC_LOADGLP, LOPC_LOADGP, LOPC_LOADGQP, LOPC_LOADGSP, LOPC_LOADGVP, LOPC_LOADLP, LOPC_LOADP, LOPC_LOADQP, LOPC_LOADSP, LOPC_LOADVP, LOPC_MOD, LOPC_MUL, LOPC_NEG, LOPC_NEQ, LOPC_NOOP, LOPC_POP, LOPC_POPARG, LOPC_POPBP, LOPC_POPIP, LOPC_POPL, LOPC_POPQ, LOPC_POPS, LOPC_POPSLR, LOPC_POPSP, LOPC_POPV, LOPC_PRINT, LOPC_PUSH, LOPC_PUSHARGB, LOPC_PUSHARGE, LOPC_PUSHARGF, LOPC_PUSHARGI, LOPC_PUSHARGQ, LOPC_PUSHARGS, LOPC_PUSHARGV, LOPC_PUSHBP, LOPC_PUSHE, LOPC_PUSHEQ, LOPC_PUSHEV, LOPC_PUSHG, LOPC_PUSHGL, LOPC_PUSHGQ, LOPC_PUSHGS, LOPC_PUSHGV, LOPC_PUSHIP, LOPC_PUSHL, LOPC_PUSHQ, LOPC_PUSHS, LOPC_PUSHSP, LOPC_PUSHV, LOPC_RETURN, LOPC_SHL, LOPC_SHR, LOPC_STACKTOL, LOPC_STACKTOS, LOPC_STATE, LOPC_STORE, LOPC_STOREG, LOPC_STOREGL, LOPC_STOREGQ, LOPC_STOREGS, LOPC_STOREGV, LOPC_STOREL, LOPC_STOREQ, LOPC_STORES, LOPC_STOREV, LOPC_SUB, LSCRIPTOpCodes, LST_EOF, LST_FLOATINGPOINT, LST_INTEGER, LST_KEY, LST_LIST, LST_QUATERNION, LST_STRING, LST_VECTOR, mExecuteFuncs, mInstructionCount, quaternion_list_operation(), quaternion_operation(), quaternion_quaternion_operation(), run_add(), run_bitand(), run_bitnot(), run_bitor(), run_bitxor(), run_booland(), run_boolnot(), run_boolor(), run_call(), run_calllib(), run_calllib_two_byte(), run_cast(), run_div(), run_dup(), run_dupl(), run_dupq(), run_dups(), run_dupv(), run_eq(), run_geq(), run_greater(), run_jump(), run_jumpif(), run_jumpnif(), run_leq(), run_less(), run_loadglp(), run_loadgp(), run_loadgqp(), run_loadgsp(), run_loadgvp(), run_loadlp(), run_loadp(), run_loadqp(), run_loadsp(), run_loadvp(), run_mod(), run_mul(), run_neg(), run_neq(), run_noop(), run_pop(), run_poparg(), run_popbp(), run_popip(), run_popl(), run_popq(), run_pops(), run_popslr(), run_popsp(), run_popv(), run_print(), run_push(), run_pushargb(), run_pusharge(), run_pushargf(), run_pushargi(), run_pushargq(), run_pushargs(), run_pushargv(), run_pushbp(), run_pushe(), run_pusheq(), run_pushev(), run_pushg(), run_pushgl(), run_pushgq(), run_pushgs(), run_pushgv(), run_puship(), run_pushl(), run_pushq(), run_pushs(), run_pushsp(), run_pushv(), run_return(), run_shl(), run_shr(), run_stacktol(), run_stacktos(), run_state(), run_store(), run_storeg(), run_storegl(), run_storegq(), run_storegs(), run_storegv(), run_storel(), run_storeq(), run_stores(), run_storev(), run_sub(), S32, string_key_operation(), string_list_operation(), string_string_operation(), unary_operations, unknown_operation(), vector_float_operation(), vector_integer_operation(), vector_list_operation(), vector_operation(), vector_quaternion_operation(), and vector_vector_operation().
Referenced by LLScriptExecute().
Definition at line 273 of file lscript_execute.cpp.
References llendl, llwarns, LSRF_BOUND_CHECK_ERROR, mBuffer, and set_fault().
Referenced by run(), and setStateEventOpcoodeStartSafely().
U32 LLScriptExecute::run | ( | BOOL | b_print, | |
const LLUUID & | id, | |||
char ** | errorstr, | |||
BOOL & | state_transition | |||
) |
Definition at line 299 of file lscript_execute.cpp.
References add_register_fp(), CREDIT_MONEY_FLAG, DELETE_FLAG, LLLinkedList< DATA_TYPE >::deleteAllData(), LLLinkedList< DATA_TYPE >::deleteCurrentData(), f, FALSE, get_event_register(), get_event_stack_size(), get_handled_events(), get_register(), LLLinkedList< DATA_TYPE >::getFirstData(), LLLinkedList< DATA_TYPE >::getNextData(), LLScriptEventData::getNextEvent(), llendl, llwarns, LREG_BP, LREG_CE, LREG_CS, LREG_ER, LREG_ESR, LREG_FR, LREG_HP, LREG_HR, LREG_IE, LREG_IP, LREG_NS, LREG_SP, LREG_VN, lsa_print_heap(), lscript_push(), lscript_push_variable(), lscript_pusharge(), LSCRIPTRunTimeFaultStrings, LSCRIPTStateBitField, LSL2_VERSION1_END_NUMBER, LSL2_VERSION_NUMBER, LSRF_VERSION_MISMATCH, LSTT_NULL, LSTT_REZ, LSTT_STATE_ENTRY, LSTT_STATE_EXIT, mBuffer, LLScriptDataCollection::mData, mEventData, LLScriptEventData::mEventDataList, mExecuteFuncs, mInstructionCount, LLScriptLibData::mType, LLScriptDataCollection::mType, NO_DELETE_FLAG, NULL, opcode, recordBoundaryError(), return_first_event(), S32, safe_instruction_bytestream2byte(), set_bp(), set_event_register(), set_fault(), set_ip(), set_register(), setStateEventOpcoodeStartSafely(), sGlobalInstructionCount, size, and TRUE.
Referenced by lscript_run().
void LLScriptExecute::setStateEventOpcoodeStartSafely | ( | S32 | state, | |
LSCRIPTStateEventType | event, | |||
const LLUUID & | id | |||
) | [private] |
Definition at line 281 of file lscript_execute.cpp.
References get_state_event_opcoode_start(), mBuffer, recordBoundaryError(), S32, and set_ip().
Referenced by run().
Definition at line 380 of file lscript_execute.h.
Referenced by LLScriptExecute(), lscript_run(), recordBoundaryError(), run(), setStateEventOpcoodeStartSafely(), and ~LLScriptExecute().
BOOL(* LLScriptExecute::mExecuteFuncs[0x100])(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) |
S64 LLScriptExecute::sGlobalInstructionCount = 0 [static] |