[virtmach] Definition a virtual machine ?

Joel Jones jjones@uiuc.edu
Wed, 17 Nov 1999 11:30:42 -0600


At 5:43 PM +0100 11/17/99, Francois-Rene Rideau wrote:
>As for bytecodes, the whole idea of compiling to bytecode that JITs/whatever
>will begin by decompiling back to abstract syntax trees seems stupid to me.
>I think bytecode are a wonderful implementation technique,
>extremely useful to build quick&dirty portable prototypes,
>or to be portably deployed in resource-poor environments
>(such as OpenFirmware http://www.firmworks.com/www/ofw.htm).
>But they look to me as quite laughable as an industry standard for
>deployment of high-level code between reasonably resource-rich machines.

Well, the conversion to a tree-based intermediate form is just one 
popular way for JITs to do machine-specific optimizations.  If one is 
not interested in optimizing, one can produce machine code directly 
from bytecode (this is the slower and dirtier to implement than 
interpretation).  If one has an annotation-guided JIT, like mine or 
Ana Azevedo's, optimization is done in the compilation to bytecode, 
and annotations encoding the optimizations are transmitted along with 
the bytecode.  A simple code-generator can use the bytecodes and the 
annotations to generate optimizer-style code.

Joel Jones
jjones@uiuc.edu