27 class ISavePatcherInterface;
28 class IStackCallbackFunctor;
29 class IStackCallbackSaveInterface;
30 class ObjectBindPolicy;
32 struct IMemoryPagePolicy;
33 struct IObjectHandlePolicy;
74 void Update(
float a_budget)
override;
95 void SetCallableFromTasklets1(
const char* a_className,
const char* a_stateName,
const char* a_fnName,
bool a_callable)
override;
Definition: ErrorLogger.h:13
Severity
Definition: ErrorLogger.h:19
Definition: IFreezeQuery.h:8
Definition: IFunctionArguments.h:12
Definition: IFunction.h:23
Definition: IProfilePolicy.h:18
Definition: ISavePatcherInterface.h:11
Definition: IStackCallbackSaveInterface.h:8
Definition: IVMDebugInterface.h:8
Definition: IVMSaveLoadInterface.h:47
Definition: IVirtualMachine.h:39
Definition: CodeTasklet.h:18
Definition: VirtualMachine.h:46
void SendEvent(VMHandle a_handle, const BSFixedString &a_eventName, IFunctionArguments *a_args) override
bool InitObjectProperties(BSTSmartPointer< Object > &a_objPtr, void *a_property, bool a_arg3) override
BSScript::Stack * frozenStacks
Definition: VirtualMachine.h:202
std::uint32_t unk94D0
Definition: VirtualMachine.h:223
std::uint16_t pad827E
Definition: VirtualMachine.h:186
bool GetScriptObjectType2(VMTypeID a_typeID, BSTSmartPointer< ObjectTypeInfo > &a_outTypeInfoPtr) override
ReadableStringTable GetReadableStringTable() override
std::uint32_t frozenStacksCount
Definition: VirtualMachine.h:203
void RegisterForStatsEvent(BSTEventSink< StatsEvent > *a_sink) override
bool IsCompletelyFrozen() const override
void CleanupSave() override
void RemoveAllDiskLoadedBoundObjects(VMHandle a_handle) override
bool GetParentNativeType(const BSFixedString &a_className, BSTSmartPointer< ObjectTypeInfo > &a_typeInfoPtr) override
void BindObject(BSTSmartPointer< Object > &a_objPtr, VMHandle a_handle, bool a_conditional) override
ReadableStringTable readableStringTable
Definition: VirtualMachine.h:225
void TasksToJobs(BSJobs::JobList &a_jobList) override
~VirtualMachine() override
static VirtualMachine * GetSingleton()
ISavePatcherInterface * savePatcherInterface
Definition: VirtualMachine.h:171
void Update(float a_budget) override
BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > * writeableTypeTable
Definition: VirtualMachine.h:226
BSTCommonLLMessageQueue< FunctionMessage > funcMsgQueue
Definition: VirtualMachine.h:180
BSTHashMap< VMHandle, BSTSmartPointer< Object > > objectTable
Definition: VirtualMachine.h:217
bool ReloadType(const char *a_className) override
BSSpinLock attachedScriptsLock
Definition: VirtualMachine.h:205
BSTArray< SuspendedStack > overflowSuspendArray2
Definition: VirtualMachine.h:190
void SetCallableFromTasklets1(const char *a_className, const char *a_stateName, const char *a_fnName, bool a_callable) override
void SaveGame(SaveStorageWrapper *a_wrapper, SkyrimScript::SaveFileHandleReaderWriter *a_handle, bool unk) override
std::uint32_t pad9404
Definition: VirtualMachine.h:212
bool initialized
Definition: VirtualMachine.h:185
void LoadGame(LoadStorageWrapper *a_wrapper, SkyrimScript::SaveFileHandleReaderWriter *a_handle) override
IObjectHandlePolicy * GetObjectHandlePolicy1() override
void DropAllRunningData() override
BSSpinLock typeInfoLock
Definition: VirtualMachine.h:172
std::byte saveGameVersion
Definition: VirtualMachine.h:221
ObjectBindPolicy * objectBindPolicy
Definition: VirtualMachine.h:167
const BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > * GetWritableTypeTable2() override
void UnregisterForStatsEvent(BSTEventSink< StatsEvent > *a_sink) override
void Unk_0A(VMHandle a_handle, Object **a_out) override
void SetOverstressed(bool a_set) override
BSTArray< FunctionMessage > overflowFuncMsgs
Definition: VirtualMachine.h:181
bool GetScriptObjectTypeNoLoad1(const BSFixedString &a_className, BSTSmartPointer< ObjectTypeInfo > &a_typeInfoPtr) const override
void MarkSaveInvalid(BSStorage *a_storage) override
BSTArray< BSTSmartPointer< ObjectTypeInfo > > typesToUnload
Definition: VirtualMachine.h:177
void Unk_0D(VMHandle a_handle, Array **a_out) override
std::uint32_t unk94CC
Definition: VirtualMachine.h:222
bool DispatchMethodCall1(BSTSmartPointer< Object > &a_obj, const BSFixedString &a_fnName, IFunctionArguments *a_args, BSTSmartPointer< IStackCallbackFunctor > &a_result) override
BSSpinLock frozenStacksLock
Definition: VirtualMachine.h:200
void CalculateFullReloadList(void) const override
std::uint32_t pad938C
Definition: VirtualMachine.h:201
REX::EnumSet< FreezeState, std::uint32_t > freezeState
Definition: VirtualMachine.h:204
BSSpinLock suspendQueueLock
Definition: VirtualMachine.h:191
BSTArray< QueuedUnbindRefs > queuedUnbinds
Definition: VirtualMachine.h:220
void UnregisterForLogEvent(BSTEventSink< LogEvent > *a_sink) override
bool overstressed
Definition: VirtualMachine.h:184
const WritableStringTable GetWritableStringTable2() override
const ObjectBindPolicy * GetObjectBindPolicy2() const override
BSTHashMap< VMTypeID, BSFixedString > typeIDToObjectType
Definition: VirtualMachine.h:175
IFreezeQuery * freezeQuery
Definition: VirtualMachine.h:168
void ForEachBoundObject(VMHandle a_handle, IForEachScriptObjectFunctor *a_functor) override
bool CreateObject1(const BSFixedString &a_className, void *a_property, BSTSmartPointer< Object > &a_objPtr) override
void Unk_08(void *unk) override
VMStackID nextStackID
Definition: VirtualMachine.h:199
ErrorLogger * GetErrorLogger() override
void RemoveAllBoundObjects(VMHandle a_handle) override
BSSpinLock objectLock
Definition: VirtualMachine.h:216
ISavePatcherInterface * GetSavePatcherInterface() override
void TraceStack(const char *a_str, VMStackID a_stackID, Severity a_severity=Severity::kInfo) override
bool CreateArray2(TypeInfo::RawType a_typeID, const BSFixedString &a_className, std::uint32_t a_size, BSTSmartPointer< Array > &a_arrayPtr) override
BSSpinLock runningStacksLock
Definition: VirtualMachine.h:196
bool GetScriptObjectType1(const BSFixedString &a_className, BSTSmartPointer< ObjectTypeInfo > &a_outTypeInfoPtr) override
IObjectHandlePolicy * handlePolicy
Definition: VirtualMachine.h:166
BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > * GetWritableTypeTable() override
bool GetVariableValue1(const BSTSmartPointer< Object > &a_objPtr, std::uint32_t a_index, Variable &a_out) const override
void Unk_0C(void) override
bool CreateEmptyTasklet(Stack *a_stack, Internal::CodeTasklet **a_out) override
void Unk_0E(LoadStorageWrapper *a_storage, void *unk) override
std::uint32_t unk93DC
Definition: VirtualMachine.h:208
BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > objectTypeMap
Definition: VirtualMachine.h:174
void SetLinkedCallback(ITypeLinkedCallback *a_callback) override
BSTCommonStaticMessageQueue< SuspendedStack, 128 > * stacksToSuspend
Definition: VirtualMachine.h:194
BSTArray< SuspendedStack > * stacksToSuspendOverflow
Definition: VirtualMachine.h:195
FreezeState
Definition: VirtualMachine.h:62
std::byte GetSaveGameVersion() override
void SendEventAll(const BSFixedString &a_eventName, IFunctionArguments *a_args) override
bool BindNativeMethod(IFunction *a_fn) override
IStackCallbackSaveInterface * stackCallbackSaveInterface
Definition: VirtualMachine.h:169
bool GetPropertyValue(BSTSmartPointer< Object > &a_obj, const char *a_propertyName, Variable &a_getVal) override
BSTHashMap< VMStackID, BSTSmartPointer< Stack > > waitingLatentReturns
Definition: VirtualMachine.h:198
bool GetStackByID(VMStackID a_stackID, Stack **a_out) override
BSTArray< SuspendedStack > overflowSuspendArray1
Definition: VirtualMachine.h:189
bool DispatchUnboundMethodCall(void) override
void HandleLoadedBinding(BSTSmartPointer< Object > &a_objPtr, VMHandle a_handle, bool a_conditional) override
BSSpinLock funcQueueLock
Definition: VirtualMachine.h:178
ErrorLogger * errorLogger
Definition: VirtualMachine.h:164
BSSpinLock objectResetLock
Definition: VirtualMachine.h:214
void Unk_09(void) override
BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > * readableTypeTable
Definition: VirtualMachine.h:227
void HandleCObjectDeletion(VMHandle a_handle) override
bool FindBoundObject(VMHandle a_handle, const char *a_className, BSTSmartPointer< Object > &a_result) const override
bool TypeIsValid(const BSFixedString &a_className) override
BSTHashMap< VMHandle, BSTSmartPointer< Array > > arrayTable
Definition: VirtualMachine.h:218
bool DispatchMethodCall2(VMHandle a_handle, const BSFixedString &a_className, const BSFixedString &a_fnName, IFunctionArguments *a_args, BSTSmartPointer< IStackCallbackFunctor > &a_result) override
bool CreateArray1(const TypeInfo &a_typeInfo, std::uint32_t a_size, BSTSmartPointer< Array > &a_arrayPtr) override
BSTCommonStaticMessageQueue< SuspendedStack, 128 > * stacksToResume
Definition: VirtualMachine.h:192
BSSpinLock queuedUnbindLock
Definition: VirtualMachine.h:219
BSTArray< BSTSmartPointer< Object > > objectsAwaitingCleanup
Definition: VirtualMachine.h:209
void MoveBoundObjects(VMHandle a_from, VMHandle a_to) override
void UpdateTasklets(float a_budget) override
void SetCallableFromTasklets2(const char *a_className, const char *a_fnName, bool a_callable) override
BSTCommonStaticMessageQueue< SuspendedStack, 128 > suspendQueue1
Definition: VirtualMachine.h:187
const IObjectHandlePolicy * GetObjectHandlePolicy2() const override
bool RegisterObjectType(VMTypeID a_typeID, const char *a_className) override
BSTHashMap< VMStackID, BSTSmartPointer< Stack > > allRunningStacks
Definition: VirtualMachine.h:197
LinkerProcessor linker
Definition: VirtualMachine.h:173
BSTArray< BSTSmartPointer< Array > > arrays
Definition: VirtualMachine.h:213
bool DispatchStaticCall(const BSFixedString &a_className, const BSFixedString &a_fnName, IFunctionArguments *a_args, BSTSmartPointer< IStackCallbackFunctor > &a_result) override
bool TypeCanBeBound(const BSFixedString &a_className, VMHandle a_handle) override
BSTArray< BSTSmartPointer< Object > > objectsAwaitingReset
Definition: VirtualMachine.h:215
void RegisterForLogEvent(BSTEventSink< LogEvent > *a_sink) override
VMHandle GetBoundHandle(const BSTSmartPointer< Object > &a_objPtr) const override
IProfilePolicy * profilePolicy
Definition: VirtualMachine.h:170
bool SetPropertyValue(BSTSmartPointer< Object > &a_obj, const char *a_propertyName, Variable &a_setVal) override
bool IsWaitingOnLatent(VMStackID a_stackID) const override
bool CreateObject2(const BSFixedString &a_className, BSTSmartPointer< Object > &a_result) override
std::uint32_t nextArrayToClean
Definition: VirtualMachine.h:211
bool GetScriptObjectTypeNoLoad2(VMTypeID a_typeID, BSTSmartPointer< ObjectTypeInfo > &a_outTypeInfoPtr) const override
BSTArray< CodeTasklet * > vmTasks
Definition: VirtualMachine.h:182
ObjectBindPolicy * GetObjectBindPolicy1() override
void Unk_0B(void *unk) override
void FormatAndPostMessage(const char *a_str, Severity a_severity) override
IMemoryPagePolicy * memoryPagePolicy
Definition: VirtualMachine.h:165
void ResetAllBoundObjects(VMHandle a_handle) override
BSTHashMap< BSFixedString, VMTypeID > objectTypeToTypeID
Definition: VirtualMachine.h:176
void GetScriptObjectsWithATypeID(BSScrapArray< BSFixedString > &a_results) const override
std::uint32_t unk93D8
Definition: VirtualMachine.h:207
BSTArray< SuspendedStack > * stacksToResumeOverflow
Definition: VirtualMachine.h:193
bool CastObject(const BSTSmartPointer< Object > &a_fromObjPtr, const BSTSmartPointer< ObjectTypeInfo > &a_toTypeInfoPtr, BSTSmartPointer< Object > &a_toObjPtr) override
std::uint32_t uiWaitingFunctionMessages
Definition: VirtualMachine.h:183
static constexpr auto VTABLE
Definition: VirtualMachine.h:49
BSSpinLock arraysLock
Definition: VirtualMachine.h:210
WritableStringTable writableStringTable
Definition: VirtualMachine.h:224
bool GetTypeIDForScriptObject(const BSFixedString &a_className, VMTypeID &a_typeID) const override
BSTCommonStaticMessageQueue< SuspendedStack, 128 > suspendQueue2
Definition: VirtualMachine.h:188
void UnbindObject(const BSTSmartPointer< Object > &a_objPtr) override
static constexpr auto RTTI
Definition: VirtualMachine.h:48
WritableStringTable GetWritableStringTable() override
bool CreateObjectWithProperties(const BSFixedString &a_className, std::uint32_t a_numProperties, BSTSmartPointer< Object > &a_objPtr) override
BSTHashMap< VMHandle, BSTSmallSharedArray< AttachedScript > > attachedScripts
Definition: VirtualMachine.h:206
BSTHashMap< BSFixedString, BSTSmartPointer< ObjectTypeInfo > > * GetReadableTypeTable() override
void ReturnFromLatent(VMStackID a_stackID, const Variable &a_val) override
bool GetVariableValue2(VMHandle a_handle, const BSFixedString &a_className, std::int32_t a_variableIndex, Variable &a_out) const override
BSTStaticFreeList< FunctionMessage, 1024 > funcMsgPool
Definition: VirtualMachine.h:179
Definition: LinkerProcessor.h:18
Definition: BSScriptObjectBindPolicy.h:16
Definition: IVMSaveLoadInterface.h:18
Definition: TypeInfo.h:10
RawType
Definition: TypeInfo.h:13
Definition: Variable.h:15
Definition: IVMSaveLoadInterface.h:37
Definition: BSAtomic.h:92
Definition: BSStorage.h:14
Definition: BSTArray.h:378
Definition: BSTMessageQueue.h:63
Definition: BSTMessageQueue.h:81
Definition: BSTEvent.h:143
Definition: BSTEvent.h:19
Definition: BSTHashMap.h:21
Definition: BSTSmartPointer.h:37
Definition: BSTFreeList.h:28
Definition: LoadStorageWrapper.h:8
Definition: SaveStorageWrapper.h:8
Definition: SaveFileHandleReaderWriter.h:8
Definition: AbsorbEffect.h:6
std::uint32_t VMTypeID
Definition: BSCoreTypes.h:9
constexpr std::array< REL::ID, 4 > VTABLE_BSScript__Internal__VirtualMachine
Definition: Offsets_VTABLE.h:9472
std::uint32_t VMStackID
Definition: BSCoreTypes.h:8
std::uint64_t VMHandle
Definition: BSCoreTypes.h:7
constexpr REL::ID RTTI_BSScript__Internal__VirtualMachine(static_cast< std::uint64_t >(691844))
Definition: IMemoryPagePolicy.h:8
Definition: IObjectHandlePolicy.h:13
Definition: IVMObjectBindInterface.h:13
Definition: VirtualMachine.h:52
BSTSmartPointer< Object > obj
Definition: VirtualMachine.h:55
std::uint32_t pad0C
Definition: VirtualMachine.h:57
std::uint32_t refCount
Definition: VirtualMachine.h:56