Browse Prior Art Database

Mechanism for High-Speed Execution of Interpreters and High-Speed Cooperative Execution With Machine Codes

IP.com Disclosure Number: IPCOM000036786D
Original Publication Date: 1989-Oct-01
Included in the Prior Art Database: 2005-Jan-29
Document File: 3 page(s) / 23K

Publishing Venue

IBM

Related People

Komatsu, H: AUTHOR [+2]

Abstract

Disclosed is a mechanism for high-speed execution of interpreters and high-speed cooperative execution with machine codes. This mechanism uses codes consisting of normal virtual codes and a machine code, 'call,' in order to eliminate the bottlenecks of interpreter execution and of cooperative execution with machine codes.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 3

Mechanism for High-Speed Execution of Interpreters and High-Speed Cooperative Execution With Machine Codes

Disclosed is a mechanism for high-speed execution of interpreters and high- speed cooperative execution with machine codes. This mechanism uses codes consisting of normal virtual codes and a machine code, 'call,' in order to eliminate the bottlenecks of interpreter execution and of cooperative execution with machine codes.

There are two ways to execute a program written in a high-level language: with a compiler and with an interpreter. A compiler translates a source program into machine codes, which can run on a real machine directly. An interpreter translates a source program into intermediate codes (virtual machine codes). The execution of the source program is performed by a virtual machine built on a real machine. Virtual codes, like real machine codes, consist of operators and operands. An operator is expressed by some number (approximately 1 byte). A virtual machine 'fetches' an operator, 'decodes' it, and 'calls' a routine with operands. The execution follows this cycle.

The execution of interpreted codes is slow, because an interpreter must have its own environment (program counter, register, stack, etc.) and must simulate the machine cycle (fetch, decode, call).

However, interpreters are very important because they make it easy to incorporate debugging facilities and to test parts of a program, and they reduce the time from editing to executing a program. Therefore, the following system can be thought of as a highly sophisticated development environment. Complete modules are provided as compiled codes, and incomplete modules are interpreted in the system. But compiled codes and virtual codes have their own environments (program counter, register, stack, etc.). Therefore, there are overheads, because it is necessary to save and restore environments...