Data processing: software development – installation – and managem – Software program development tool – Translation of code
Reexamination Certificate
1998-08-14
2001-07-03
Powell, Mark R. (Department: 2122)
Data processing: software development, installation, and managem
Software program development tool
Translation of code
C717S152000, C711S001000
Reexamination Certificate
active
06256784
ABSTRACT:
FIELD OF THE INVENTION
The present invention relates generally to interpreters and, more particularly, to an interpreter with reduced memory access and improved jump-through-register handling.
BACKGROUND OF THE INVENTION
Computer programs are typically written in source code that must be translated into a native machine code so that the translated native machine code can be executed by a computer. For example, Java™ technology uses both compilation and interpretation. Compilation is a process of translating computer code from one language to another language, and storing the results of that translation for later execution on a computer. Many well-known programming languages such as C, Pascal, and Fortran are usually compiled straight from source code to native machine code (i.e., native instructions of a microprocessor). In contrast, the Java™ programming language is typically compiled into Java™ class files, which contain architecture-independent instructions for the well-known Java™ Virtual Machine (e.g., Sun Microsystems, Inc., provides a commercially available package called the Java™ Development Kit (JDK) 1.0.2 and 1.1).
An interpreter is a program which performs the actions as directed by the source code or intermediate code (e.g., Java™ bytecode), at run time. Thus, interpretation involves translating code from one language to another language except that the translation is directly executed instead of stored for later execution. Languages (or language families) such as Lisp and Basic are typically interpreted straight from source code to native machine code. In contrast, in standard Java™ implementations, the interpreter interprets from the Java™ class files. In particular, Java™ Virtual Machine instructions (e.g., Java™ bytecodes), which were compiled from source code, are interpreted by a Java™ interpreter. Thus, the compiled source code is converted on the fly into native machine code, which is then executed rather than stored.
Interpreting Java™ Virtual Machine instructions is common on existing implementations of the Java™ Virtual Machine, but is not required by either the Java™ Language Specification or the Java™ Virtual Machine Specification. A Java™ Virtual Machine implementation can also use Just-In-Time (JIT) compilation: translating Java™ source code into native machine code at run time on the local platform and then executing the translated (stored) native machine code. Further, another approach is to have hardware such as a microprocessor that directly implements the Java™ Virtual Machine instruction set so that the microprocessor executes Java™ bytecodes directly.
SUMMARY OF THE INVENTION
The present invention provides an interpreter with reduced memory access and improved jump-through-register handling. For example, the present invention provides a cost-effective and high performance apparatus and method for an interpreter such as a Java™ interpreter that provides reduced memory access and improved jump-through-register handling.
In one embodiment, a method includes storing handlers in cells of a predetermined size in a table, and generating an address of a first handler by adding a table base address and a first table offset thereby eliminating the need for a memory access to generate the address of the bytecode handler. In particular, the table base address is the starting address of the table. The first table offset is the offset into the table for the first handler.
In one embodiment, the method includes storing bytecode handlers in power of two size cells, such as 64 byte cells. Also, generating the address of a particular bytecode handler is efficiently implemented as a shift operation and an add operation. Accordingly, on modern microprocessors on which memory accesses are costly from a performance standpoint, this embodiment provides improved interpreter performance by reducing memory access during interpretation.
In one embodiment, a method includes executing a first handler, and speculatively computing a first target and a second target for a second handler while executing the first handler. In particular, this allows for providing a hint to a branch unit of a microprocessor to indicate the location for the next branch address before executing the next branch. In one embodiment, the hint is provided to the branch unit using a register to store the speculatively computed target address.
In one embodiment, the method speculatively computes the first target and the second target in order to provide a hint to the branch unit about a destination of an approaching jump-through-register for a Java™ interpreter. In particular, the speculative computation is based on an empirical observation that the distribution of bytecode lengths for Java™ bytecodes is typically one or two bytes long for each bytecode. Further, the speculative computation can be performed efficiently using the above described generation of addresses for bytecode handlers, which reduces memory accesses during bytecode interpretation. Accordingly, this embodiment improves jump-through-register handling for a Java™ interpreter.
Other aspects and advantages of the present invention will become apparent from the following detailed description and accompanying drawings.
REFERENCES:
patent: 5367648 (1994-11-01), Chuang et al.
patent: 5539899 (1996-07-01), Huynh et al.
patent: 5860076 (1999-01-01), Greene et al.
patent: 5870575 (1999-02-01), Kahle et al.
patent: 5956495 (1999-09-01), Kahle et al.
patent: 6023750 (2000-02-01), Hansen et al.
ATI International SRL
Kwok Edward C.
Nguyen-Ba Hoang-Vu Antony
Powell Mark R.
Skjerven Morrill & MacPherson LLP
LandOfFree
Interpreter with reduced memory access and improved... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Interpreter with reduced memory access and improved..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Interpreter with reduced memory access and improved... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2466122