摘要: 在开源Java平台Harmony上,设计并实现一种提前(AOT)编译技术。将可执行代码以文件形式存入本地磁盘或远程服务器,在编译时将文件读入虚拟机,对代码做重定位处理,实现异常信息注册及常量区构造,以确保代码的正确运行。运行结果表明,与解释编译技术和即时编译技术相比,该AOT技术能提高Java程序的响应能力,具有较高的编译效率。
关键词:
提前编译,
重定位,
异常注册,
常量区,
动态加载
Abstract: The Ahead of Time(AOT) compilation is implemented on Harmony, which is an open source Java platform, to improve the ability of response and acquire high efficiency of Java codes in the real time environment. The AOT compiler stores executable codes in the form of files into disks or servers. It loads the file into the virtual machine, relocates codes, registers exception information and builds constant areas for all methods to make codes run correctly when it works. Operation results show AOT technology can improve the Java program response ability, and it has the high compiling efficiency compared with interpreter compiler and JIT compiler.
Key words:
Ahead of Time(AOT) compilation,
relocation,
anomaly registration,
constant area,
dynamic loading
中图分类号:
李晓伟, 熊焰. 基于Harmony的提前编译技术[J]. 计算机工程, 2012, 38(20): 52-55.
LI Xiao-Wei, XIONG Yan. Ahead of Time Compilation Technology Based on Harmony[J]. Computer Engineering, 2012, 38(20): 52-55.