Inbook,

A Language and Tool for Generating Efficient Virtual Machine Interpreters

, and .
page 196--215. Springer, (2004)
DOI: 10.1007/978-3-540-25935-0_12

Abstract

Stack-based virtual machines (VMs) are a popular representation for implementing programming languages, and for distributing programs in a target neutral form. VMs can be implemented with an interpreter to be simple, portable, quick to start and have low memory requirements. These advantages make VM interpreters especially useful for minority-use and domain-specific languages. VM interpreters contain large amounts of repeated or similar code. Furthermore, interpreter optimisations usually involve a large number of similar changes to many parts of the interpreter source code. We present a domain-specific language for describing the instruction set architecture of a VM. Our generator takes the instruction definition and produces C code for processing the instructions in several ways: execution, VM code generation and optimisation, disassembly, tracing and profiling. The generator can apply optimisations to the generated C code for each VM instruction, and across instructions. Using profile-directed feedback and experimentation the programmer can rapidly optimise the interpreter for new architectures, environments and applications.

Tags

Users

  • @gron

Comments and Reviews