On Sat, Apr 12, 2008 at 08:24:57PM -0700, Bob Rogers wrote: > This is a prerequisite to removing the "user_stack" operations. > These ops can be found easily by adding: > > real_exception(interp, NULL, 1, "Stack op 'xyz' used.\n"); > > to the code in src/ops/stack.ops, running "make test", and seeing where > this error crops up. The likeliest strategies for changing the code > are, where applicable: > > 1. Rewrite bsr/ret calling to use Parrot Calling Conventions, > i.e. by carving the relevant code out into a .sub of its own; > > 2. Keep bsr/ret calling, but arrange for each such internal > subroutine to use its own independent set of registers; and > > 3. Create a resizable array to use as an explicit stack via push and > pop operations.
For others who may be reading this ticket/thread, I just want to reconfirm and/or verify that we're *not* intending to eliminate the bsr/ret opcodes themselves from Parrot. The above simply suggests ways to eliminate use of the push/pop/saveregister opcodes, which are commonly used when a subroutine makes use of bsr/ret. I write this because PGE relies heavily on bsr/ret, and the above might be interpreted as trying to get rid of them. (PGE uses strategies #2 and #3 above in lieu of the user_stack opcodes.) Thanks, Pm