[virtmach] Virtual Machines and Code Representation

btanksley@hifn.com btanksley@hifn.com
Mon, 24 Jul 2000 09:07:47 -0700

From: Stephen Pelc [mailto:sfp@mpeltd.demon.co.uk]

>> The rationale for using a parse tree rather than byte-codes
>> is that more information is available to a specific compiler 
>> to generate
>> "better" machine code, in whatever way "better" is defined
>> (faster/smaller/safer/more parrallel/etc...).

>If you haven't already seen it, look at the ANDF (Architecture 
>Neutral Distribution Format) system developed by the UK Defence 
>Research Agency, adopted by OSF at one stage, and exploited by 
>Etnoteam as far as I remember.

I've not been impressed with what I've seen of ANDF.  It doesn't seem to me
to exploit the structure of abstract tree code very well.

>The problem with the use of higher level descriptions has always 
>been that it places higher CPU requirements on the back end, 
>which usually rules out use on small embedded CPUs.

There are some times when this doesn't hurt as much.  For example, you can
sometimes trust a larger CPU to cross-compile the code for you.  You could
also interpret the tree directly, rather than compiling it (which saves some

By and large, though, you're right.  Still, I'd rather use a tree format for
the primary mechanism (look how efficient Juice/SlimBinaries is, and it's
only a hack), and use bytecodes for restricted situations.

>Stephen Pelc, sfp@mpeltd.demon.co.uk