Preface |
|
ix | |
Part I Fundamentals of Compilation |
|
3 | (264) |
|
|
3 | (11) |
|
1.1 Modules and Interfaces |
|
|
4 | (1) |
|
|
5 | (2) |
|
1.3 Data structures for tree languages |
|
|
7 | (7) |
|
|
14 | (24) |
|
|
15 | (1) |
|
|
16 | (3) |
|
|
19 | (3) |
|
2.4 Nondeterministic finite automata |
|
|
22 | (6) |
|
2.5 ML-Lex: a lexical analyzer generator |
|
|
28 | (10) |
|
|
38 | (49) |
|
3.1 Context-free grammars |
|
|
40 | (5) |
|
|
45 | (10) |
|
|
55 | (13) |
|
3.4 Using parser generators |
|
|
68 | (7) |
|
|
75 | (12) |
|
|
87 | (16) |
|
|
87 | (5) |
|
|
92 | (11) |
|
|
103 | (21) |
|
|
103 | (8) |
|
5.2 Bindings for the Tiger compiler |
|
|
111 | (3) |
|
5.3 Type-checking expressions |
|
|
114 | (3) |
|
5.4 Type-checking declarations |
|
|
117 | (7) |
|
|
124 | (24) |
|
|
126 | (8) |
|
6.2 Frames in the Tiger compiler |
|
|
134 | (14) |
|
7 Translation to Intermediate Code |
|
|
148 | (25) |
|
7.1 Intermediate representation trees |
|
|
149 | (3) |
|
7.2 Translation into trees |
|
|
152 | (15) |
|
|
167 | (6) |
|
8 Basic Blocks and Traces |
|
|
173 | (13) |
|
|
174 | (5) |
|
8.2 Taming conditional branches |
|
|
179 | (7) |
|
|
186 | (25) |
|
9.1 Algorithms for instruction selection |
|
|
189 | (8) |
|
|
197 | (3) |
|
9.3 Instruction selection for the Tiger compiler |
|
|
200 | (11) |
|
|
211 | (17) |
|
10.1 Solution of dataflow equations |
|
|
213 | (9) |
|
10.2 Liveness in the Tiger compiler |
|
|
222 | (6) |
|
|
228 | (30) |
|
11.1 Coloring by simplification |
|
|
229 | (3) |
|
|
232 | (4) |
|
|
236 | (5) |
|
11.4 Graph coloring implementation |
|
|
241 | (9) |
|
11.5 Register allocation for trees |
|
|
250 | (8) |
|
12 Putting It All Together |
|
|
258 | (9) |
Part II Advanced Topics |
|
267 | (245) |
|
|
267 | (26) |
|
13.1 Mark-and-sweep collection |
|
|
267 | (5) |
|
|
272 | (2) |
|
|
274 | (5) |
|
13.4 Generational collection |
|
|
279 | (2) |
|
13.5 Incremental collection |
|
|
281 | (3) |
|
|
284 | (1) |
|
13.7 Interface to the compiler |
|
|
285 | (8) |
|
14 Object-Oriented Languages |
|
|
293 | (16) |
|
|
293 | (3) |
|
14.2 Single inheritance of data fields |
|
|
296 | (2) |
|
14.3 Multiple inheritance |
|
|
298 | (2) |
|
14.4 Testing class membership |
|
|
300 | (4) |
|
14.5 Private fields and methods |
|
|
304 | (1) |
|
|
304 | (1) |
|
14.7 Optimizing object-oriented programs |
|
|
305 | (4) |
|
15 Functional Programming Languages |
|
|
309 | (35) |
|
15.1 A simple functional language |
|
|
310 | (2) |
|
|
312 | (1) |
|
|
313 | (7) |
|
|
320 | (6) |
|
|
326 | (3) |
|
15.6 Efficient tail recursion |
|
|
329 | (2) |
|
|
331 | (13) |
|
|
344 | (33) |
|
16.1 Parametric polymorphism |
|
|
345 | (8) |
|
|
353 | (10) |
|
16.3 Representation of polymorphic variables |
|
|
363 | (9) |
|
16.4 Resolution of static overloading |
|
|
372 | (5) |
|
|
377 | (27) |
|
17.1 Intermediate representation for flow analysis |
|
|
378 | (3) |
|
17.2 Various dataflow analyses |
|
|
381 | (5) |
|
17.3 Transformations using dataflow analysis |
|
|
386 | (1) |
|
17.4 Speeding up dataflow analysis |
|
|
387 | (9) |
|
|
396 | (8) |
|
|
404 | (23) |
|
|
407 | (5) |
|
18.2 Loop-invariant computations |
|
|
412 | (1) |
|
|
413 | (6) |
|
|
419 | (4) |
|
|
423 | (4) |
|
19 Static Single-Assignment Form |
|
|
427 | (41) |
|
19.1 Converting to SSA form |
|
|
430 | (8) |
|
19.2 Efficient computation of the dominator tree |
|
|
438 | (7) |
|
19.3 Optimization algorithms using SSA |
|
|
445 | (6) |
|
19.4 Arrays, pointers, and memory |
|
|
451 | (2) |
|
19.5 The control-dependence graph |
|
|
453 | (3) |
|
19.6 Converting back from SSA form |
|
|
456 | (2) |
|
19.7 A functional intermediate form |
|
|
458 | (10) |
|
20 Pipelining and Scheduling |
|
|
468 | (24) |
|
20.1 Loop scheduling without resource bounds |
|
|
472 | (4) |
|
20.2 Resource-bounded loop pipelining |
|
|
476 | (8) |
|
|
484 | (8) |
|
|
492 | (20) |
|
|
493 | (3) |
|
21.2 Cache-block alignment |
|
|
496 | (2) |
|
|
498 | (6) |
|
|
504 | (1) |
|
|
505 | (3) |
|
21.6 Garbage collection and the memory hierarchy |
|
|
508 | (4) |
Appendix: Tiger Language Reference Manual |
|
512 | (10) |
A.1 Lexical issues |
|
512 | (1) |
A.2 Declarations |
|
512 | (3) |
A.3 Variables and expressions |
|
515 | (4) |
A.4 Standard library |
|
519 | (1) |
A.5 Sample Tiger programs |
|
520 | (2) |
Bibliography |
|
522 | (9) |
Index |
|
531 | |