本書闡述了編譯程序的各個(gè)方面:詞法分析,句法分析,抽象語(yǔ)法,語(yǔ)義行為,中間件表示,通過(guò)樹(shù)匹配實(shí)現(xiàn)的指令選擇,數(shù)據(jù)流分析,配色圖寄存器分配和運(yùn)行系統(tǒng)。書中內(nèi)容較好地涵蓋了代碼生成和寄存器分配的新技術(shù),還包括功能型程序設(shè)計(jì)語(yǔ)言與面向?qū)ο蟪绦蛟O(shè)計(jì)語(yǔ)言編譯。當(dāng)前廣為接受且成功運(yùn)用的技術(shù)在書中被簡(jiǎn)要描述,而非羅列所有可能變量的清單。對(duì)編譯程序模塊接口的詳細(xì)描述以真正Java類的形式說(shuō)明。本書及時(shí)部分"編譯基礎(chǔ)知識(shí)"適用于為時(shí)一學(xué)期的編譯程序初期課程。第二部分"高級(jí)論題"包括:面向?qū)ο笈c功能型程序設(shè)計(jì)語(yǔ)言編譯,無(wú)用存儲(chǔ)單元收集,循環(huán)優(yōu)化,靜態(tài)單任務(wù)形式,指令調(diào)度和緩存–內(nèi)存優(yōu)先級(jí)優(yōu)化,這部分內(nèi)容可作為編譯程序第二學(xué)期或研究生課程講授。此新版在原版基礎(chǔ)上大幅度改寫,更多地包含Java和面向?qū)ο蟪绦蛟O(shè)計(jì)概念。獨(dú)特之處在于提供了以Java語(yǔ)言重新編寫的Java本身子集的編譯程序項(xiàng)目。此項(xiàng)目包括前端和后端設(shè)計(jì)階段,使學(xué)生得以在一學(xué)期內(nèi)構(gòu)建一個(gè)完整的可運(yùn)行編譯程序。本書適用于高等院校計(jì)算機(jī)專業(yè)Java程序設(shè)計(jì)語(yǔ)言、編譯程序類課程。
作者簡(jiǎn)介:
Adrew W.Appel is Professor of Computer Science at Princeton University.He has done research and published papers on compilers,functional programming languages,runtime systems and garbage collection,type systems,and computersecurity;he is also author of the book Compiling with Continuations.
Jens Palsberg is Associate Professor of Computer Science at Pureue University.His research are programming languages,compilers,software engineering,and information security.He has authored more than 50 technical papers in these areas and a book with Michael Schwartzbach,Object-oriented Type Systems.
咎捉萄в檬櫚奶氐悖
Preface
Part 1 Fundamentals of Compilation
1 Introduction
2 Lexical Analysis
3 Parsing
4 Abstract Syntax
5 Semantic Analysis
6 Activation Records
7 Translation to Intermediate Code
8 Basic Blocks Traces
9 Instruction Selection
10 Liveness Analysis
11 Register Allocation
12 Putting It All Together
Part2 Advanced Topics
13 Garbage Collection
14 Object-Orienter Languages
15 Functional Programming Languages
16 Polymorphic Types
17 Dataflow Analysis
18 Loop Optimizations
19 Static Single-Assignment Form
20 Pipelining and Scheduling
21 The Memory Hierarchy
Appendix:MiniJava Language Reference Manual
Bibliography
Index