> > Yeah, this'll happen, and it's an unintended side-effect of the > changes in Parrot -- the User stack is essentially sub-local. That's > good for a lot of things, but really, really messes up stack > languages like Forth. > > > The only real option here is to maintain your own stack and leave its > PMC in one of the registers.
This what parakeet does and I prefer it. The user stack should stay sub local in my opinion, so that it can be easier to preallocate. This is what most JVMs do. Besides, with so many P registers around, the top N elements of the "stack" for Forth like languages should really be register-cached as much as possible. Parakeet is moving toward this, currently the top 2 items are mostly cached. I have yet to come up with a good general code generation algorithm to do full caching but I immagine it will be some incredibly evil PIR macro. -Michel