Code Generation and Optimization for Java-to-C Compilers

Currently the Java programming language is popularly used in Internet-based systems, mobile and ubiquitous devices because of its portability and programability. However, inherently its performance is sometimes very limited due to interpretation overhead of class files by Java Virtual Machines (JVMs). In this paper, as one of the solutions to resolve the performance limitation, we present code generation and optimization techniques for a Java-to-C translator. Our compiler framework translates Java bytecode into C codes with preserving Java’s programming semantics, such as inheritance, method overloading, virtual method invocation, garbage collection, and so on. Moreover, our compiler translates for in Java into for in C instead of test and jump for better performance. Our runtime library fully supports Connected Limited Device Configuration (CLDC) 1.0 API’s.