On Tue, 3 Feb 2004, Pete Lomax wrote:

> .sub _main
>       goto L1
> test:
>       $I1 = 1
>       ret
> L1:
>       $I2 = 2
>       call test
>       print $I2               # prints 1, not 2
>       end
> .end
...
> Again, sorry to be a pain, but I'd like the truth/an update, please!
> Or some hints... file level variables... better ways to code this...
>
> Pete
> PS use parrot -o and examine the output .pasm:, $I1 and $I2 (or
> .local int i, .local int j) get assigned the same register.


Huh. That is pretty funky. The problem is that
imcc doesn't realize the two variables ought to
be distinct, right?

A workaround is to call pushtopi and poptopi
around the "call" statement...

What's the benefit of doing it this way, rather
than using separate subs?

Sincerely,

Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------

Reply via email to