[virtmach] parrot VM?
Fri, 12 Jul 2002 16:42:05 -0500 (CDT)
> > and (b) simpler compiler?
> Yes. I imagine register allocation (done right) would be a significant
> complication in the bytecode compiler.
Although the register allocator would give much better results than simple
tree based heuristics used for stack machines. Linear scan register
allocation isn't that hard, and gives quite reasonable results.
> > Is there some other obvious reason to use a stack VM?
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.