High speed virtual machine and compiler
Abstract
A virtual machine with a stack architecture includes: a stack 120 whose top level (TOS) and the second level from the top (SOS) are mapped to registers of a real machine 201 ; an instruction storing unit 102 for storing a virtual machine instruction sequence to be executed; next instruction information storing unit 101 for storing a plurality of sets of next instruction information that are each associated with a different virtual machine instruction in the virtual machine instruction sequence, the set of next instruction information for a given virtual machine instruction indicating a change in a number of sets of data stored in the stack 120 due to execution of a virtual machine instruction executed after the given virtual machine instruction; a decoding unit 103 for decoding a virtual machine instruction and an associated set of next instruction information after reading them from the instruction storing unit 102 and the next instruction information storing unit 101 ; and an executing unit 110 for executing the decoded virtual machine instruction and performing a stack handling in the stack 120 in advance for a virtual machine instruction that is to be executed next based on the set of next instruction information.
Claims
exact text as granted — not AI-modified1 . A virtual machine that executes a virtual machine instruction sequence under control of a real machine, comprising:
stack means for temporarily storing data in a last-in first-out format; instruction storing means for storing the virtual machine instruction sequence and a plurality of sets of succeeding instruction information, wherein each virtual machine instruction in the virtual machine instruction sequence is associated with a set of succeeding instruction information that indicates a change in a storage state of the data in the stack means due to execution of a virtual machine instruction executed after the associated virtual machine instruction; read means for reading a virtual machine instruction and an associated set of succeeding instruction information from the instruction storing means; and decoding-executing means for specifying and executing operations corresponding to a combination of the read virtual machine instruction and the read set of succeeding instruction information.
2 . The virtual machine of claim 1 , wherein the decoding-executing means includes:
a real machine instruction sequence storing unit for storing a plurality of real machine instruction sequences that correspond to all combinations of virtual machine instructions and sets of succeeding instruction information; a specifying unit for specifying a real machine instruction sequence in the real machine instruction sequence storing unit, the real machine instruction sequence corresponding to a combination of the virtual machine instruction and the set of succeeding instruction information read by the read means; and an executing unit for executing the specified real machine instruction sequence.
3 . The virtual machine of claim 2 , wherein each set of succeeding instruction information indicates a change in a number of sets of data in the stack means due to execution of a virtual machine instruction executed after a virtual machine instruction associated with the set of succeeding instruction information and
wherein at least one real machine instruction sequence stored in the real machine instruction sequence storing unit contains real machine instructions that perform a stack handling in the stack means in advance for a virtual machine instruction that is to be executed based on a set of succeeding instruction information associated with a currently executed virtual machine instruction.
4 . The virtual machine of claim 3 , wherein the real machine instruction sequences stored in the real machine instruction sequence storing unit are composed with a premise that regions of the stack means used to store two sets of data to be read first and second are mapped to two registers in the real machine.
5 . The virtual machine of claim 1 , wherein the instruction storing means includes a first storage area for storing the virtual machine instruction sequence and a second storage area for storing the sets of succeeding instruction information, wherein each location that stores a virtual machine instruction in the first storage area is associated with a location that stores an associated set of succeeding instruction information in the second storage area and
wherein the read means reads the virtual machine instruction from a location in the first storage area and the associated set of succeeding instruction information from a location in the second storage area, the location in the first storage area being associated with the location in the second storage area.
6 . The virtual machine of claim 1 , wherein the virtual machine instruction sequence stored in the instruction storing means is an extended virtual machine instruction sequence that includes extended virtual machine instructions, the extended virtual machine instructions being combinations of virtual machine instructions and associated sets of succeeding instruction information,
wherein the read means reads an extended virtual machine instruction from the instruction storing means, and wherein the decoding-executing means specifies and executes operations corresponding to the extended virtual machine instruction.
7 - 38 . (Cancelled)Join the waitlist — get patent alerts
Track US2004268348A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.