At 4:01 PM -0500 3/15/02, Clinton A. Pierce wrote:
>I'm in the midst of writing some routines to debug pasm code, and
>one of the things I dearly want is a "stack dump" routine. I can
>*almost* code this in pasm, except I'm missing one last component: a
>way to tell the depth of the stack without causing the runtime to
>bail.
>
>Any of the following would help:
>
>1. a rotate_up() that doesn't take an argument, instead the WHOLE
>stack rotates. I could push a sentinel on the stack before rotating
>and stop when I get back to it.
>
>2. an opcode that will tell me the stack depth, (like a mod to
>entrytype to let me know I've underflowed or something.)
>
>3. A mod to rotate_up or entrytype that lets me start indexing from
>the *bottom* of the stack. Again, I could use a sentinel to know
>when to quit.
>
>4. some way of harmlessly catching the internal error "Stack Depth Wrong"
>
>[I'm not subscribed to p6i, cc me if you can otherwise I'll catch it
>in archives. Thanks.]
#4 needs to go in when we put in exceptions. Other than that... which
do you want? They're all reasonable, and while I don't want to do all
of them, any one of #s 1-3 are fine.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk