Hi there,

I just discovered that:
 a) my befunge interpreter is broken (would you stop beaking it please? :o))
 b) push and pop operations are now supported by lists
 c) there's a pmc for handling list of integers: intlist 

I'll get back to point a) later when I'll have investigated it.
Point c) is interesting because intlists are supposed to be faster. And since 
Befunge is sometimes used for critical tasks (such as kernel scheduling), I 
thought I had to take advantage of intlists. :-)

Point b) is interesting too, since I wrote my own PUSH and POP routines in 
Parrot assmbly. Now, I can get rid of them... 

That's what I wanted to do. I switched from PerlArray to IntList, and 
converted my PUSH and POP routines into push and pop calls...

But I have a problem. When popping a value from an empty list, I get a "No 
entries on list!" exception. Instead, I want to get a zero. I can add 
something like:

CHECK_EMPTY:
  set I0, P2
  eq I0, 0, PUSH_ZERO
  ret
PUSH_ZERO:
  push P2, 0 
  ret

And then, before popping, I can add "bsr CHECK_EMPTY"...
But that's clumsy IMHO.

So, what else can I do? Catching exceptions (is that possible with Parrot)? 

Jerome
-- 
[EMAIL PROTECTED]

Reply via email to