作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2012, Vol. 38 ›› Issue (20): 52-55. doi: 10.3969/j.issn.1000-3428.2012.20.014

• 软件技术与数据库 • 上一篇    下一篇

基于Harmony的提前编译技术

李晓伟,熊 焰   

  1. (中国科学技术大学计算机科学与技术学院,合肥 230027)
  • 收稿日期:2012-01-12 修回日期:2012-02-10 出版日期:2012-10-20 发布日期:2012-10-17
  • 作者简介:李晓伟(1987-),男,硕士研究生,主研方向:编译技术,软件测试;熊 焰,教授、博士生导师

Ahead of Time Compilation Technology Based on Harmony

LI Xiao-wei, XIONG Yan   

  1. (School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China)
  • Received:2012-01-12 Revised:2012-02-10 Online:2012-10-20 Published:2012-10-17

摘要: 在开源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

中图分类号: