Institutional Repository
| Java编译技术的研究与实现 | |
| 冀振燕 | |
| Major | 计算机软件与理论 |
| 1999 | |
| Degree Grantor | 中国科学院软件研究所 |
| Degree Level | 博士 |
| Place of Degree Grantor | 中国科学院软件研究所 |
| Keyword | Java语言 编译器 优化 中文化 国际化 |
| English Abstract | Java语言具有很多优点,这些优点使得Java语言得到了迅速地发展。但是由字节码的解释执行所带来的Java语言的低性能大大制约了Java语言的发展。为了改善Java语言的性能,Java编译及其优化技术已成为当今的一个研究热点。本论文主要研究了Java源代码到Java字节码的编译技术,以及独立于目标机的优化技术。本论文的主要工作如下:1.深入分析了各种Java编译系统,并对Java编译系统进行了分类,指出了它们的优缺点,进行了一些比较,为实现基于我国国产系统平台COSA/COSIX上的Java编译系统提供了很好的借鉴。2.给出了编译器的总体设计和中间表示设计。采用前、后端结构,使编译器可与不同的前端、后端结合构成不同的编译器,从而具有很好的可扩展性和可重用性。采用四遍扫描,将中间代码优化与语义分析分开,使优化模块具有很好的可重用性。采用基于抽象语法树的中间表示,在中间表示IRtree的设计中,采用面向对象的设计方式,给编译器的实现带来了很好的模块性和可扩展性。面向对象程序设计的多态性也给编译器的实现带来了很大的方便。3.给出了目标代码生成的形式描述,有利于编译器的设计与实现。4.给出了编译器各模块的实现方案。采用Java语言实现编译器,使编译器具有跨平台性。5.根据标识符在类文件常数池中的存储特点,提出了域名(field name)的优化算法,用简单的域名来代替复杂的域名,从而达到了减小存储空间的目的。根据tableswitch和lookupswitch指令的特点,提出了翻译switch语句时,如何选用指令的算法,从而达到了时间与空间的综合和优化。根据类文件中字节码的特点,设计了对goto、if |
| Abstract | Java programming language has a lot of advantages, which make Java expand quickly. But Java's performance problems caused by interpreting bytecodes restrict the application of Java language. To improve the performance of Java applications' execution, Java compiler technology and optimization technology have become researched hot spots. The compiler technology that compile Java source codes to bytecodes and the optimization technology independent of target machines are researched in the dissertation. The following is the main research work. 1. The dissertation analyses all kinds of Java compiler systems, sorts them into five categories, and points out the advantages and disadvantages of the systems, compares them, and provides reference for the implementation of the Java compiler system on COSA/COSIX. 2. The dissertation describes the design of our compiler and the intermediate representations of the compiler. The compiler is separated into a front end and a back end. With the front and back end structure, the compiler can be combined with different front ends or back ends to construct different compilers, and the compiler has good extensibility and reusability. The compiler is four passes. The optimization of the intermediate representations is separated from the semantic analysis. The optimization module has a good reusability. The compiler adopted the intermediate representations based on abstract syntax trees. T he implementation of intermediate representation IRtree adopts object-oriented design. With the design, the compiler has good modularity and extensibility. Polymorphism of object-oriented programming facilitates the compiler's implementation. 3. The dissertation uses the formal description to describe the generation scheme of bytecodes, and makes for the design and implementation of Java compilers. 4. The dissertation gives the implementation scheme of the modules of the compiler. The compiler has been implemented in Java, and the compiler is independent of platforms. 5. The dissertation advances an optimization algorithm about field names based on identifiers' storage characteristic. To save the storage space, simple field names are used to substitute complicated field names. The dissertation advances an optimization algorithm about choosing the instruction during translating switch statements based on tableswitch instruction's and lookupswitch instruction's characteristic. The optimization saves the storage space and applications' execution time. Based on bytecodes' characteristic, the dissertation designs the optimization about goto, if |
| Pages | 108 |
| Language | 中文 |
| Content Type | 学位论文 |
| URI | http://ir.iscas.ac.cn/handle/311060/6032 |
| Collection | 中科院软件所_中科院软件所 |
| Recommended Citation GB/T 7714 | 冀振燕. Java编译技术的研究与实现[D]. 中国科学院软件研究所. 中国科学院软件研究所,1999. |
| Files in This Item: | ||||||
| File Name/Size | DocType | Version | Access | License | ||
| LW002846.pdf(1756KB) | 限制开放 | -- | Application Full Text | |||
Items in the repository are protected by copyright, with all rights reserved, unless otherwise indicated.
Edit Comment