Modern Compiler Implementation in Java, 2/e (Hardcover)

Andrew W. Appel, Jens Palsberg

  • 出版商: Camberidge
  • 出版日期: 2002-10-21
  • 售價: $3,910
  • 貴賓價: 9.5$3,715
  • 語言: 英文
  • 頁數: 501
  • 裝訂: Hardcover
  • ISBN: 052182060X
  • ISBN-13: 9780521820608
  • 相關分類: Java 程式語言Compiler
  • 已絕版

買這商品的人也買了...

相關主題

商品描述

This textbook describes all phases of a compiler: lexical analysis, parsing, abstract syntax, semantic actions, intermediate representations, instruction selection via tree matching, dataflow analysis, graph-coloring register allocation, and runtime systems. It includes good coverage of current techniques in code generation and register allocation, as well as the compilation of functional and object-oriented languages, that is missing from most books. The most accepted and successful techniques are described concisely, rather than as an exhaustive catalog of every possible variant, and illustrated with actual Java classes. The first part of the book, Fundamentals of Compilation, is suitable for a one-semester first course in compiler design. The second part, Advanced Topics, which includes the compilation of object-oriented and functional languages, garbage collection, loop optimization, SSA form, instruction scheduling, and optimization for cache-memory hierarchies, can be used for a second-semester or graduate course. This new edition has been extensively rewritten to include more discussion of Java and object-oriented programming concepts, such as visitor patterns. A unique feature is the newly redesigned compiler project in Java, for a subset of Java itself. The project includes both front-end and back-end phases, so that students can build a complete working compiler in one semester.

Contents

Part I. 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 and traces
9. Instruction selection
10. Liveness analysis
11. Register allocation
12. Putting it all together
Part II. Advanced Topics: 13. Garbage collection
14. Object-oriented 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: Mini-Java reference manual.

商品描述(中文翻譯)

本教科書描述了編譯器的所有階段:詞法分析、語法分析、抽象語法、語義動作、中間表示、通過樹匹配進行指令選擇、數據流分析、圖形著色寄存器分配和運行時系統。它包括了代碼生成和寄存器分配中當前技術的詳細介紹,以及大多數書籍中缺少的函數式和面向對象語言的編譯。本書簡潔地描述了最被接受和成功的技術,而不是列舉每種可能的變體,並以實際的Java類進行了示例。書籍的第一部分《編譯基礎》適合作為編譯器設計的一學期第一門課程。第二部分《高級主題》包括面向對象和函數式語言的編譯、垃圾回收、循環優化、SSA形式、指令調度和針對緩存記憶體層次結構的優化,可用於第二學期或研究生課程。這個新版本已經被廣泛重寫,以包括更多關於Java和面向對象編程概念的討論,例如訪問者模式。一個獨特的特點是在Java中重新設計的編譯器項目,用於Java的子集。該項目包括前端和後端階段,使學生能夠在一個學期內構建一個完整的工作編譯器。

目錄:
第一部分. 編譯基礎: 1. 引言
2. 詞法分析
3. 語法分析
4. 抽象語法
5. 語義分析
6. 活動記錄
7. 轉換為中間代碼
8. 基本塊和追蹤
9. 指令選擇
10. 存活分析
11. 寄存器分配
12. 綜合應用
第二部分. 高級主題: 13. 垃圾回收
14. 面向對象語言
15. 函數式編程語言
16. 多態類型
17. 數據流分析
18. 循環優化
19. 靜態單賦值形式
20. 流水線和調度
21. 記憶體層次結構
附錄: 迷你Java參考手冊。