-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuiltins.h
75 lines (67 loc) · 2.09 KB
/
builtins.h
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
72
73
74
75
/* comment me!
*/
#ifndef _EMERALD_BUILTINS_H
#define _EMERALD_BUILTINS_H
#define NUMBUILTINS 43
#define BUILTINOBJECTBASE (0x01000)
#define ATOFBUILTINOBJECTBASE (0x01200)
#define CTOFBUILTINOBJECTBASE (0x01400)
#define INSTATOFBUILTINOBJECTBASE (0x01600)
#define INSTCTOFBUILTINOBJECTBASE (0x01800)
#define FIRSTBUILTININDEX 0
#define ABSTRACTTYPEI 0
#define ANYI 1
#define ARRAYI 2
#define BOOLEANI 3
#define CHARACTERI 4
#define CONDITIONI 5
#define INTEGERI 6
#define NILI 7
#define NODEI 8
#define SIGNATUREI 9
#define REALI 0xa
#define STRINGI 0xb
#define VECTORI 0xc
#define TIMEI 0xd
#define NODELISTELEMENTI 0xe
#define NODELISTI 0xf
#define INSTREAMI 0x10
#define OUTSTREAMI 0x11
#define IMMUTABLEVECTORI 0x12
#define BITCHUNKI 0x13
#define RISCI 0x14
#define HANDLERI 0x15
#define VECTOROFCHARI 0x16
#define RDIRECTORYI 0x17
#define CONCRETETYPEI 0x18
#define COPVECTORI 0x19
#define COPVECTOREI 0x1a
#define AOPVECTORI 0x1b
#define AOPVECTOREI 0x1c
#define APARAMLISTI 0x1d
#define VECTOROFINTI 0x1e
#define INTERPRETERSTATEI 0x1f
#define DIRECTORYI 0x20
#define IVECTOROFANYI 0x21
#define RISAI 0x22
#define IVECTOROFINTI 0x23
#define SEQUENCEI 0x24
#define STUBI 0x25
#define DIRECTORYGAGGLEI 0x26
#define LITERALLISTI 0x27
#define VECTOROFANYI 0x28
#define IVECTOROFSTRINGI 0x29
#define VECTOROFSTRINGI 0x2a
#define LASTBUILTININDEX VECTOROFSTRINGI
typedef enum { B_IT, B_ITSAT, B_ITSCT, B_INSTAT, B_INSTCT } B_Tag;
#define OIDOfBuiltin(tag, i) \
((unsigned) 0x1000 + ((unsigned) tag * 0x200) + (unsigned) i)
#define NUMTAGS 5
#define isBuiltin(x) ((unsigned)(x) < 0x8000 && ((x) & 0x7000))
#define isBuiltinIT(x) (((x) & 0xffff1f00) == BUILTINOBJECTBASE)
#define isBuiltinITSAT(x) (((x) & 0xffff1f00) == ATOFBUILTINOBJECTBASE)
#define isBuiltinITSCT(x) (((x) & 0xffff1f00) == CTOFBUILTINOBJECTBASE)
#define isBuiltinINSTAT(x) (((x) & 0xffff1f00) == INSTATOFBUILTINOBJECTBASE)
#define isBuiltinINSTCT(x) (((x) & 0xffff1f00) == INSTCTOFBUILTINOBJECTBASE)
extern struct ConcreteType *ctct, *intct;
#endif /* _EMERALD_BUILTINS_H */