File: EngineFwd.cpp

package info (click to toggle)
storm-lang 0.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,004 kB
  • sloc: ansic: 261,462; cpp: 140,405; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (71 lines) | stat: -rw-r--r-- 1,518 bytes parent folder | download
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;
		}
	}
}