ScummVM API documentation
SQVM Struct Reference
Inheritance diagram for SQVM:
SQCollectable SQRefCounted

Classes

struct  CallInfo
 

Public Types

enum  ExecutionType { ET_CALL, ET_RESUME_GENERATOR, ET_RESUME_VM, ET_RESUME_THROW_VM }
 
typedef sqvector< CallInfoCallInfoVec
 

Public Member Functions

void DebugHookProxy (SQInteger type, const SQChar *sourcename, SQInteger line, const SQChar *funcname)
 
 SQVM (SQSharedState *ss)
 
bool Init (SQVM *friendvm, SQInteger stacksize)
 
bool Execute (SQObjectPtr &func, SQInteger nargs, SQInteger stackbase, SQObjectPtr &outres, SQBool raiseerror, ExecutionType et=ET_CALL)
 
bool CallNative (SQNativeClosure *nclosure, SQInteger nargs, SQInteger newbase, SQObjectPtr &retval, SQInt32 target, bool &suspend, bool &tailcall)
 
bool TailCall (SQClosure *closure, SQInteger firstparam, SQInteger nparams)
 
bool StartCall (SQClosure *closure, SQInteger target, SQInteger nargs, SQInteger stackbase, bool tailcall)
 
bool CreateClassInstance (SQClass *theclass, SQObjectPtr &inst, SQObjectPtr &constructor)
 
bool Call (SQObjectPtr &closure, SQInteger nparams, SQInteger stackbase, SQObjectPtr &outres, SQBool raiseerror)
 
SQRESULT Suspend ()
 
void CallDebugHook (SQInteger type, SQInteger forcedline=0)
 
void CallErrorHandler (SQObjectPtr &e)
 
bool Get (const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &dest, SQUnsignedInteger getflags, SQInteger selfidx)
 
SQInteger FallBackGet (const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &dest)
 
bool InvokeDefaultDelegate (const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &dest)
 
bool Set (const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val, SQInteger selfidx)
 
SQInteger FallBackSet (const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val)
 
bool NewSlot (const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val, bool bstatic)
 
bool NewSlotA (const SQObjectPtr &self, const SQObjectPtr &key, const SQObjectPtr &val, const SQObjectPtr &attrs, bool bstatic, bool raw)
 
bool DeleteSlot (const SQObjectPtr &self, const SQObjectPtr &key, SQObjectPtr &res)
 
bool Clone (const SQObjectPtr &self, SQObjectPtr &target)
 
bool ObjCmp (const SQObjectPtr &o1, const SQObjectPtr &o2, SQInteger &res)
 
bool StringCat (const SQObjectPtr &str, const SQObjectPtr &obj, SQObjectPtr &dest)
 
bool ToString (const SQObjectPtr &o, SQObjectPtr &res)
 
SQStringPrintObjVal (const SQObjectPtr &o)
 
void Raise_Error (const SQChar *s,...)
 
void Raise_Error (const SQObjectPtr &desc)
 
void Raise_IdxError (const SQObjectPtr &o)
 
void Raise_CompareError (const SQObject &o1, const SQObject &o2)
 
void Raise_ParamTypeError (SQInteger nparam, SQInteger typemask, SQInteger type)
 
void FindOuter (SQObjectPtr &target, SQObjectPtr *stackindex)
 
void RelocateOuters ()
 
void CloseOuters (SQObjectPtr *stackindex)
 
bool TypeOf (const SQObjectPtr &obj1, SQObjectPtr &dest)
 
bool CallMetaMethod (SQObjectPtr &closure, SQMetaMethod mm, SQInteger nparams, SQObjectPtr &outres)
 
bool ArithMetaMethod (SQInteger op, const SQObjectPtr &o1, const SQObjectPtr &o2, SQObjectPtr &dest)
 
bool Return (SQInteger _arg0, SQInteger _arg1, SQObjectPtr &retval)
 
bool ARITH_OP (SQUnsignedInteger op, SQObjectPtr &trg, const SQObjectPtr &o1, const SQObjectPtr &o2)
 
bool BW_OP (SQUnsignedInteger op, SQObjectPtr &trg, const SQObjectPtr &o1, const SQObjectPtr &o2)
 
bool NEG_OP (SQObjectPtr &trg, const SQObjectPtr &o1)
 
bool CMP_OP (CmpOP op, const SQObjectPtr &o1, const SQObjectPtr &o2, SQObjectPtr &res)
 
bool CLOSURE_OP (SQObjectPtr &target, SQFunctionProto *func)
 
bool CLASS_OP (SQObjectPtr &target, SQInteger base, SQInteger attrs)
 
bool FOREACH_OP (SQObjectPtr &o1, SQObjectPtr &o2, SQObjectPtr &o3, SQObjectPtr &o4, SQInteger arg_2, int exitpos, int &jump)
 
bool PLOCAL_INC (SQInteger op, SQObjectPtr &target, SQObjectPtr &a, SQObjectPtr &incr)
 
bool DerefInc (SQInteger op, SQObjectPtr &target, SQObjectPtr &self, SQObjectPtr &key, SQObjectPtr &incr, bool postfix, SQInteger arg0)
 
void Mark (SQCollectable **chain)
 
SQObjectType GetType ()
 
void Finalize ()
 
void FinalizeCore ()
 
void GrowCallStack ()
 
bool EnterFrame (SQInteger newbase, SQInteger newtop, bool tailcall)
 
void LeaveFrame ()
 
void Release ()
 
void CheckStackAccess (SQInteger n)
 
void Remove (SQInteger n)
 
void Pop ()
 
void Pop (SQInteger n)
 
void Push (const SQObjectPtr &o)
 
void PushNull ()
 
SQObjectPtrTop ()
 
SQObjectPtrPopGet ()
 
SQObjectPtrGetUp (SQInteger n)
 
SQObjectPtrGetAt (SQInteger n)
 
- Public Member Functions inherited from SQCollectable
void UnMark ()
 
- Public Member Functions inherited from SQRefCounted
SQWeakRefGetWeakRef (SQObjectType type)
 

Static Public Member Functions

static void _DebugHookProxy (HSQUIRRELVM v, SQInteger type, const SQChar *sourcename, SQInteger line, const SQChar *funcname)
 
static bool IsEqual (const SQObjectPtr &o1, const SQObjectPtr &o2, bool &res)
 
static bool IsFalse (SQObjectPtr &o)
 
- Static Public Member Functions inherited from SQCollectable
static void AddToChain (SQCollectable **chain, SQCollectable *c)
 
static void RemoveFromChain (SQCollectable **chain, SQCollectable *c)
 

Public Attributes

SQObjectPtrVec _stack
 
SQInteger _top = 0
 
SQInteger _stackbase = 0
 
SQOuter_openouters
 
SQObjectPtr _roottable
 
SQObjectPtr _lasterror
 
SQObjectPtr _errorhandler
 
bool _debughook
 
SQDEBUGHOOK _debughook_native
 
SQObjectPtr _debughook_closure
 
SQObjectPtr temp_reg
 
CallInfo_callsstack = nullptr
 
SQInteger _callsstacksize = 0
 
SQInteger _alloccallsstacksize = 0
 
sqvector< CallInfo_callstackdata
 
ExceptionsTraps _etraps
 
CallInfoci
 
SQUserPointer _foreignptr
 
SQInteger _nnativecalls
 
SQInteger _nmetamethodscall
 
SQRELEASEHOOK _releasehook
 
SQBool _suspended
 
SQBool _suspended_root
 
SQInteger _suspended_target
 
SQInteger _suspended_traps
 
- Public Attributes inherited from SQCollectable
SQCollectable_next
 
SQCollectable_prev
 
SQSharedState_sharedstate
 
- Public Attributes inherited from SQRefCounted
SQUnsignedInteger _uiRef
 
struct SQWeakRef_weakref
 

The documentation for this struct was generated from the following file: