[virtmach] parrot VM?

Chris Lattner virtmach@iecc.com
Sat, 13 Jul 2002 12:28:34 -0500 (CDT)

> > One very significant drawback of stack-based VMs is that they are
> > almost impossible to do meaningful optimizations on.  If your VM
> > performs any substation optimization, you will often find that
> > you have to translate from a stack-based rep to a register based
> > representation anyway, losing any advantages the stack based VM
> > gives you.
> Please explain this further.

Please see my previous email...

> I ask because I have implemented optimising code generators for 
> stack based token systems for six different CPU architectures, 
> and my conclusion is that classical compiler technology works 
> very well with stack-based VMs.

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?