Publication | Closed Access
Vmgen—a generator of efficient virtual machine interpreters
80
Citations
19
References
2002
Year
EngineeringCompiler TechnologyComputer ArchitectureSoftware EngineeringInterpreter (Computing)Software AnalysisHardware SystemsVmgen—a GeneratorInterpreter GeneratorHardware VirtualizationSimple InstructionsParallel ComputingCompilersProgramming LanguagesCompiler SupportComputer EngineeringComputer ScienceOptimizing CompilerOperating SystemsProgram AnalysisFormal MethodsIntermediate RepresentationsVirtual Machine InterpreterSystem SoftwareVirtual Machine
Virtual machine interpreters often contain similar code across instructions, creating redundancy that can be exploited for optimization. The authors introduce an interpreter generator that converts simple virtual‑machine instruction descriptions into C code for execution, code generation, disassembly, tracing, and profiling. The generator builds efficient interpreters by supporting threaded code, caching the top‑of‑stack item in a register, merging simple instructions into superinstructions, and applying other optimizations. Interpreters generated for Forth and Java run faster than existing interpreters for those languages, yet remain 2–10 times slower than native‑code compilers, and the study quantifies the impact of each optimization. © 2002 John Wiley & Sons, Ltd.
Abstract In a virtual machine interpreter, the code for each virtual machine instruction has similarities to code for other instructions. We present an interpreter generator that takes simple virtual machine instruction descriptions as input and generates C code for processing the instructions in several ways: execution, virtual machine code generation, disassembly, tracing, and profiling. The generator is designed to support efficient interpreters: it supports threaded code, aching the top‐of‐stack item in a register, combining simple instructions into superinstructions, and other optimizations. We have used the generator to create interpreters for Forth and Java. Theresulting interpreters are faster than other interpreters for the same languages and they are typically 2–10 times slower than code produced by native‐code compilers. We also present results for the effects of the individual optimizations supported by the generator. Copyright © 2002 John Wiley & Sons, Ltd
| Year | Citations | |
|---|---|---|
Page 1
Page 1