Compiling and persisting of intermediate language code

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06484313

ABSTRACT:

FIELD OF THE INVENTION
This invention relates generally to intermediate languages, and more particularly to compiling and persisting of intermediate language code.
BACKGROUND OF THE INVENTION
Intermediate language-type models for programming languages have become increasingly popular. In an intermediate language model, a source code is generally compiled into a desirably substantially platform-independent intermediate language. When the code is desired to be run on a particular platform, an execution engine on that platform then interprets or compiles the intermediate language to native code understandable by the platform. Examples of systems that use intermediate languages include the Java virtual machine.
As used herein, the terminology intermediate language refers generally to an intermediate language format that is an executable format and that is designed to be run. It can be loaded with very little time and memory overhead. Each part of such a format is typically designed to allow execution with minimal effort; all information required to execute part of the code is present. Such intermediate languages include byte code as used by Java virtual machines, for example. The terminology intermediate language as used herein does not generally refer to the data communicated from the front end of a compiler—for example, a typical C compiler—to the back end of the compiler.
Interpretation of intermediate language code means that as each individual instruction of intermediate language code is encountered, it is decoded and executed. Interpretation is usually the slowest manner by which intermediate language code can be executed. Therefore, compilation of intermediate language code to native code is generally used over interpretation of the intermediate code.
With respect to intermediate language code, compilation to native code is conducted within the prior art on adjust-in-time basis, such that the process is often referred to as just-in-time compilation. Just-in-time compilation of intermediate language code to native code means that a section of intermediate language code instructions is examined and converted to a corresponding section of native code, which is then executed. Thus, as compared to interpretation, which decodes and executes IL code on a instruction-by-instruction basis, just-in-time compilation converts and executes code on a section-by-section basis.
Generally, just-in-time compilation results in faster execution than does interpretation. However, there are disadvantages to the just-in-time compilation approach. Each time a program is run, it must be reconverted to native code. Because conversion time is at a premium, just-in-time compilation often sacrifices the quality of the native code for compilation speed, resulting in native code that may be worse in quality than that generated by a traditional source code-to-native code compiler. The native code that is generated also is tailored specifically to the individual program running; multiple programs cannot usually share native code. In addition, since two versions of the program, an intermediate language version and a native version, are loaded into memory, the resource requirements of a just-in-time compiled program are generally undesirably large.
Furthermore, while just-in-time compilation results in faster execution than does interpretation, just-in-time compilation of intermediate language code to native code still typically results in much slower execution than does straight execution of native code that was compiled directly from source code. Generally, this trade-off is taken for granted as an inherent characteristic of intermediate-language code: what is gained in platform independence is lost in execution speed. Nevertheless, it is desirable for intermediate-language code to be executed as fast as possible. For these and other reasons, there is a need for the present invention.
SUMMARY OF THE INVENTION
The invention relates to compilation and persisting of intermediate language code, as this phrase has been defined in the background section. In one embodiment, a computer-implemented method first inputs intermediate language code. The method compiles this code into corresponding native code—for example, in a non-just-in-time manner. The method then outputs the native code—for example, persisting the native code to a hard disk drive or a non-volatile memory. Only then is the native code executed. In one embodiment, verifiability is provided for.
Embodiments of the invention hence differ in their approach to compilation of intermediate language code as compared to the prior art. Usually all of the intermediate language code is compiled to native code prior to the native code being executed. This means that the native code can be saved to a hard disk drive, for example, and then later executed, without the performance penalties typically associated with intermediate language code. The initial compilation of the intermediate language code into native code can be performed as a program installation-type procedure that computer users are typically accustomed to with more traditional programs compiled directly to native code from source code, or, the initial compilation can be performed in the background, while the user is doing other things.
Within embodiments of the invention, generally the conversion from intermediate language code to native code occurs on the target machine on which the native code is meant to be run. This conversion is desirably made by an optimizing compiler, which is managed within the run-time environment. The goal of the conversion is generally to preserve the benefits of intermediate language code distribution—such as verifiability, platform independence, and late binding—while achieving the performance advantage of an optimizing compiler, and not incurring run-time performance penalties.
While the prior art provides for interpretation of intermediate language code on an instruction-by-instruction basis and for just-in-time compilation of intermediate language code on a section-by-section basis, embodiments of the invention provide for complete whole-program compilation prior to execution. Execution of the resulting native code is therefore usually faster than the execution of just-in-time compiled code, and in some instances approaches that of more traditional programs compiled directly to native code from source code. Embodiments of the invention thus provide to large degree the best of both worlds: the speed of execution of more traditional programs, and the platform portability (i.e., independence) of intermediate language programs.
The invention includes computer-implemented methods, machine-readable media, computerized systems, devices and computers of varying scopes. Other aspects, embodiments and advantages of the invention, beyond those described here, will become apparent by reading the detailed description and with reference to the drawings.


REFERENCES:
patent: 6112025 (2000-08-01), Mulchandani et al.
patent: 6157948 (2000-12-01), Inoue et al.
patent: 6158048 (2000-12-01), Luch et al.
patent: 6289506 (2001-09-01), Kwong et al.
patent: 6324688 (2001-11-01), Brown et al.
patent: WO 99/42925 (1999-08-01), None
Hsieh et al. Java Bytecode to Native Code Translation: The Caffeine Prototype and Preliminary Results. IEEE. pp. 90-97. 1996.*
Hua et al. Platform Independence Issues in Compiling Java Bytecode to Native Code. IEEE. pp. 530-532. Feb. 2000.*
The Java Hotspot Performance Engine Data Sheet, available on the web site http://java.sun.com, date unavailable.
X/Open Guide: Architecture Neutral Distribution Format (XANDF), Jan. 1996, ISBN 1-85912-141-1, X/Open Document No. G508.
Plezbert et al, Does just in time better late than never, Conference record on POPL, ACM Sigplan-Sigact Symposium on Principles of Programming Languages, US, New York, vol. 28, Jan. 15, 97, pp. 120-131.
Weiss et al, TurboJ, A Java bytecode-to-native compiler, Proceedings of the ACM Sigplan workshop on Languages, compilers, and tools for embedded systems LCTES '98, Montreal, Canada, Jun. 19-20,

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Compiling and persisting of intermediate language code does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Compiling and persisting of intermediate language code, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Compiling and persisting of intermediate language code will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2941763

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.