Preface |
|
xi | |
|
|
1 | (12) |
|
1.1 Abstract Syntax Trees |
|
|
1 | (2) |
|
|
3 | (1) |
|
|
4 | (2) |
|
|
6 | (1) |
|
|
6 | (3) |
|
1.6 Example Compiler: A Partial Evaluator |
|
|
9 | (4) |
|
|
13 | (22) |
|
|
13 | (3) |
|
2.2 The x86int Assembly Language |
|
|
16 | (6) |
|
2.3 Planning the Trip to x86 |
|
|
22 | (3) |
|
|
25 | (2) |
|
2.5 Remove Complex Operands |
|
|
27 | (1) |
|
|
28 | (2) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
2.10 Generate Prelude and Conclusion |
|
|
33 | (1) |
|
2.11 Challenge: Partial Evaluator for Lvar |
|
|
33 | (2) |
|
|
35 | (22) |
|
3.1 Registers and Calling Conventions |
|
|
36 | (2) |
|
|
38 | (4) |
|
3.3 Build the Interference Graph |
|
|
42 | (2) |
|
3.4 Graph Coloring via Sudoku |
|
|
44 | (5) |
|
|
49 | (1) |
|
3.6 Prelude and Conclusion |
|
|
50 | (2) |
|
3.7 Challenge: Move Biasing |
|
|
52 | (3) |
|
|
55 | (2) |
|
4 Booleans and Conditionals |
|
|
57 | (26) |
|
|
58 | (1) |
|
4.2 Type Checking Lif Programs |
|
|
59 | (5) |
|
4.3 The Ck Intermediate Language |
|
|
64 | (1) |
|
|
64 | (2) |
|
4.5 Shrink the Lif Language |
|
|
66 | (1) |
|
|
67 | (1) |
|
4.7 Remove Complex Operands |
|
|
67 | (1) |
|
|
68 | (6) |
|
|
74 | (1) |
|
|
75 | (2) |
|
|
77 | (1) |
|
4.12 Challenge: Optimize Blocks and Remove Jumps |
|
|
77 | (4) |
|
|
81 | (2) |
|
5 Loops and Dataflow Analysis |
|
|
83 | (14) |
|
|
84 | (1) |
|
5.2 Cyclic Control Flow and Dataflow Analysis |
|
|
85 | (4) |
|
5.3 Mutable Variables and Remove Complex Operands |
|
|
89 | (2) |
|
|
91 | (1) |
|
5.5 Remove Complex Operands |
|
|
92 | (1) |
|
5.6 Explicate Control and Co |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
95 | (2) |
|
6 Tuples and Garbage Collection |
|
|
97 | (30) |
|
|
97 | (3) |
|
|
100 | (8) |
|
|
108 | (1) |
|
6.4 Remove Complex Operands |
|
|
109 | (1) |
|
6.5 Explicate Control and the dup Language |
|
|
110 | (1) |
|
6.6 Select Instructions and the x86Giobai Language |
|
|
110 | (5) |
|
|
115 | (1) |
|
6.8 Prelude and Conclusion |
|
|
115 | (2) |
|
6.9 Challenge: Simple Structures |
|
|
117 | (2) |
|
|
119 | (4) |
|
|
123 | (1) |
|
6.12 Challenge: Generational Collection |
|
|
124 | (1) |
|
|
125 | (2) |
|
|
127 | (18) |
|
|
127 | (5) |
|
|
132 | (3) |
|
|
135 | (1) |
|
7.4 Reveal Functions and the LFunRef Language |
|
|
135 | (1) |
|
|
135 | (1) |
|
7.6 Remove Complex Operands |
|
|
136 | (1) |
|
7.7 Explicate Control and the CFun Language |
|
|
136 | (2) |
|
7.8 Select Instructions and the x86 Def callq* Language |
|
|
138 | (2) |
|
|
140 | (1) |
|
|
141 | (1) |
|
7.11 Prelude and Conclusion |
|
|
141 | (2) |
|
7.12 An Example Translation |
|
|
143 | (2) |
|
8 Lexically Scoped Functions |
|
|
145 | (16) |
|
|
147 | (3) |
|
8.2 Assignment and Lexically Scoped Functions |
|
|
150 | (1) |
|
8.3 Assignment Conversion |
|
|
150 | (2) |
|
|
152 | (2) |
|
8.5 An Example Translation |
|
|
154 | (1) |
|
|
155 | (1) |
|
8.7 Explicate Control and Ccios |
|
|
155 | (1) |
|
|
155 | (3) |
|
8.9 Challenge: Optimize Closures |
|
|
158 | (2) |
|
|
160 | (1) |
|
|
161 | (18) |
|
|
161 | (5) |
|
9.2 Representation of Tagged Values |
|
|
166 | (1) |
|
|
166 | (6) |
|
9.4 Cast Insertion: Compiling LDyn to LAny |
|
|
172 | (1) |
|
|
173 | (1) |
|
9.6 Remove Complex Operands |
|
|
174 | (1) |
|
9.7 Explicate Control and LAny |
|
|
174 | (1) |
|
|
174 | (3) |
|
9.9 Register Allocation for LAny |
|
|
177 | (2) |
|
|
179 | (20) |
|
|
179 | (8) |
|
|
187 | (1) |
|
|
188 | (3) |
|
|
191 | (1) |
|
10.5 Differentiate Proxies |
|
|
192 | (2) |
|
|
194 | (1) |
|
|
195 | (1) |
|
|
195 | (1) |
|
|
196 | (3) |
|
|
199 | (12) |
|
|
206 | (1) |
|
11.2 Resolve Instantiation |
|
|
207 | (1) |
|
|
207 | (4) |
|
|
211 | (4) |
|
|
211 | (1) |
|
|
211 | (1) |
|
A.3 x86 Instruction Set Quick Reference |
|
|
212 | (3) |
References |
|
215 | (8) |
Index |
|
223 | |