摘要: 将Java程序静态编译成可执行程序是使用Java虚拟机动态编译/解释执行Java程序的另一种运行Java程序的方式。针对Java异常机制的特点和静态编译的需求,在介绍Java异常处理逻辑的基础上,提出一种在静态编译器中实现Java异常机制的算法,结合Open64开源编译器,给出该算法的具体步骤以及实现方式,以SPECjvm98为测试集,验证该算法的有效性。
关键词:
Java语言,
异常,
静态编译,
Open64编译器
Abstract: Compiling a Java program into native executable file statically is an alternative way of using Java VM(Virtual Machine) to run a Java program dynamically. This paper introduces an algorithm to implement Java exception mechanism in a Java static compiler, and presents the implementation of this algorithm based on the Java Open64 open source compiler. The effectiveness of this algorithm is proved by the test with SPECjvm98 testsuite.
Key words:
Java,
exception,
static compilation,
Open64 compiler
中图分类号:
曹志伟;杨克峤;王 伟;周 寻;杨 珉. 在静态编译器中实现Java异常机制的算法[J]. 计算机工程, 2009, 35(15): 88-90.
CAO Zhi-wei; YANG Ke-qiao; WANG Wei; ZHOU Xun; YANG Min. Algorithm for Implementing Java Exception Mechanism in Static Compiler[J]. Computer Engineering, 2009, 35(15): 88-90.