1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#include "stdafx.h"
#include "EngineFwd.h"
#include "Runtime.h"
#include "OS/Shared.h"
#include "Utils/StackInfoSet.h"
namespace storm {
const EngineFwdShared &engineFwd() {
static const EngineFwdShared fwd = {
&runtime::typeHandle,
&runtime::voidHandle,
&runtime::refObjHandle,
&runtime::typeOf,
&runtime::allocTypeOf,
&runtime::gcTypeOf,
&runtime::typeGc,
&runtime::typeName,
&runtime::typeIdentifier,
&runtime::fromIdentifier,
&runtime::isValue,
&runtime::isA,
&runtime::isA,
&runtime::allocEngine,
&runtime::allocRaw,
&runtime::allocStaticRaw,
&runtime::allocBuffer,
&runtime::allocObject,
&runtime::allocArray,
&runtime::allocArrayRehash,
&runtime::allocWeakArray,
&runtime::allocWeakArrayRehash,
&runtime::allocCode,
&runtime::codeSize,
&runtime::codeRefs,
&runtime::codeUpdatePtrs,
&runtime::setVTable,
&runtime::liveObject,
&runtime::threadGroup,
&runtime::threadLock,
&runtime::createWatch,
&runtime::postStdRequest,
&runtime::cloneObject,
&runtime::cloneObjectEnv,
&runtime::someEngineUnsafe,
// Others.
&os::currentThreadData,
&os::currentThreadData,
&os::currentUThreadState,
&os::currentUThreadState,
&os::threadCreated,
&os::threadTerminated,
&::stackInfo,
// Dummy.
1.0f,
};
return fwd;
}
namespace runtime {
Engine &someEngine() {
Engine *e = someEngineUnsafe();
assert(e, L"Thread was not associated with an engine!");
return *e;
}
}
}
|