1 /* Digital Mars DMDScript source code.
2  * Copyright (c) 2000-2002 by Chromium Communications
3  * D version Copyright (c) 2004-2010 by Digital Mars
4  * Distributed under the Boost Software License, Version 1.0.
5  * (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6  * written by Walter Bright
7  * http://www.digitalmars.com
8  *
9  * D2 port by Dmitry Olshansky
10  *
11  * DMDScript is implemented in the D Programming Language,
12  * http://www.digitalmars.com/d/
13  *
14  * For a C++ implementation of DMDScript, including COM support, see
15  * http://www.digitalmars.com/dscript/cppscript.html
16  */
17 
18 
19 module dmdscript.threadcontext;
20 
21 
22 import dmdscript.script;
23 import dmdscript.program;
24 import dmdscript.dmath;
25 import dmdscript.dobject;
26 import dmdscript.dfunction;
27 
28 // These are our per-thread global variables
29 // Tables where the prototype and constructor object are stored.
30 
31 struct ThreadContext {
32 	Dobject[d_string] protoTable;
33 	Dfunction[d_string] ctorTable;
34 
35 	Dfunction Dobject_constructor;
36 	Dobject Dobject_prototype;
37 
38 	Dfunction Dfunction_constructor;
39 	Dobject Dfunction_prototype;
40 
41 	Dfunction Darray_constructor;
42 	Dobject Darray_prototype;
43 
44 	Dfunction Dstring_constructor;
45 	Dobject Dstring_prototype;
46 
47 	Dfunction Dboolean_constructor;
48 	Dobject Dboolean_prototype;
49 
50 	Dfunction Dnumber_constructor;
51 	Dobject Dnumber_prototype;
52 
53 	Dfunction Derror_constructor;
54 	Dobject Derror_prototype;
55 
56 	Dfunction Ddate_constructor;
57 	Dobject Ddate_prototype;
58 
59 	Dfunction Dregexp_constructor;
60 	Dobject Dregexp_prototype;
61 
62 	Dfunction Denumerator_constructor;
63 	Dobject Denumerator_prototype;
64 
65 	Dmath Dmath_object;
66 
67 	void function (CallContext*)[] threadInitTable;
68 }
69 
70 // kept for backwards compatibility with the dmdscript.extending module
71 void delegate (CallContext*)[] threadInitTable;