Removed the notion of a "large" context. For simplicity, all contexts
[panda.git] / src / st-universe.h
blob2122677c5da2fd2ba8c9ccf010338430e5edc809
1 /*
2 * st-universe.h
4 * Copyright (C) 2008 Vincent Geddes
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
25 #ifndef __ST_UNIVERSE_H__
26 #define __ST_UNIVERSE_H__
28 #include <st-types.h>
29 #include <st-memory.h>
30 #include <st-machine.h>
32 #define ST_NIL __machine.globals[0]
33 #define ST_TRUE __machine.globals[1]
34 #define ST_FALSE __machine.globals[2]
35 #define ST_SYMBOLS __machine.globals[3]
36 #define ST_GLOBALS __machine.globals[4]
37 #define ST_SMALLTALK __machine.globals[5]
39 #define ST_UNDEFINED_OBJECT_CLASS __machine.globals[6]
40 #define ST_METACLASS_CLASS __machine.globals[7]
41 #define ST_BEHAVIOR_CLASS __machine.globals[8]
42 #define ST_SMI_CLASS __machine.globals[9]
43 #define ST_LARGE_INTEGER_CLASS __machine.globals[10]
44 #define ST_FLOAT_CLASS __machine.globals[11]
45 #define ST_CHARACTER_CLASS __machine.globals[12]
46 #define ST_TRUE_CLASS __machine.globals[13]
47 #define ST_FALSE_CLASS __machine.globals[14]
48 #define ST_ARRAY_CLASS __machine.globals[15]
49 #define ST_BYTE_ARRAY_CLASS __machine.globals[16]
50 #define ST_WORD_ARRAY_CLASS __machine.globals[17]
51 #define ST_FLOAT_ARRAY_CLASS __machine.globals[18]
52 #define ST_SET_CLASS __machine.globals[19]
53 #define ST_DICTIONARY_CLASS __machine.globals[20]
54 #define ST_ASSOCIATION_CLASS __machine.globals[21]
55 #define ST_STRING_CLASS __machine.globals[22]
56 #define ST_SYMBOL_CLASS __machine.globals[23]
57 #define ST_WIDE_STRING_CLASS __machine.globals[24]
58 #define ST_COMPILED_METHOD_CLASS __machine.globals[25]
59 #define ST_METHOD_CONTEXT_CLASS __machine.globals[26]
60 #define ST_BLOCK_CONTEXT_CLASS __machine.globals[27]
61 #define ST_SYSTEM_CLASS __machine.globals[28]
62 #define ST_HANDLE_CLASS __machine.globals[29]
63 #define ST_MESSAGE_CLASS __machine.globals[30]
64 #define ST_SELECTOR_DOESNOTUNDERSTAND __machine.globals[31]
65 #define ST_SELECTOR_MUSTBEBOOLEAN __machine.globals[32]
66 #define ST_SELECTOR_STARTUPSYSTEM __machine.globals[33]
67 #define ST_SELECTOR_CANNOTRETURN __machine.globals[34]
68 #define ST_SELECTOR_OUTOFMEMORY __machine.globals[35]
70 #define ST_SELECTOR_PLUS __machine.selectors[0]
71 #define ST_SELECTOR_MINUS __machine.selectors[1]
72 #define ST_SELECTOR_LT __machine.selectors[2]
73 #define ST_SELECTOR_GT __machine.selectors[3]
74 #define ST_SELECTOR_LE __machine.selectors[4]
75 #define ST_SELECTOR_GE __machine.selectors[5]
76 #define ST_SELECTOR_EQ __machine.selectors[6]
77 #define ST_SELECTOR_NE __machine.selectors[7]
78 #define ST_SELECTOR_MUL __machine.selectors[8]
79 #define ST_SELECTOR_DIV __machine.selectors[9]
80 #define ST_SELECTOR_MOD __machine.selectors[10]
81 #define ST_SELECTOR_BITSHIFT __machine.selectors[11]
82 #define ST_SELECTOR_BITAND __machine.selectors[12]
83 #define ST_SELECTOR_BITOR __machine.selectors[13]
84 #define ST_SELECTOR_BITXOR __machine.selectors[14]
85 #define ST_SELECTOR_AT __machine.selectors[15]
86 #define ST_SELECTOR_ATPUT __machine.selectors[16]
87 #define ST_SELECTOR_SIZE __machine.selectors[17]
88 #define ST_SELECTOR_VALUE __machine.selectors[18]
89 #define ST_SELECTOR_VALUE_ARG __machine.selectors[19]
90 #define ST_SELECTOR_IDEQ __machine.selectors[20]
91 #define ST_SELECTOR_CLASS __machine.selectors[21]
92 #define ST_SELECTOR_NEW __machine.selectors[22]
93 #define ST_SELECTOR_NEW_ARG __machine.selectors[23]
95 extern st_memory *memory;
97 void st_initialize (void);
99 st_oop st_global_get (const char *name);
101 void st_set_verbose_mode (bool verbose);
103 bool st_get_verbose_mode (void) ST_GNUC_PURE;
106 #endif /* __ST_UNIVERSE_H__ */