My books "in-depth analysis Java compiler: source code analysis and example explanation" will published

 

A full techie, 2013 graduate, worked ERP, games, ad, spent time in large companies, but in the end only the application does not meet the technical, left the company at the end of 2018, full-time wrote a book "in-depth parsing Java compiler: source code analysis and example explanation "in the near future will be on sale. 

1, Why write this book? 

From the end of July last year, leaving today paid the "in-depth analysis Java compiler: source code analysis and example explanation" manuscript, now listed issuers for almost a year later, this year can be considered to own an account of it. Writing a book does not make money, it is estimated royalties for the first time not as good as I got to stay one month's income in a big company now, but the time and effort it takes is enormous, and this study Industrial compiler has little reference books , to write the difficulty is not really small. But I think it is worth it, at least feel that it makes more sense than the work, the most important thing is love, and writing a book is not only a summary of his own knowledge, but also a share, in particular, can be discussed with the public, and more good upgrade themselves.   

2, Book reviews 

The book consists of 18 chapters, detailing Javac each process from Java source code into Class files compiled since Javac industrial grade compiler, the code and the compiler compared to some of the Demo, fully functional and abnormal and wrong process more rational, but also lead to excessive code Javac many details, so if the reader associated source code to achieve, it is recommended not to place undue tangle each implementation details, otherwise they will fall into a sea of ​​details. The book focuses on Javac source code interpretation, the reader is referred to the book reading these key source code debugging can be. The book cover as shown below:

 

The following brief "depth analysis of the Java compiler: source code analysis and example explanation" content of the book, as follows: 

chapter

description

Chapter 1

Introduced Javac directory structure and source code debugging, while achieving Javac support compiler command of a brief introduction

chapter 2

Javac document describes the operations (such as read .java files, read JAR package) related classes

Chapter 3

Javac described process converts the read character streams Java source code for the Token stream

Chapter 4

Each tree node understanding abstract syntax tree, which tree nodes can be roughly divided into definitions and declarations, statements and expressions

Chapter 5

Build abstract syntax tree, Javac establish a complete abstract syntax tree according to the Token stream

Chapter 6

The structure of the symbol table, but also on the type and the symbol used Javac introduced in detail. About common type of operation is described in the Appendix C, the operation of the common symbols are described in Appendix D

Chapter 7

Padding the symbol table, the two stages of the abstract syntax tree is scanned, then filled to the associated symbol table symbol

Chapter 8

Introduces the concrete realization of plug-in annotation process

Chapter 9

Introduces the Java type conversion, focuses on the assignment conversion, conversion method calls, casts and enhance numeric type conversion in these contexts to achieve

Chapter 10

It describes the syntax checking, mainly on the type definitions, variable definitions and method definitions of legality checks

Chapter 11

Introduced references digestion, mainly to find the unique symbolic expressions cited, Resolve class provides a reference type variable references and references to specific methods of discovery methods

Chapter 12

Abstract syntax tree to mark types and symbols, highlighted some important tree node, such as JCIdent, JCFieldAccess other specific labeling process

Chapter 13

He describes the generic implementation, a method of the generic type or generic features associated with a generic entirely supported by the compiler, and in the process generating the subsequent need for Class file erase Generic

Chapter 14

Describes the data flow analysis, respectively, from the variable assignment statement and abnormal activity of these three aspects is determined if statement, a loop statement and try statement were analyzed

Chapter 15

It describes the syntax sugar removal, respectively, for the simple syntactic sugar, the statement syntactic sugar, sugar enumeration class grammar and syntax of inner classes were introduced sugar

Chapter 16

It generates bytecode instructions introduced by simple analog case of a Java virtual machine runtime to generate bytecode instructions better

Chapter 17

Describes the generation of bytecode instructions, instructions for some common control structures, such as determining if statements, loop statements, switch statements and try statement generation process such as described in detail

Chapter 18

Class document describes the generation, according to the Class File Specification generation can be loaded file to run Java Virtual Machine

Appendix A

It describes the commands supported by Java

Appendix B

He describes the grammar

Appendix C

It describes common types of operations

Appendix D

It describes the operation of the common symbols

Appendix E

It describes virtual machine instruction bytecodes

 

3 books for readers

Read the book takes readers have some programming experience, the best reader is advised to have some understanding of the Java language. Specifically, the book is mainly for the following readers:

  • I want to learn Java language features of Java practitioners;
  • 想通过实践学习编译器理论的人,如高校相关专业的学生;
  • 想借鉴编译器架构的人;
  • 对大型工程的源代码感兴趣的人;

4、先读为快

由于纸书出版的延后,目前还不能在市面上购买,不过读者可以在纸质版书籍出版前先阅读电子版内容,有需要的同学可以扫描下图中的二维码直接进行购买,这个定价包括阅读电子版的权限以及本书出版后的纸质版书籍一本。

由于Javac编译器的实现细节众多,逻辑稠密,所以书中在对源代码实现进行介绍时,难免会有错误和漏洞,期望读者有更多的反馈,也希望能在华章的鲜读上与读取有更多的交流!

5、写在最后 

写完这本书,我的第一阶段目标也算完成了。接下来还要继续研究Java虚拟机Hotspot的源代码实现,期望后续会有类似这种《深入解析Hotspot:源码剖析与实例详解》的书籍出现在市面上。总之目标只有一个,彻底搞清楚Java语言底层的实现机制。

一个人的力量总是单薄的,如果有志同道合的朋友想一起研究Javac编译器或Hotspot虚拟机,亦或是对我的书籍有什么疑问,请加我微型mazhimazh,我拉你进群,备注信息:姓名-学校或公司-研究领域。

 

Guess you like

Origin www.cnblogs.com/mazhimazhi/p/11950146.html