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
25 #ifndef __ST_UNIVERSE_H__
26 #define __ST_UNIVERSE_H__
29 #include <st-memory.h>
32 #define ST_NIL __cpu.globals[0]
33 #define ST_TRUE __cpu.globals[1]
34 #define ST_FALSE __cpu.globals[2]
35 #define ST_SYMBOLS __cpu.globals[3]
36 #define ST_GLOBALS __cpu.globals[4]
37 #define ST_SMALLTALK __cpu.globals[5]
39 #define ST_UNDEFINED_OBJECT_CLASS __cpu.globals[6]
40 #define ST_METACLASS_CLASS __cpu.globals[7]
41 #define ST_BEHAVIOR_CLASS __cpu.globals[8]
42 #define ST_SMI_CLASS __cpu.globals[9]
43 #define ST_LARGE_INTEGER_CLASS __cpu.globals[10]
44 #define ST_FLOAT_CLASS __cpu.globals[11]
45 #define ST_CHARACTER_CLASS __cpu.globals[12]
46 #define ST_TRUE_CLASS __cpu.globals[13]
47 #define ST_FALSE_CLASS __cpu.globals[14]
48 #define ST_ARRAY_CLASS __cpu.globals[15]
49 #define ST_BYTE_ARRAY_CLASS __cpu.globals[16]
50 #define ST_WORD_ARRAY_CLASS __cpu.globals[17]
51 #define ST_FLOAT_ARRAY_CLASS __cpu.globals[18]
52 #define ST_SET_CLASS __cpu.globals[19]
53 #define ST_DICTIONARY_CLASS __cpu.globals[20]
54 #define ST_ASSOCIATION_CLASS __cpu.globals[21]
55 #define ST_STRING_CLASS __cpu.globals[22]
56 #define ST_SYMBOL_CLASS __cpu.globals[23]
57 #define ST_WIDE_STRING_CLASS __cpu.globals[24]
58 #define ST_COMPILED_METHOD_CLASS __cpu.globals[25]
59 #define ST_METHOD_CONTEXT_CLASS __cpu.globals[26]
60 #define ST_BLOCK_CONTEXT_CLASS __cpu.globals[27]
61 #define ST_SYSTEM_CLASS __cpu.globals[28]
63 #define ST_SELECTOR_DOESNOTUNDERSTAND __cpu.globals[29]
64 #define ST_SELECTOR_MUSTBEBOOLEAN __cpu.globals[30]
65 #define ST_SELECTOR_STARTUPSYSTEM __cpu.globals[31]
66 #define ST_SELECTOR_CANNOTRETURN __cpu.globals[32]
67 #define ST_SELECTOR_OUTOFMEMORY __cpu.globals[33]
69 #define ST_SELECTOR_PLUS __cpu.selectors[0]
70 #define ST_SELECTOR_MINUS __cpu.selectors[1]
71 #define ST_SELECTOR_LT __cpu.selectors[2]
72 #define ST_SELECTOR_GT __cpu.selectors[3]
73 #define ST_SELECTOR_LE __cpu.selectors[4]
74 #define ST_SELECTOR_GE __cpu.selectors[5]
75 #define ST_SELECTOR_EQ __cpu.selectors[6]
76 #define ST_SELECTOR_NE __cpu.selectors[7]
77 #define ST_SELECTOR_MUL __cpu.selectors[8]
78 #define ST_SELECTOR_DIV __cpu.selectors[9]
79 #define ST_SELECTOR_MOD __cpu.selectors[10]
80 #define ST_SELECTOR_BITSHIFT __cpu.selectors[11]
81 #define ST_SELECTOR_BITAND __cpu.selectors[12]
82 #define ST_SELECTOR_BITOR __cpu.selectors[13]
83 #define ST_SELECTOR_BITXOR __cpu.selectors[14]
84 #define ST_SELECTOR_AT __cpu.selectors[15]
85 #define ST_SELECTOR_ATPUT __cpu.selectors[16]
86 #define ST_SELECTOR_SIZE __cpu.selectors[17]
87 #define ST_SELECTOR_VALUE __cpu.selectors[18]
88 #define ST_SELECTOR_VALUE_ARG __cpu.selectors[19]
89 #define ST_SELECTOR_IDEQ __cpu.selectors[20]
90 #define ST_SELECTOR_CLASS __cpu.selectors[21]
91 #define ST_SELECTOR_NEW __cpu.selectors[22]
92 #define ST_SELECTOR_NEW_ARG __cpu.selectors[23]
94 extern st_memory
*memory
;
97 void st_bootstrap_universe (void);
99 st_oop
st_global_get (const char *name
);
101 bool st_verbose_mode (void) ST_GNUC_PURE
;
103 #endif /* __ST_UNIVERSE_H__ */