1 typedef unsigned char u8;
2 typedef unsigned short u16;
3 typedef unsigned int u32;
4 typedef unsigned long long u64;
5 typedef signed char s8;
6 typedef signed short s16;
7 typedef signed int s32;
8 typedef signed long long s64;
11 typedef long long F_FIXNUM;
12 typedef unsigned long long CELL;
14 typedef long F_FIXNUM;
15 typedef unsigned long CELL;
18 #define CELLS ((signed)sizeof(CELL))
20 /* must always be 16 bits */
21 #define CHARS ((signed)sizeof(u16))
23 #define WORD_SIZE (CELLS*8)
24 #define HALF_WORD_SIZE (CELLS*4)
25 #define HALF_WORD_MASK (((unsigned long)1<<HALF_WORD_SIZE)-1)
29 #define TAG(cell) ((CELL)(cell) & TAG_MASK)
30 #define RETAG(cell,tag) ((CELL)(cell) | (tag))
31 #define UNTAG(cell) ((CELL)(cell) & ~TAG_MASK)
40 #define COMPLEX_TYPE 6
41 #define WRAPPER_TYPE 7
43 #define HEADER_TYPE 7 /* anything less than or equal to this is a tag */
44 #define GC_COLLECTED 0 /* See gc.c */
46 /*** Header types ***/
49 /* Canonical F object */
51 #define F RETAG(0,OBJECT_TYPE)
53 #define HASHTABLE_TYPE 10
54 #define VECTOR_TYPE 11
55 #define STRING_TYPE 12
57 #define QUOTATION_TYPE 14
61 #define BYTE_ARRAY_TYPE 18
72 /* always tag_header(VECTOR_TYPE) */
82 /* tagged num of chars */
89 /* always tag_header(SBUF_TYPE) */
98 /* always tag_header(HASHTABLE_TYPE) */
108 /* When a word is executed we jump to the value of the XT field. However this
109 value is an unportable function pointer. Interpreted and primitive words will
110 have their XT set to a value in the 'primitives' global (see primitives.c).
111 Compiled words are marked as such and their XT, which point inside the code
112 heap, are instead relocated on startup, and also considered a code GC root. */
116 /* TAGGED hashcode */
118 /* TAGGED word name */
120 /* TAGGED word vocabulary */
122 /* TAGGED on-disk primitive number */
124 /* TAGGED parameter to xt; used for colon definitions */
126 /* TAGGED property hash for library code */
128 /* TAGGED t or f, depending on if the word is compiled or not */
130 /* UNTAGGED execution token: jump here to execute word */
172 /* tagged byte array holding a C string */
174 /* OS-specific handle */