-
Notifications
You must be signed in to change notification settings - Fork 7
/
tablefilespec.txt
98 lines (91 loc) · 4.64 KB
/
tablefilespec.txt
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
file = version (1 byte) | modulelen | module | namelength (1 byte) | name | Num Properties | Properties | Num Inheritances | Inheritances | Num Parameters | Parameters | Num Annotations | Annotations
where
Inheritance = parentnamelength (1 byte) | parentname | Bool extends (1 byte)
Properties = propertynamelength (1 byte) | propertyname | casinglength | casing | flags (1 byte) | decl | Num Annotations | Annotations
Decl = Type | shadow | aliaslen | alias
SpecializableDecl | Decl | specialtylen | specialty
Needs = SpecializabeDecl*
Types = Type*
Type = ClassType or LambdaType or ParameterizedType or ListType or OptionalType
ClassType = 0x01 | classnamelength (1 byte) | classname | Num Params | Param types
LambdaType = 0x02 | ReturnType | Num Args| Arg Types
ParameterizedType = 0x03 | labellength | label | (Type upper OR 0x00) | (Type lower OR 0x00)
ListType = 0x04 | Type | levels (1 byte)
OptionalType = 0x05 | Type | levels (1 byte)
ReturnType = (0x01 | Type) or (0x00)
Annotation = NameLength (1 byte) | Name | Num AnnotationVals | AnnotationVals
AnnotationVals = (StrAnnotationVal | NumAnnotationVal | BoolAnnotationVal | NothingAnnotationVal)*
StrAnnotationVal = 0x01 | len (1 byte) | value
NumAnnotationVal = 0x02 | value (4 bytes)
BoolAnnotationVal = 0x03 | value (1 bytes)
Latest version: 4
Memory Layout
File Property Classtype Lambda Parameterized ListType OptionalType ReturnType Inheritance
------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
| version | | namelength | | 0x01 | | 0x02 | | 0x03 | | 0x04 | | 0x05 | | 0x01 | | NameLength |
------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
| modulelen | | name | | module len | | ReturnType | | labellen | | Type | | Type | | Type | | Name |
------------ | ... | ------------ | .... | ------------ | ... | | ... | | ... | | .... |
| module | ------------ | module | ------------ | label | ------------ ------------ ------------ ------------
| ... | | casingl | | .... | | Num Args | | ... | | levels | | levels | OR | Bool extend|
------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------ ------------
| namelength | | casing | | namelength | | Types | | Type upper | | 0x00 |
------------ ------------ ------------ | .... | | ... | ------------
| name | | flags | | name | ------------ ------------
| ... | ------------ | .... | | Type lower |
------------ | Decl | ------------ | ... |
| is abstract| | ... | | Num Params | ------------
------------ ------------ ------------
| Num props | | Num Anns | | ParamTypes |
------------ ------------ | ... |
| Properties | | Annotations| ------------
| ... | | ... |
------------ ------------
| Num needs |
------------
| Needs |
| ... |
------------
|Num inheritn|
------------
|Inheritances|
| ... |
------------
| Num Params |
------------
| Parameters |
| ... |
------------
| Num Annota |
------------
| Annotations|
| ... |
------------
Need Var Decl
------------ ------------
| Flags | | PureType |
------------ | ... |
| Var Decl | ------------
| ... | | Shadow |
------------ ------------
| Specialtyl | | alias len |
------------ ------------
| Specialty | | alias |
| ... | | ... |
------------ ------------
| NumAnnotat |
------------
| Annotations|
| ... |
------------
Annotation StrAnnotnVal NumAnnotnVal BoolAnnotVal NothingAnntV
------------ ------------ ------------ ------------ ------------
| NameLength | | 0x01 | | 0x02 | | 0x03 | | 0x04 |
------------ ------------ ------------ ------------ ------------
| Name | | len | | value | | value |
------------ ------------ | ... | ------------
| Num Vals | | value | ------------
------------ | .... |
| Vals | ------------
| .... |
------------