Pol  Rev 533
Executor Class Reference

#include <executor.h>

+ Inheritance diagram for Executor:
+ Collaboration diagram for Executor:

List of all members.

Public Types

enum  DEBUG_LEVEL { NONE, SOURCELINES, INSTRUCTIONS }

Public Member Functions

 Executor (std::ostream &cerr)
virtual ~Executor ()
BObjectRef addmember (BObject &left, const BObject &right)
void addmember2 (BObject &left, const BObject &right)
void addModule (ExecutorModule *module)
void attach_debugger ()
bool AttachFunctionalityModules ()
void calcrunnable ()
BObjectRef checkmember (BObject &left, const BObject &right)
void dbg_break ()
void dbg_clrallbp ()
void dbg_clrbp (unsigned atPC)
std::string dbg_get_instruction (size_t atPC) const
void dbg_ins_trace ()
void dbg_run ()
void dbg_setbp (unsigned atPC)
void dbg_step_into ()
void dbg_step_over ()
bool debugging () const
void detach_debugger ()
bool empty_scriptname ()
bool error () const
bool exec ()
void execFunc (const Token &token)
void execInstr ()
ExecutorModulefindModule (const std::string &name)
BApplicObjBasegetApplicObjParam (unsigned param, const BApplicObjType *object_type)
void * getApplicPtrParam (unsigned param, const BApplicObjType *pointer_type)
void getArg (const Token &token)
int getDebugLevel ()
const BLonggetLongParam (unsigned param)
bool getObjArrayParam (unsigned param, ObjArray *&pobjarr)
bool getParam (unsigned param, int &value)
bool getParam (unsigned param, int &value, int maxval)
bool getParam (unsigned param, int &value, int minval, int maxval)
bool getParam (unsigned param, unsigned &value)
bool getParam (unsigned param, unsigned short &value)
bool getParam (unsigned param, unsigned short &value, unsigned short maxval)
bool getParam (unsigned param, unsigned short &value, unsigned short minval, unsigned short maxval)
bool getParam (unsigned param, short &value)
bool getParam (unsigned param, short &value, short maxval)
bool getParam (unsigned param, short &value, short minval, short maxval)
BObjectImpgetParamImp (unsigned param)
BObjectImpgetParamImp (unsigned param, BObjectImp::BObjectType type)
BObjectImpgetParamImp2 (unsigned param, BObjectImp::BObjectType type)
BObjectgetParamObj (unsigned param)
bool getRealParam (unsigned param, double &value)
const StringgetStringParam (unsigned param)
bool getStringParam (unsigned param, const String *&pstr)
int getToken (Token &token, unsigned position)
BObjectRefGlobalVar (unsigned int varnum)
bool halt () const
bool hasParams (unsigned howmany) const
void initForFnCall (unsigned in_PC)
void innerExec (const Instruction &ins)
void ins_add (const Instruction &ins)
void ins_addmember (const Instruction &ins)
void ins_addmember2 (const Instruction &ins)
void ins_addmember_assign (const Instruction &ins)
void ins_array (const Instruction &ins)
void ins_array_assign (const Instruction &ins)
void ins_array_assign_consume (const Instruction &ins)
void ins_arraysubscript (const Instruction &ins)
void ins_assign (const Instruction &ins)
void ins_assign_consume (const Instruction &ins)
void ins_assign_globalvar (const Instruction &ins)
void ins_assign_localvar (const Instruction &ins)
void ins_bitshift_left (const Instruction &ins)
void ins_bitshift_right (const Instruction &ins)
void ins_bitwise_and (const Instruction &ins)
void ins_bitwise_not (const Instruction &ins)
void ins_bitwise_or (const Instruction &ins)
void ins_bitwise_xor (const Instruction &ins)
void ins_call_method (const Instruction &ins)
void ins_call_method_id (const Instruction &ins)
void ins_casejmp (const Instruction &ins)
int ins_casejmp_finddefault (const Token &token)
int ins_casejmp_findlong (const Token &token, BLong *blong)
int ins_casejmp_findstring (const Token &token, String *bstringimp)
void ins_checkmember (const Instruction &ins)
void ins_consume (const Instruction &ins)
void ins_declareArray (const Instruction &ins)
void ins_dictionary (const Instruction &ins)
void ins_dictionary_addmember (const Instruction &ins)
void ins_div (const Instruction &ins)
void ins_divideequal (const Instruction &ins)
void ins_double (const Instruction &ins)
void ins_equal (const Instruction &ins)
void ins_error (const Instruction &ins)
void ins_exit (const Instruction &ins)
void ins_func (const Instruction &ins)
void ins_get_arg (const Instruction &ins)
void ins_get_member (const Instruction &ins)
void ins_get_member_id (const Instruction &ins)
void ins_globalvar (const Instruction &ins)
void ins_gosub (const Instruction &ins)
void ins_goto (const Instruction &ins)
void ins_greaterequal (const Instruction &ins)
void ins_greaterthan (const Instruction &ins)
void ins_ident (const Instruction &ins)
void ins_in (const Instruction &ins)
void ins_initfor (const Instruction &ins)
void ins_initforeach (const Instruction &ins)
void ins_initforeach2 (const Instruction &ins)
void ins_insert_into (const Instruction &ins)
void ins_jmpiffalse (const Instruction &ins)
void ins_jmpiftrue (const Instruction &ins)
void ins_jsr_userfunc (const Instruction &ins)
void ins_leave_block (const Instruction &ins)
void ins_lessequal (const Instruction &ins)
void ins_lessthan (const Instruction &ins)
void ins_localvar (const Instruction &ins)
void ins_logical_and (const Instruction &ins)
void ins_logical_not (const Instruction &ins)
void ins_logical_or (const Instruction &ins)
void ins_long (const Instruction &ins)
void ins_makeLocal (const Instruction &ins)
void ins_makelocal (const Instruction &ins)
void ins_member (const Instruction &ins)
void ins_minusequal (const Instruction &ins)
void ins_modulus (const Instruction &ins)
void ins_modulusequal (const Instruction &ins)
void ins_mult (const Instruction &ins)
void ins_multisubscript (const Instruction &ins)
void ins_multisubscript_assign (const Instruction &ins)
void ins_multisubscript_assign_consume (const Instruction &ins)
void ins_nextfor (const Instruction &ins)
void ins_nop (const Instruction &ins)
void ins_notequal (const Instruction &ins)
void ins_plusequal (const Instruction &ins)
void ins_pop_param (const Instruction &ins)
void ins_pop_param_byref (const Instruction &ins)
void ins_progend (const Instruction &ins)
void ins_removemember (const Instruction &ins)
void ins_return (const Instruction &ins)
void ins_set_member (const Instruction &ins)
void ins_set_member_consume (const Instruction &ins)
void ins_set_member_id (const Instruction &ins)
void ins_set_member_id_consume (const Instruction &ins)
void ins_set_member_id_consume_divideequal (const Instruction &ins)
void ins_set_member_id_consume_minusequal (const Instruction &ins)
void ins_set_member_id_consume_modulusequal (const Instruction &ins)
void ins_set_member_id_consume_plusequal (const Instruction &ins)
void ins_set_member_id_consume_timesequal (const Instruction &ins)
void ins_statementbegin (const Instruction &ins)
void ins_stepforeach (const Instruction &ins)
void ins_stepforeach2 (const Instruction &ins)
void ins_string (const Instruction &ins)
void ins_struct (const Instruction &ins)
void ins_subtract (const Instruction &ins)
void ins_timesequal (const Instruction &ins)
void ins_uninit (const Instruction &ins)
void ins_unminus (const Instruction &ins)
BObjectRefLocalVar (unsigned int varnum)
int makeGlobal (const Token &token)
BObjectmakeObj (const Token &token)
int makeString (unsigned param)
size_t numParams () const
double paramAsDouble (unsigned param)
int paramAsLong (unsigned param)
const char * paramAsString (unsigned param)
void popParam (const Token &token)
void popParamByRef (const Token &token)
const EScriptProgramprog () const
void pushArg (BObjectImp *arg)
void pushArg (const BObjectRef &ref)
void reinitExec ()
BObjectRef removemember (BObject &left, const BObject &right)
bool runnable () const
const std::string & scriptname () const
void setdebugging (bool debugging)
void setDebugLevel (DEBUG_LEVEL level)
void seterror (bool err)
void setFunctionResult (BObjectImp *imp)
void sethalt (bool halt)
bool setProgram (EScriptProgram *prog)
void setViewMode (bool vm)
void show_context (unsigned atPC)
void show_context (std::ostream &os, unsigned atPC)
size_t sizeEstimate () const

Static Public Member Functions

static ExecInstrFunc GetInstrFunc (const Token &token)

Public Attributes

vector< ExecutorModule * > availmodules
stack< ReturnContextControlStack
ModuleFunctioncurrent_module_function
DEBUG_LEVEL debug_level
int done
bool error_
vector< ExecutorModule * > execmodules
vector< BObjectReffparams
BObjectRefVec Globals2
bool halt_
BObjectRefVecLocals2
unsigned nLines
unsigned PC
bool run_ok_
stack< BObjectRefVec * > upperLocals2
ValueStackCont ValueStack

Static Public Attributes

static UninitObjectm_SharedUninitObject

Protected Member Functions

void check_containers (void)
void cleanParams ()
BObjectRef getObjRef (void)
BObjectgetParam (unsigned param)
int getParams (unsigned howMany)
BObject getValue (void)
int makeDouble (unsigned param)

Private Types

enum  DEBUG_STATE {
  DEBUG_STATE_NONE, DEBUG_STATE_ATTACHING, DEBUG_STATE_ATTACHED, DEBUG_STATE_INS_TRACE,
  DEBUG_STATE_INS_TRACE_BRK, DEBUG_STATE_RUN, DEBUG_STATE_BREAK_INTO, DEBUG_STATE_STEP_INTO,
  DEBUG_STATE_STEPPING_INTO, DEBUG_STATE_STEP_OVER, DEBUG_STATE_STEPPING_OVER
}

Private Member Functions

 Executor (const Executor &exec)
Executoroperator= (const Executor &exec)

Private Attributes

unsigned bp_skip_
set< unsigned > breakpoints_
DEBUG_STATE debug_state_
bool debugging_
BObjectImpfunc_result_
ref_ptr< EScriptProgramprog_
bool prog_ok_
set< unsigned > tmpbreakpoints_
bool viewmode_

Friends

class ExecutorModule
void list_script (class UOExecutor *uoexec)

Detailed Description

Definition at line 69 of file executor.h.


Member Enumeration Documentation

Enumerator:
NONE 
SOURCELINES 
INSTRUCTIONS 

Definition at line 82 of file executor.h.

enum Executor::DEBUG_STATE [private]
Enumerator:
DEBUG_STATE_NONE 
DEBUG_STATE_ATTACHING 
DEBUG_STATE_ATTACHED 
DEBUG_STATE_INS_TRACE 
DEBUG_STATE_INS_TRACE_BRK 
DEBUG_STATE_RUN 
DEBUG_STATE_BREAK_INTO 
DEBUG_STATE_STEP_INTO 
DEBUG_STATE_STEPPING_INTO 
DEBUG_STATE_STEP_OVER 
DEBUG_STATE_STEPPING_OVER 

Definition at line 359 of file executor.h.


Constructor & Destructor Documentation

Executor::Executor ( std::ostream &  cerr) [explicit]

Definition at line 62 of file executor.cpp.

References executor_count, ref_ptr< T >::set(), UninitObject::SharedInstance, and UninitObject::SharedInstanceOwner.

+ Here is the call graph for this function:

Executor::~Executor ( ) [virtual]

Definition at line 91 of file executor.cpp.

References availmodules, delete_all(), execmodules, executor_count, Locals2, and upperLocals2.

+ Here is the call graph for this function:

Executor::Executor ( const Executor exec) [private]

Member Function Documentation

BObjectRef Executor::addmember ( BObject left,
const BObject right 
)

Definition at line 923 of file executor.cpp.

References BObject::clone(), String::data(), BObject::impref(), BObject::isa(), BObjectImp::operDotPlus(), and BObjectImp::OTString.

Referenced by innerExec(), and ins_addmember().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::addmember2 ( BObject left,
const BObject right 
)

Definition at line 3500 of file executor.cpp.

References debug_state_, DEBUG_STATE_ATTACHING, and setdebugging().

Referenced by DebugContext::cmd_attach().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::calcrunnable ( ) [inline]

Definition at line 405 of file executor.h.

References error_, halt_, and run_ok_.

Referenced by seterror(), and sethalt().

+ Here is the caller graph for this function:

void Executor::check_containers ( void  ) [protected]

Definition at line 777 of file executor.cpp.

References passert.

BObjectRef Executor::checkmember ( BObject left,
const BObject right 
)

Definition at line 947 of file executor.cpp.

References BObject::clone(), String::data(), BObject::impref(), BObject::isa(), BObjectImp::operDotQMark(), and BObjectImp::OTString.

Referenced by innerExec(), and ins_checkmember().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::cleanParams ( ) [protected]

Definition at line 195 of file executor.cpp.

References fparams.

Referenced by innerExec(), ins_call_method(), ins_call_method_id(), and ins_func().

+ Here is the caller graph for this function:

Definition at line 3531 of file executor.cpp.

References debug_state_, and DEBUG_STATE_BREAK_INTO.

Referenced by DebugContext::cmd_break().

+ Here is the caller graph for this function:

Definition at line 3544 of file executor.cpp.

References breakpoints_.

Referenced by DebugContext::cmd_clrallbp().

+ Here is the caller graph for this function:

void Executor::dbg_clrbp ( unsigned  atPC)

Definition at line 3540 of file executor.cpp.

References breakpoints_.

Referenced by DebugContext::cmd_clrbp().

+ Here is the caller graph for this function:

string Executor::dbg_get_instruction ( size_t  atPC) const

Definition at line 3350 of file executor.cpp.

References breakpoints_, EScriptProgram::instr, OSTRINGSTREAM, OSTRINGSTREAM_STR, PC, and prog_.

Referenced by DebugContext::cmd_ins(), and show_context().

+ Here is the caller graph for this function:

Definition at line 3511 of file executor.cpp.

References debug_state_, DEBUG_STATE_INS_TRACE, and sethalt().

Referenced by DebugContext::cmd_instrace().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 3526 of file executor.cpp.

References debug_state_, DEBUG_STATE_RUN, and sethalt().

Referenced by DebugContext::cmd_run().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::dbg_setbp ( unsigned  atPC)

Definition at line 3536 of file executor.cpp.

References breakpoints_.

Referenced by DebugContext::cmd_setbp().

+ Here is the caller graph for this function:

Definition at line 3516 of file executor.cpp.

References debug_state_, DEBUG_STATE_STEP_INTO, and sethalt().

Referenced by DebugContext::cmd_stepinto().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 3521 of file executor.cpp.

References debug_state_, DEBUG_STATE_STEP_OVER, and sethalt().

Referenced by DebugContext::cmd_stepover().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::debugging ( ) const [inline]

Definition at line 430 of file executor.h.

References debugging_.

Referenced by setdebugging().

+ Here is the caller graph for this function:

Definition at line 3505 of file executor.cpp.

References debug_state_, DEBUG_STATE_NONE, setdebugging(), and sethalt().

Referenced by DebugContext::cmd_detach().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::empty_scriptname ( ) [inline]

Definition at line 391 of file executor.h.

References EScriptProgram::name, and prog_.

Referenced by display_executor_instances().

+ Here is the caller graph for this function:

bool Executor::error ( ) const [inline]

Definition at line 415 of file executor.h.

References error_.

Referenced by ExportScript::call(), ExportScript::call_long(), ExportScript::call_object(), ExportScript::call_string(), and run_ready().

+ Here is the caller graph for this function:

bool Executor::exec ( )

Definition at line 3398 of file executor.cpp.

References error_, execInstr(), passert, PC, prog_ok_, runnable(), scriptname(), scripts_thread_script, and scripts_thread_scriptPC.

Referenced by ExportScript::call(), ExportScript::call_long(), ExportScript::call_object(), ExportScript::call_string(), and exec_script().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void * Executor::getApplicPtrParam ( unsigned  param,
const BApplicObjType pointer_type 
)

Definition at line 455 of file executor.cpp.

References current_module_function, EXPLICIT_CAST, getParamImp(), mlog, ModuleFunction::name, BObjectImp::OTApplicPtr, PC, BApplicPtr::pointer_type(), BApplicPtr::ptr(), and scriptname().

Referenced by ExecutorModule::getApplicPtrParam(), and StorageExecutorModule::mf_FindRootItemInStorageArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::getArg ( const Token token)

Definition at line 906 of file executor.cpp.

References UninitObject::create(), getObjRef(), Locals2, and ValueStack.

Referenced by innerExec(), and ins_get_arg().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Executor::getDebugLevel ( ) [inline]

Definition at line 346 of file executor.h.

References debug_level.

Referenced by OSExecutorModule::mf_set_script_option().

+ Here is the caller graph for this function:

ExecInstrFunc Executor::GetInstrFunc ( const Token token) [static]

Definition at line 3099 of file executor.cpp.

References CTRL_JSR_USERFUNC, CTRL_LEAVE_BLOCK, CTRL_MAKELOCAL, CTRL_PROGEND, CTRL_STATEMENTBEGIN, Token::id, innerExec(), ins_add(), ins_addmember(), INS_ADDMEMBER2, ins_addmember2(), INS_ADDMEMBER_ASSIGN, ins_addmember_assign(), ins_array(), ins_array_assign(), ins_array_assign_consume(), ins_arraysubscript(), ins_assign(), INS_ASSIGN_CONSUME, ins_assign_consume(), INS_ASSIGN_GLOBALVAR, ins_assign_globalvar(), INS_ASSIGN_LOCALVAR, ins_assign_localvar(), ins_bitshift_left(), ins_bitshift_right(), ins_bitwise_and(), ins_bitwise_not(), ins_bitwise_or(), ins_bitwise_xor(), INS_CALL_METHOD, ins_call_method(), INS_CALL_METHOD_ID, ins_call_method_id(), INS_CASEJMP, ins_casejmp(), ins_checkmember(), ins_consume(), INS_DECLARE_ARRAY, ins_declareArray(), ins_dictionary(), INS_DICTIONARY_ADDMEMBER, ins_dictionary_addmember(), ins_div(), ins_divideequal(), ins_double(), ins_equal(), ins_error(), ins_exit(), ins_func(), INS_GET_ARG, ins_get_arg(), INS_GET_MEMBER, ins_get_member(), INS_GET_MEMBER_ID, ins_get_member_id(), ins_globalvar(), ins_gosub(), ins_goto(), ins_greaterequal(), ins_greaterthan(), ins_ident(), ins_in(), INS_INITFOR, ins_initfor(), INS_INITFOREACH, ins_initforeach2(), ins_insert_into(), ins_jmpiffalse(), ins_jmpiftrue(), ins_jsr_userfunc(), ins_leave_block(), ins_lessequal(), ins_lessthan(), ins_localvar(), ins_logical_and(), ins_logical_not(), ins_logical_or(), ins_long(), ins_makeLocal(), ins_makelocal(), ins_minusequal(), ins_modulus(), ins_modulusequal(), ins_mult(), INS_MULTISUBSCRIPT, ins_multisubscript(), INS_MULTISUBSCRIPT_ASSIGN, ins_multisubscript_assign(), INS_NEXTFOR, ins_nextfor(), ins_nop(), ins_notequal(), ins_plusequal(), INS_POP_PARAM, ins_pop_param(), INS_POP_PARAM_BYREF, ins_pop_param_byref(), ins_progend(), ins_removemember(), ins_return(), INS_SET_MEMBER, ins_set_member(), INS_SET_MEMBER_CONSUME, ins_set_member_consume(), INS_SET_MEMBER_ID, ins_set_member_id(), INS_SET_MEMBER_ID_CONSUME, ins_set_member_id_consume(), INS_SET_MEMBER_ID_CONSUME_DIVIDEEQUAL, ins_set_member_id_consume_divideequal(), INS_SET_MEMBER_ID_CONSUME_MINUSEQUAL, ins_set_member_id_consume_minusequal(), INS_SET_MEMBER_ID_CONSUME_MODULUSEQUAL, ins_set_member_id_consume_modulusequal(), INS_SET_MEMBER_ID_CONSUME_PLUSEQUAL, ins_set_member_id_consume_plusequal(), INS_SET_MEMBER_ID_CONSUME_TIMESEQUAL, ins_set_member_id_consume_timesequal(), ins_statementbegin(), INS_STEPFOREACH, ins_stepforeach2(), ins_string(), ins_struct(), INS_SUBSCRIPT_ASSIGN, INS_SUBSCRIPT_ASSIGN_CONSUME, ins_subtract(), ins_timesequal(), INS_UNINIT, ins_uninit(), ins_unminus(), RSV_EXIT, RSV_GLOBAL, RSV_GOSUB, RSV_GOTO, RSV_JMPIFFALSE, RSV_JMPIFTRUE, RSV_LOCAL, RSV_RETURN, TOK_ADD, TOK_ADDMEMBER, TOK_AND, TOK_ARRAY, TOK_ARRAY_SUBSCRIPT, TOK_ASSIGN, TOK_BITAND, TOK_BITOR, TOK_BITWISE_NOT, TOK_BITXOR, TOK_BSLEFT, TOK_BSRIGHT, TOK_CHKMEMBER, TOK_CONSUMER, TOK_DELMEMBER, TOK_DICTIONARY, TOK_DIV, TOK_DIVIDEEQUAL, TOK_DOUBLE, TOK_EQUAL, TOK_ERROR, TOK_FUNC, TOK_GLOBALVAR, TOK_GREQ, TOK_GRTHAN, TOK_IDENT, TOK_IN, TOK_INSERTINTO, TOK_LESSEQ, TOK_LESSTHAN, TOK_LOCALVAR, TOK_LOG_NOT, TOK_LONG, TOK_MINUSEQUAL, TOK_MODULUS, TOK_MODULUSEQUAL, TOK_MULT, TOK_NEQ, TOK_OR, TOK_PLUSEQUAL, TOK_STRING, TOK_STRUCT, TOK_SUBTRACT, TOK_TIMESEQUAL, TOK_UNMINUS, TOK_UNPLUS, and tostring().

Referenced by EScriptProgram::create_instructions().

+ Here is the caller graph for this function:

const BLong * Executor::getLongParam ( unsigned  param)

Definition at line 344 of file executor.cpp.

References explicit_cast(), getParamImp(), and BObjectImp::OTLong.

Referenced by NPCExecutorModule::CreateItem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::getObjArrayParam ( unsigned  param,
ObjArray *&  pobjarr 
)

Definition at line 449 of file executor.cpp.

References explicit_cast(), getParamImp(), and BObjectImp::OTArray.

Referenced by BPacket::call_method_id(), ExecutorModule::getObjArrayParam(), ConfigFileExecutorModule::mf_AppendConfigFileElem(), and UOExecutorModule::mf_SendGumpMenu().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectRef Executor::getObjRef ( void  ) [protected]

Definition at line 761 of file executor.cpp.

References UninitObject::create(), Log(), EScriptProgram::name, PC, prog_, seterror(), and ValueStack.

Referenced by getArg(), innerExec(), ins_bitwise_not(), ins_declareArray(), ins_initfor(), ins_initforeach(), ins_initforeach2(), ins_logical_not(), ins_unminus(), popParam(), and popParamByRef().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::getParam ( unsigned  param,
int &  value,
int  maxval 
)

Definition at line 370 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
int &  value,
int  minval,
int  maxval 
)

Definition at line 397 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
unsigned &  value 
)

Definition at line 583 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
unsigned short &  value 
)

Definition at line 557 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
unsigned short &  value,
unsigned short  maxval 
)

Definition at line 499 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
unsigned short &  value,
unsigned short  minval,
unsigned short  maxval 
)

Definition at line 527 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
short &  value 
)

Definition at line 610 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
short &  value,
short  maxval 
)

Definition at line 637 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

bool Executor::getParam ( unsigned  param,
short &  value,
short  minval,
short  maxval 
)

Definition at line 664 of file executor.cpp.

References decint(), explicit_cast(), func_result_, getParamImp2(), BObjectImp::OTLong, and BLong::value().

+ Here is the call graph for this function:

BObject * Executor::getParam ( unsigned  param) [protected]

Definition at line 256 of file executor.cpp.

References fparams, and passert.

BObjectImp * Executor::getParamImp ( unsigned  param)

Definition at line 263 of file executor.cpp.

References fparams, and passert.

Referenced by AuxConnection::call_method(), ScriptExObjImp::call_method_id(), BXMLfile::call_method_id(), BXmlNode::call_method_id(), ObjArray::call_method_id(), CallPropertyListMethod_id(), NPCExecutorModule::CanMove(), NPCExecutorModule::face(), BasicExecutorModule::find(), getApplicObjParam(), getApplicPtrParam(), getCharacterOrClientParam(), getCharacterParam(), getItemParam(), getLongParam(), getMultiParam(), getObjArrayParam(), getObjtypeParam(), getParam(), ExecutorModule::getParamImp(), getRealParam(), getStringParam(), getUBoatParam(), NPCExecutorModule::IsLegalMove(), BasicExecutorModule::len(), BasicExecutorModule::mf_Bin(), BasicExecutorModule::mf_CAsc(), BasicExecutorModule::mf_CAscZ(), BasicExecutorModule::mf_CChrZ(), BasicExecutorModule::mf_CDbl(), BasicExecutorModule::mf_CInt(), UOExecutorModule::mf_CloseGump(), BasicExecutorModule::mf_CStr(), ConfigFileExecutorModule::mf_FindConfigElement(), BasicExecutorModule::mf_Hex(), OSExecutorModule::mf_Log(), BasicExecutorModule::mf_Pack(), UOExecutorModule::mf_SendEvent(), UOExecutorModule::mf_SetGlobalProperty(), BasicExecutorModule::mf_SizeOf(), BasicExecutorModule::mf_SplitWords(), BasicExecutorModule::mf_StrReplace(), BasicExecutorModule::mf_substr(), BasicExecutorModule::mf_SubStrReplace(), BasicExecutorModule::mf_Trim(), BasicExecutorModule::mf_TypeOf(), BasicExecutorModule::mf_TypeOfInt(), NPCExecutorModule::move(), BasicIoExecutorModule::print(), OSExecutorModule::run_script(), UObject::script_method_id(), Character::script_method_id(), and OSExecutorModule::start_script().

BObjectImp * Executor::getParamImp ( unsigned  param,
BObjectImp::BObjectType  type 
)

Definition at line 282 of file executor.cpp.

References current_module_function, fparams, mlog, ModuleFunction::name, passert, passert_r, PC, scriptname(), and BObjectImp::typestr().

+ Here is the call graph for this function:

BObjectImp * Executor::getParamImp2 ( unsigned  param,
BObjectImp::BObjectType  type 
)

Definition at line 312 of file executor.cpp.

References decint(), fparams, func_result_, passert, passert_r, scriptname(), and BObjectImp::typestr().

Referenced by getParam().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObject * Executor::getParamObj ( unsigned  param)

Definition at line 270 of file executor.cpp.

References fparams.

Referenced by BStruct::call_method_id(), and BDictionary::call_method_id().

+ Here is the caller graph for this function:

int Executor::getParams ( unsigned  howMany) [protected]

Definition at line 173 of file executor.cpp.

References fparams, Log(), EScriptProgram::name, PC, prog_, seterror(), and ValueStack.

Referenced by innerExec(), ins_call_method(), ins_call_method_id(), and ins_func().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::getRealParam ( unsigned  param,
double &  value 
)

Definition at line 424 of file executor.cpp.

References current_module_function, getParamImp(), BObjectImp::isa(), mlog, ModuleFunction::name, BObjectImp::OTDouble, BObjectImp::OTLong, PC, scriptname(), BObjectImp::type(), and BObjectImp::typestr().

Referenced by ExecutorModule::getRealParam(), and UtilExecutorModule::mf_RandomFloat().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::getStringParam ( unsigned  param,
const String *&  pstr 
)

Definition at line 349 of file executor.cpp.

References getStringParam().

+ Here is the call graph for this function:

int Executor::getToken ( Token token,
unsigned  position 
)

Definition at line 709 of file executor.cpp.

References EScriptProgram::instr, nLines, and prog_.

Referenced by DumpScript().

+ Here is the caller graph for this function:

BObject Executor::getValue ( void  ) [protected]
BObjectRef & Executor::GlobalVar ( unsigned int  varnum)

Definition at line 703 of file executor.cpp.

References Globals2, and passert.

Referenced by makeObj().

+ Here is the caller graph for this function:

bool Executor::halt ( ) const [inline]

Definition at line 425 of file executor.h.

References halt_.

Referenced by execInstr(), sethalt(), and UOExecutor::state().

+ Here is the caller graph for this function:

void Executor::initForFnCall ( unsigned  in_PC)

Definition at line 3432 of file executor.cpp.

References done, Locals2, PC, seterror(), and ValueStack.

Referenced by ExportScript::call(), ExportScript::call_long(), ExportScript::call_object(), ExportScript::call_string(), and ExportScript::LoadStack().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::innerExec ( const Instruction ins)

Definition at line 2590 of file executor.cpp.

References addmember(), checkmember(), cleanParams(), BObjectImp::contains(), ControlStack, BObjectImp::copy(), ref_counted::count(), UninitObject::create(), CTRL_JSR_USERFUNC, CTRL_LEAVE_BLOCK, CTRL_MAKELOCAL, CTRL_PROGEND, CTRL_STATEMENTBEGIN, debug_level, done, Token::dval, escript_config, escript_execinstr_calls, execFunc(), func_result_, getArg(), getObjRef(), getParams(), Globals2, Token::id, BObject::impptr(), BObject::impref(), INS_ASSIGN_CONSUME, INS_CALL_METHOD, INS_CALL_METHOD_ID, INS_CASEJMP, ins_casejmp(), INS_DECLARE_ARRAY, ins_declareArray(), INS_GET_ARG, INS_INITFOR, ins_initfor(), INS_INITFOREACH, ins_initforeach(), ins_makeLocal(), INS_NEXTFOR, ins_nextfor(), INS_POP_PARAM, INS_POP_PARAM_BYREF, INS_STEPFOREACH, ins_stepforeach(), BObjectImp::isLE(), BObject::isTrue(), Locals2, Log(), Token::lval, EScriptConfig::max_call_depth, Token::module, EScriptProgram::modules, BObjectImp::operDivideEqual(), BObjectImp::operMinusEqual(), BObjectImp::operModulusEqual(), BObjectImp::operPlusEqual(), BObjectImp::OperSubscript(), BObjectImp::operTimesEqual(), passert, passert_always, ReturnContext::PC, PC, popParam(), popParamByRef(), prog_, removemember(), RSV_EXIT, RSV_GLOBAL, RSV_GOSUB, RSV_GOTO, RSV_JMPIFFALSE, RSV_JMPIFTRUE, RSV_LOCAL, RSV_RETURN, run_ok_, scriptname(), BObjectImp::selfBitAndObjImp(), BObjectImp::selfBitOrObjImp(), BObjectImp::selfBitShiftLeftObjImp(), BObjectImp::selfBitShiftRightObjImp(), BObjectImp::selfBitXorObjImp(), BObjectImp::selfDividedByObjImp(), BObjectImp::selfMinusObjImp(), BObjectImp::selfModulusObjImp(), BObjectImp::selfPlusObjImp(), BObjectImp::selfTimesObjImp(), BObjectRef::set(), seterror(), BObject::setimp(), SOURCELINES, TOK_ADD, TOK_ADDMEMBER, TOK_AND, TOK_ARRAY, TOK_ARRAY_SUBSCRIPT, TOK_ASSIGN, TOK_BITAND, TOK_BITOR, TOK_BITWISE_NOT, TOK_BITXOR, TOK_BSLEFT, TOK_BSRIGHT, TOK_CHKMEMBER, TOK_CONSUMER, TOK_DELMEMBER, TOK_DICTIONARY, TOK_DIV, TOK_DIVIDEEQUAL, TOK_DOUBLE, TOK_EQUAL, TOK_ERROR, TOK_FUNC, TOK_GLOBALVAR, TOK_GREQ, TOK_GRTHAN, TOK_IDENT, TOK_IN, TOK_LESSEQ, TOK_LESSTHAN, TOK_LOCALVAR, TOK_LOG_NOT, TOK_LONG, TOK_MEMBER, TOK_MINUSEQUAL, TOK_MODULUS, TOK_MODULUSEQUAL, TOK_MULT, TOK_NEQ, TOK_OR, TOK_PLUSEQUAL, TOK_STRING, TOK_STRUCT, TOK_SUBTRACT, TOK_TIMESEQUAL, TOK_UNMINUS, TOK_UNPLUS, TOK_USERFUNC, Instruction::token, Token::tokval(), Token::type, upperLocals2, ValueStack, and ReturnContext::ValueStackDepth.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_add ( const Instruction ins)

Definition at line 1711 of file executor.cpp.

References BObject::impref(), BObjectImp::selfPlusObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_addmember ( const Instruction ins)

Definition at line 2069 of file executor.cpp.

References addmember(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_addmember2 ( const Instruction ins)

Definition at line 2120 of file executor.cpp.

References BObject::impref(), BObjectImp::operDotPlus(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2129 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), BObjectImp::operDotPlus(), BObject::setimp(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_array ( const Instruction ins)

Definition at line 2546 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_array_assign ( const Instruction ins)

Definition at line 1636 of file executor.cpp.

References BObjectImp::array_assign(), BObjectImp::copy(), ref_counted::count(), BObject::impptr(), BObjectRef::set(), ValueStack, and x.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1672 of file executor.cpp.

References BObjectImp::array_assign(), BObjectImp::copy(), ref_counted::count(), BObject::impptr(), ValueStack, and x.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2024 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_assign ( const Instruction ins)

Definition at line 1610 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), BObject::setimp(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1588 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), BObject::setimp(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1566 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), Globals2, BObject::impref(), Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1546 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1815 of file executor.cpp.

References BObject::impref(), BObjectImp::selfBitShiftLeftObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1798 of file executor.cpp.

References BObject::impref(), BObjectImp::selfBitShiftRightObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_bitwise_and ( const Instruction ins)

Definition at line 1832 of file executor.cpp.

References BObject::impref(), BObjectImp::selfBitAndObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_bitwise_not ( const Instruction ins)

Definition at line 2582 of file executor.cpp.

References getObjRef(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_bitwise_or ( const Instruction ins)

Definition at line 1866 of file executor.cpp.

References BObject::impref(), BObjectImp::selfBitOrObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_bitwise_xor ( const Instruction ins)

Definition at line 1849 of file executor.cpp.

References BObject::impref(), BObjectImp::selfBitXorObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_call_method ( const Instruction ins)

Definition at line 2366 of file executor.cpp.

References cleanParams(), UninitObject::create(), fparams, func_result_, getParams(), Token::lval, BObjectRef::set(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2324 of file executor.cpp.

References cleanParams(), UninitObject::create(), fparams, func_result_, getParams(), Token::lval, BObjectRef::set(), Instruction::token, Token::type, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_casejmp ( const Instruction ins)

Definition at line 1236 of file executor.cpp.

References ins_casejmp_finddefault(), ins_casejmp_findlong(), ins_casejmp_findstring(), BObjectImp::isa(), BObjectImp::OTLong, BObjectImp::OTString, PC, Instruction::token, and ValueStack.

Referenced by GetInstrFunc(), and innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Executor::ins_casejmp_finddefault ( const Token token)

Definition at line 1212 of file executor.cpp.

References CASE_TYPE_DEFAULT, CASE_TYPE_LONG, and Token::dataptr.

Referenced by ins_casejmp().

+ Here is the caller graph for this function:

int Executor::ins_casejmp_findlong ( const Token token,
BLong blong 
)

Definition at line 1156 of file executor.cpp.

References CASE_TYPE_DEFAULT, CASE_TYPE_LONG, Token::dataptr, and BLong::value().

Referenced by ins_casejmp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Executor::ins_casejmp_findstring ( const Token token,
String bstringimp 
)

Definition at line 1182 of file executor.cpp.

References CASE_TYPE_DEFAULT, CASE_TYPE_LONG, Token::dataptr, and String::value().

Referenced by ins_casejmp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_checkmember ( const Instruction ins)

Definition at line 2103 of file executor.cpp.

References checkmember(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_consume ( const Instruction ins)

Definition at line 1297 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_declareArray ( const Instruction ins)

Definition at line 873 of file executor.cpp.

References getObjRef(), BObjectImp::OTUninit, seterror(), and ValueStack.

Referenced by GetInstrFunc(), and innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_dictionary ( const Instruction ins)

Definition at line 2550 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

Definition at line 2154 of file executor.cpp.

References BDictionary::addMember(), BObjectImp::copy(), ref_counted::count(), BObject::impptr(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_div ( const Instruction ins)

Definition at line 1764 of file executor.cpp.

References BObject::impref(), BObjectImp::selfDividedByObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_divideequal ( const Instruction ins)

Definition at line 2274 of file executor.cpp.

References BObject::impref(), BObjectImp::operDivideEqual(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_double ( const Instruction ins)

Definition at line 2530 of file executor.cpp.

References Token::dval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_equal ( const Instruction ins)

Definition at line 1936 of file executor.cpp.

References BObject::impref(), BObjectImp::isEqual(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_error ( const Instruction ins)

Definition at line 2538 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_exit ( const Instruction ins)

Definition at line 2524 of file executor.cpp.

References done, and run_ok_.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_func ( const Instruction ins)

Definition at line 2315 of file executor.cpp.

References cleanParams(), execFunc(), getParams(), Token::lval, Token::module, EScriptProgram::modules, prog_, and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_get_arg ( const Instruction ins)

Definition at line 2465 of file executor.cpp.

References getArg(), and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_get_member ( const Instruction ins)

Definition at line 1506 of file executor.cpp.

References fparams, BObjectImp::get_member(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1526 of file executor.cpp.

References fparams, BObjectImp::get_member_id(), Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_globalvar ( const Instruction ins)

Definition at line 1285 of file executor.cpp.

References Globals2, Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_gosub ( const Instruction ins)

Definition at line 2485 of file executor.cpp.

References ControlStack, Locals2, Token::lval, ReturnContext::PC, PC, Instruction::token, upperLocals2, ValueStack, and ReturnContext::ValueStackDepth.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_goto ( const Instruction ins)

Definition at line 2309 of file executor.cpp.

References Token::lval, PC, and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_greaterequal ( const Instruction ins)

Definition at line 2005 of file executor.cpp.

References BObject::impref(), BObjectImp::isLE(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_greaterthan ( const Instruction ins)

Definition at line 1988 of file executor.cpp.

References BObject::impref(), BObjectImp::isLT(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_ident ( const Instruction ins)

Definition at line 2558 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_in ( const Instruction ins)

Definition at line 2194 of file executor.cpp.

References BObjectImp::contains(), BObject::impref(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_initfor ( const Instruction ins)

Definition at line 1116 of file executor.cpp.

References ref_ptr< T >::get(), getObjRef(), Locals2, Token::lval, PC, and Instruction::token.

Referenced by GetInstrFunc(), and innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_initforeach ( const Instruction ins)

Definition at line 1036 of file executor.cpp.

References ref_ptr< T >::get(), getObjRef(), Locals2, Token::lval, PC, and Instruction::token.

Referenced by innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_initforeach2 ( const Instruction ins)

Definition at line 1074 of file executor.cpp.

References UninitObject::create(), getObjRef(), Locals2, Token::lval, PC, and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_insert_into ( const Instruction ins)

Definition at line 2211 of file executor.cpp.

References BObject::impref(), BObjectImp::operInsertInto(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_jmpiffalse ( const Instruction ins)

Definition at line 1266 of file executor.cpp.

References Token::lval, PC, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_jmpiftrue ( const Instruction ins)

Definition at line 1256 of file executor.cpp.

References Token::lval, PC, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_jsr_userfunc ( const Instruction ins)

Definition at line 2432 of file executor.cpp.

References ControlStack, escript_config, Log(), Token::lval, EScriptConfig::max_call_depth, ReturnContext::PC, PC, scriptname(), seterror(), Instruction::token, ValueStack, and ReturnContext::ValueStackDepth.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_leave_block ( const Instruction ins)

Definition at line 2471 of file executor.cpp.

References Globals2, Locals2, Token::lval, and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_lessequal ( const Instruction ins)

Definition at line 1972 of file executor.cpp.

References BObject::impref(), BObjectImp::isLE(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_lessthan ( const Instruction ins)

Definition at line 1954 of file executor.cpp.

References BObject::impref(), BObjectImp::isLT(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_localvar ( const Instruction ins)

Definition at line 1278 of file executor.cpp.

References Locals2, Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_logical_and ( const Instruction ins)

Definition at line 1883 of file executor.cpp.

References BObject::isTrue(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_logical_not ( const Instruction ins)

Definition at line 2574 of file executor.cpp.

References getObjRef(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_logical_or ( const Instruction ins)

Definition at line 1900 of file executor.cpp.

References BObject::isTrue(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_long ( const Instruction ins)

Definition at line 1291 of file executor.cpp.

References Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_makeLocal ( const Instruction ins)

Definition at line 862 of file executor.cpp.

References UninitObject::create(), Locals2, passert, and ValueStack.

Referenced by GetInstrFunc(), and innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_makelocal ( const Instruction ins)

Definition at line 2425 of file executor.cpp.

References Locals2, and upperLocals2.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_member ( const Instruction ins)
void Executor::ins_minusequal ( const Instruction ins)

Definition at line 2240 of file executor.cpp.

References BObject::impref(), BObjectImp::operMinusEqual(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_modulus ( const Instruction ins)

Definition at line 1781 of file executor.cpp.

References BObject::impref(), BObjectImp::selfModulusObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_modulusequal ( const Instruction ins)

Definition at line 2291 of file executor.cpp.

References BObject::impref(), BObjectImp::operModulusEqual(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_mult ( const Instruction ins)

Definition at line 1747 of file executor.cpp.

References BObject::impref(), BObjectImp::selfTimesObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2038 of file executor.cpp.

References Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

Definition at line 2052 of file executor.cpp.

References Token::lval, Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_nextfor ( const Instruction ins)

Definition at line 1130 of file executor.cpp.

References BLong::increment(), Double::increment(), BObjectImp::isa(), BObjectImp::isLessThan(), Locals2, Token::lval, BObjectImp::OTDouble, BObjectImp::OTLong, PC, and Instruction::token.

Referenced by GetInstrFunc(), and innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_nop ( const Instruction ins)

Definition at line 3095 of file executor.cpp.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_notequal ( const Instruction ins)

Definition at line 1918 of file executor.cpp.

References BObject::impref(), BObjectImp::isEqual(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_plusequal ( const Instruction ins)

Definition at line 2223 of file executor.cpp.

References BObject::impref(), BObjectImp::operPlusEqual(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_pop_param ( const Instruction ins)

Definition at line 2455 of file executor.cpp.

References popParam(), and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2460 of file executor.cpp.

References popParamByRef(), and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_progend ( const Instruction ins)

Definition at line 2416 of file executor.cpp.

References done, PC, and run_ok_.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_removemember ( const Instruction ins)

Definition at line 2086 of file executor.cpp.

References removemember(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_return ( const Instruction ins)

Definition at line 2498 of file executor.cpp.

References ControlStack, Locals2, ReturnContext::PC, PC, seterror(), and upperLocals2.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_set_member ( const Instruction ins)

Definition at line 1302 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), BObjectImp::set_member(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1348 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), BObjectImp::set_member(), Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1325 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), Token::lval, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1372 of file executor.cpp.

References BObjectImp::copy(), ref_counted::count(), BObject::impref(), Token::lval, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1462 of file executor.cpp.

References BObjectImp::get_member_id(), BObject::impref(), BObject::isa(), Token::lval, BObjectImp::OTError, BObjectImp::OTUninit, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1418 of file executor.cpp.

References BObjectImp::get_member_id(), BObject::impref(), BObject::isa(), Token::lval, BObjectImp::OTError, BObjectImp::OTUninit, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1484 of file executor.cpp.

References BObjectImp::get_member_id(), BObject::impref(), BObject::isa(), Token::lval, BObjectImp::OTError, BObjectImp::OTUninit, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1396 of file executor.cpp.

References BObjectImp::get_member_id(), BObject::impref(), BObject::isa(), Token::lval, BObjectImp::OTError, BObjectImp::OTUninit, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 1440 of file executor.cpp.

References BObjectImp::get_member_id(), BObject::impref(), BObject::isa(), Token::lval, BObjectImp::OTError, BObjectImp::OTUninit, BObjectImp::set_member_id(), Instruction::token, and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 2409 of file executor.cpp.

References debug_level, SOURCELINES, Instruction::token, and Token::tokval().

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_stepforeach ( const Instruction ins)

Definition at line 1052 of file executor.cpp.

References UninitObject::create(), ref_ptr< T >::get(), BLong::increment(), BObjectImp::isa(), Locals2, Token::lval, BObjectImp::OTArray, PC, ObjArray::ref_arr, BObjectRef::set(), Instruction::token, and BLong::value().

Referenced by innerExec().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_stepforeach2 ( const Instruction ins)

Definition at line 1094 of file executor.cpp.

References Locals2, Token::lval, PC, ContIterator::step(), and Instruction::token.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_string ( const Instruction ins)

Definition at line 2534 of file executor.cpp.

References Instruction::token, Token::tokval(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_struct ( const Instruction ins)

Definition at line 2542 of file executor.cpp.

References ValueStack.

Referenced by GetInstrFunc().

+ Here is the caller graph for this function:

void Executor::ins_subtract ( const Instruction ins)

Definition at line 1729 of file executor.cpp.

References BObject::impref(), BObjectImp::selfMinusObjImp(), BObjectRef::set(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_timesequal ( const Instruction ins)

Definition at line 2257 of file executor.cpp.

References BObject::impref(), BObjectImp::operTimesEqual(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_uninit ( const Instruction ins)

Definition at line 2554 of file executor.cpp.

References UninitObject::create(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::ins_unminus ( const Instruction ins)

Definition at line 2564 of file executor.cpp.

References getObjRef(), and ValueStack.

Referenced by GetInstrFunc().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BObjectRef & Executor::LocalVar ( unsigned int  varnum)

Definition at line 695 of file executor.cpp.

References Locals2, and passert.

Referenced by makeObj().

+ Here is the caller graph for this function:

int Executor::makeDouble ( unsigned  param) [protected]

Definition at line 220 of file executor.cpp.

References fparams, getParam(), BObjectImp::isa(), and BObjectImp::OTDouble.

Referenced by paramAsDouble().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int Executor::makeGlobal ( const Token token)
BObject * Executor::makeObj ( const Token token)
int Executor::makeString ( unsigned  param)

Definition at line 200 of file executor.cpp.

References fparams, getParam(), BObjectImp::isa(), and BObjectImp::OTString.

Referenced by BasicExecutorModule::find(), BasicExecutorModule::mf_substr(), HttpExecutorModule::mf_WriteHtmlRaw(), and paramAsString().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Executor& Executor::operator= ( const Executor exec) [private]
double Executor::paramAsDouble ( unsigned  param)

Definition at line 231 of file executor.cpp.

References getParam(), makeDouble(), and Double::value().

+ Here is the call graph for this function:

void Executor::popParam ( const Token token)

Definition at line 891 of file executor.cpp.

References getObjRef(), and Locals2.

Referenced by innerExec(), and ins_pop_param().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::popParamByRef ( const Token token)

Definition at line 899 of file executor.cpp.

References getObjRef(), and Locals2.

Referenced by innerExec(), and ins_pop_param_byref().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::pushArg ( const BObjectRef ref)

Definition at line 3477 of file executor.cpp.

References ValueStack.

Definition at line 3414 of file executor.cpp.

References done, Locals2, PC, prog_ok_, seterror(), and ValueStack.

+ Here is the call graph for this function:

BObjectRef Executor::removemember ( BObject left,
const BObject right 
)

Definition at line 935 of file executor.cpp.

References BObject::clone(), String::data(), BObject::impref(), BObject::isa(), BObjectImp::operDotMinus(), and BObjectImp::OTString.

Referenced by innerExec(), and ins_removemember().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Executor::runnable ( void  ) const [inline]

Definition at line 401 of file executor.h.

References run_ok_.

Referenced by exec(), run_executor_to_completion(), run_ready(), run_script_to_completion_worker(), and schedule_executor().

+ Here is the caller graph for this function:

void Executor::setdebugging ( bool  debugging) [inline]

Definition at line 434 of file executor.h.

References debugging(), and debugging_.

Referenced by attach_debugger(), and detach_debugger().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 365 of file executor.cpp.

References func_result_.

Referenced by BinFile::FileSize(), getAttributeParam(), getCharacterOrClientParam(), getCharacterParam(), getObjtypeParam(), and getVitalParam().

+ Here is the caller graph for this function:

void Executor::sethalt ( bool  halt) [inline]

Definition at line 420 of file executor.h.

References calcrunnable(), halt(), and halt_.

Referenced by dbg_ins_trace(), dbg_run(), dbg_step_into(), dbg_step_over(), detach_debugger(), and execInstr().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::setViewMode ( bool  vm) [inline]

Definition at line 348 of file executor.h.

References viewmode_.

Referenced by DumpScript().

+ Here is the caller graph for this function:

void Executor::show_context ( unsigned  atPC)

Definition at line 3361 of file executor.cpp.

References dbg_get_instruction(), Log(), and nLines.

Referenced by execInstr(), and run_ready().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Executor::show_context ( std::ostream &  os,
unsigned  atPC 
)

Definition at line 3379 of file executor.cpp.

References dbg_get_instruction(), and nLines.

+ Here is the call graph for this function:

size_t Executor::sizeEstimate ( ) const

Definition at line 109 of file executor.cpp.

References Globals2, and Locals2.

Referenced by exec_script(), and ScriptExObjImp::get_member_id().

+ Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ExecutorModule [friend]

Definition at line 117 of file executor.h.

void list_script ( class UOExecutor uoexec) [friend]

Definition at line 1086 of file scrsched.cpp.


Member Data Documentation

Definition at line 190 of file executor.h.

Referenced by addModule(), findModule(), and ~Executor().

unsigned Executor::bp_skip_ [private]

Definition at line 373 of file executor.h.

Referenced by execInstr().

set<unsigned> Executor::breakpoints_ [private]

Definition at line 371 of file executor.h.

Referenced by dbg_clrallbp(), dbg_clrbp(), dbg_get_instruction(), dbg_setbp(), and execInstr().

bool Executor::debugging_ [private]

Definition at line 358 of file executor.h.

Referenced by debugging(), execInstr(), and setdebugging().

Definition at line 189 of file executor.h.

Referenced by AttachFunctionalityModules(), execFunc(), and ~Executor().

Definition at line 79 of file executor.h.

Referenced by calcrunnable(), halt(), and sethalt().

Definition at line 99 of file executor.h.

bool Executor::prog_ok_ [private]

Definition at line 355 of file executor.h.

Referenced by exec(), reinitExec(), and setProgram().

Definition at line 80 of file executor.h.

Referenced by calcrunnable(), execInstr(), innerExec(), ins_exit(), ins_progend(), and runnable().

set<unsigned> Executor::tmpbreakpoints_ [private]

Definition at line 372 of file executor.h.

Referenced by execInstr().

Definition at line 102 of file executor.h.

Referenced by ExportScript::call(), ExportScript::call_long(), ExportScript::call_object(), ExportScript::call_string(), execFunc(), getArg(), getObjRef(), getParams(), gumpbutton_handler(), handle_coord_cursor(), handle_prompt(), handle_resurrect_menu(), handle_script_cursor(), handle_selcolor(), handle_textentry(), handle_unicode_prompt(), initForFnCall(), innerExec(), ins_add(), ins_addmember(), ins_addmember2(), ins_addmember_assign(), ins_array(), ins_array_assign(), ins_array_assign_consume(), ins_arraysubscript(), ins_assign(), ins_assign_consume(), ins_assign_globalvar(), ins_assign_localvar(), ins_bitshift_left(), ins_bitshift_right(), ins_bitwise_and(), ins_bitwise_not(), ins_bitwise_or(), ins_bitwise_xor(), ins_call_method(), ins_call_method_id(), ins_casejmp(), ins_checkmember(), ins_consume(), ins_declareArray(), ins_dictionary(), ins_dictionary_addmember(), ins_div(), ins_divideequal(), ins_double(), ins_equal(), ins_error(), ins_get_member(), ins_get_member_id(), ins_globalvar(), ins_gosub(), ins_greaterequal(), ins_greaterthan(), ins_ident(), ins_in(), ins_insert_into(), ins_jmpiffalse(), ins_jmpiftrue(), ins_jsr_userfunc(), ins_lessequal(), ins_lessthan(), ins_localvar(), ins_logical_and(), ins_logical_not(), ins_logical_or(), ins_long(), ins_makeLocal(), ins_minusequal(), ins_modulus(), ins_modulusequal(), ins_mult(), ins_multisubscript(), ins_multisubscript_assign(), ins_notequal(), ins_plusequal(), ins_removemember(), ins_set_member(), ins_set_member_consume(), ins_set_member_id(), ins_set_member_id_consume(), ins_set_member_id_consume_divideequal(), ins_set_member_id_consume_minusequal(), ins_set_member_id_consume_modulusequal(), ins_set_member_id_consume_plusequal(), ins_set_member_id_consume_timesequal(), ins_string(), ins_struct(), ins_subtract(), ins_timesequal(), ins_uninit(), ins_unminus(), list_script(), ExportScript::LoadStack(), menu_selection_made(), UOExecutorModule::mf_CloseGump(), pushArg(), reinitExec(), run_executor_to_completion(), OSExecutorModule::run_script(), ExportScript::SaveStack(), and OSExecutorModule::signal_event().

bool Executor::viewmode_ [private]

Definition at line 356 of file executor.h.

Referenced by setProgram(), and setViewMode().


The documentation for this class was generated from the following files: