about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--apps/mu.subx31
1 files changed, 21 insertions, 10 deletions
diff --git a/apps/mu.subx b/apps/mu.subx
index c2b752ed..574985d4 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -246,9 +246,20 @@ _Program-functions:  # (handle function)
 _Program-types:  # (handle typeinfo)
   0/imm32
 
-Function-name:
+# Some constants for simulating the data structures described above.
+# Many constants here come with a type in a comment.
+#
+# Sometimes the type is of the value at that offset for the given type. For
+# example, if you start at a function record and move forward Function-inouts
+# bytes, you'll find a (handle list var).
+#
+# At other times, the type is of the constant itself. For example, the type of
+# the constant Function-size is (addr int). To get the size of a function,
+# look in *Function-size.
+
+Function-name:  # (handle array byte)
   0/imm32
-Function-subx-name:
+Function-subx-name:  # (handle array byte)
   4/imm32
 Function-inouts:  # (handle list var)
   8/imm32
@@ -261,7 +272,7 @@ Function-next:  # (handle function)
 Function-size:  # (addr int)
   0x18/imm32/24
 
-Primitive-name:
+Primitive-name:  # (handle array byte)
   0/imm32
 Primitive-inouts:  # (handle list var)
   4/imm32
@@ -284,7 +295,7 @@ Primitive-next:  # (handle function)
 Primitive-size:  # (addr int)
   0x28/imm32/36
 
-Stmt-tag:
+Stmt-tag:  # int
   0/imm32
 
 Block-stmts:  # (handle list stmt)
@@ -312,15 +323,15 @@ Regvardef-outputs:  # (handle stmt-var)  # will have exactly one element
 Stmt-size:  # (addr int)
   0x10/imm32
 
-Var-name:
+Var-name:  # (handle array byte)
   0/imm32
-Var-type:
+Var-type:  # (handle tree type-id)
   4/imm32
-Var-block-depth:
+Var-block-depth:  # int
   8/imm32
-Var-offset:
+Var-offset:  # int
   0xc/imm32
-Var-register:
+Var-register:  # (handle array byte) -- name of a register
   0x10/imm32
 Var-size:  # (addr int)
   0x14/imm32
@@ -333,7 +344,7 @@ Any-register:  # wildcard
 
 List-value:
   0/imm32
-List-next:
+List-next:  # (handle list _)
   4/imm32
 List-size:  # (addr int)
   8/imm32
25 15:54:16 -0700 5582' href='/akkartik/mu/commit/html/examples/ex6.subx.html?h=hlt&id=6033844884f18c9a6e6e186c79c36fd1dd2c9bb0'>60338448 ^
695f9bf8 ^
60338448 ^
e0610e39 ^
ac07e589 ^
bb2b6ba7 ^















695f9bf8 ^
bb2b6ba7 ^















c9bda4d1 ^
bb2b6ba7 ^
14a38052 ^
c56d803c ^
60338448 ^
ee0e67b9 ^

c56d803c ^
bb2b6ba7 ^
a0d3cac4 ^

14a38052 ^

bb2b6ba7 ^
695f9bf8 ^
a0d3cac4 ^
695f9bf8 ^
33352536 ^
695f9bf8 ^
a0d3cac4 ^
695f9bf8 ^
a0d3cac4 ^
695f9bf8 ^
a0d3cac4 ^





695f9bf8 ^
a0d3cac4 ^






bb2b6ba7 ^



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