[virtmach] parrot VM?

Stephen Pelc Stephen Pelc <sfp@mpeltd.demon.co.uk>
Sun, 14 Jul 2002 12:45:07 +0100


> Can you give some examples of the types of transformations that
> you are using?  Are you converting the stack machine into some
> cannonical form before you optimize, or some other internal
> representation?
The code generators are one-pass (for speed/simplicity) and
the major data unit is what we call the "working stack".
This is a representation of the stack, from which code is 
generated and registers allocated as needed. Most of the 
classical optimisations are available. From the working stack 
you code generate, and the end of basic blocks you can then 
transform ("shuffle") the working stack to whatever canonical 
form you have chosen for the stack.

So far the shuffle is the only code generation element I have 
found that is unique to stack machines. There are a couple of 
simplistic papers about the VFX code generator on our web site, 
but this *is* a commercial product ... Funny thing is, we didn't 
release the source code for VFX until after we had serious 
competition in performance, and we had about three years as 
clear performance leaders (3:1 and more) in the marketplace. Ho, 
hum - now back to improving it some more.

Stephen

--
Stephen Pelc, sfp@mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads