
最 低 价:¥41.30
| 本书享有“虎书”的称号,与有“龙书”之称的《编译原理》齐名。本书出版时间晚,内容新。 书中专门为学生提供了一个用 C 语言编写的实习项目,学生可以在一学期内创建一个功能完整的编译器。美国麻省理工学院等众多名校均采用本书作为编译原理课程的教材。 |
| Andrew W.Appel 美国普林斯顿大学计算机科学系教授,第26届ACM SIGPLAN-SIGACT 程序设计原理年会大会执行主席,1998-1999年在贝尔实验室做研究工作。主要研究方向:计算机安全、编译器设计、程序设计语言等。除本书外,还出版了两本不同语言版本的编译原理教材:Modern Compiler mplementation in Java和Modern Compiler lmplementation in ML。 .. << 查看详细 |
| preface vii part i fundamentals of compilation 1 introduction 3 1.1 modules and interfaces 4 1.2 tools and software 5 1.3 data structures for tree languages 7 2 lexical analysis 16 2.1 lexical tokens 17 2.2 regular expressions 18 2.3 finite automata 21 2.4 nondeterministic finite automata 24 2.5 lex: a lexical analyzer generator 30 3 parsing 39 3.1 context-free grammars 41 3.2 predictive parsing 46 3.3 lr parsing 56 3.4 using parser generators 69 3.5 error recovery 76 4 abstract syntax 88 4.1 semantic actions 88 .4.2 abstract parse trees 92 5 semantic analysis 103 5.1 symbol tables 103 5.2 bindings for the tiger compiler 112 5.3 type-checking expressions 115 5.4 type-checking declarations 118 6 activation records 125 6.1 stack frames 127 6.2 frames in the tiger compiler 135 7 translation to intermediate code 150 7.1 intermediate representation trees 151 7.2 translation into trees 154 7.3 declarations 170 8 basic blocks and traces 176 8.1 canonical trees 177 8.2 taming conditional branches 185 9 instruction selection 191 9.1 algorithms for instruction selection 194 9.2 cisc machines 202 9.3 instruction selection for the tiger compiler 205 10 liveness analysis 218 10.1 solution of dataflow equations 220 10.2 liveness in the tiger compiler 229 11 register allocation 235 11.1 coloring by simplification 236 11.2 coalescing 239 11.3 precolored nodes 243 11.4 graph coloring implementation 248 11.5 register allocation for trees 257 12 putting it all together 265 part ii advanced topics 13 garbage collection 273 13.1 mark-and-sweep collection 273 13.2 reference counts 278 13.3 copying collection 280 13.4 generational collection 285 13.5 incremental collection 287 13.6 baker's algorithm 290 13.7 interface to the compiler 291 14 object-oriented languages 299 14.1 classes 299 14.2 single inheritance of data fields 302 14.3 multiple inheritance 304 14.4 testing class membership 306 14.5 private fields and methods 310 14.6 classless languages 310 14.7 optimizing object-oriented programs 311 15 functional programming languages 315 15.1 a simple functional language 316 15.2 closures 318 15.3 immutable variables 319 15.4 inline expansion 326 15.5 closure conversion 332 15.6 efficient tail recursion 335 15.7 lazy evaluation 337 16 polymorphic types 350 16.1 parametric polymorphism 351 16.2 type inference 359 16.3 representation of polymorphic variables 369 16.4 resolution of static overloading 378 17 dataflow analysis 383 17.1 intermediate representation for flow analysis 384 17.2 various dataflow analyses 387 17.3 transformations using dataflow analysis 392 17.4 speeding up dataflow analysis 393 17.5 alias analysis 402 18 loop optimizations 410 18.1 dominators 413 18.2 loop-invariant computations 418 18.3 induction variables 419 18.4 array-bounds checks 425 18.5 loop unrolling 429 19 static single-assignment form 433 19.1 converting to ssa form 436 19.2 efficient computation of the dominator tree 444 19.3 optimization algorithms using ssa 451 19.4 arrays, pointers, and memory 457 19.5 the control-dependence graph 459 19.6 converting back from ssa form 462 19.7 a functional intermediate form 464 20 pipelining and scheduling 474 20.1 loop scheduling without resource bounds 478 20.2 resource-bounded loop pipelining 482 20.3 branch prediction 490 21 the memory hierarchy 498 21.1 cache organization 499 21.2 cache-block alignment 502 21.3 prefetching 504 21.4 loop interchange 510 21.5 blocking 511 21.6 garbage collection and the memory hierarchy 514 appendix: tiger language reference manual 518 a. 1 lexical issues 518 a.2 declarations 518 a.3 variables and expressions 521 a.4 standard library 525 a.5 sample tiger programs 526 bibliography 528 index 537 |
商品评论(0条)