On Sun, Jun 12, 2005 at 03:15:22PM +0100, Piers Cawley wrote:
> But if you fallow the calling conventions that looks like:
> 
>    sub foo {
>      $a = 1.
>      $c = 10;
>      print $c
>      
> save_dollar_a_and_only_dollar_a_because_im_going_to_use_it_after_this_function_call
>      foo()
>     _implicit_label_for_return_continuation:
>      restore_dollar_a
>     _ooh_i_dont_have_to_save_anything
>      $b = bar()
>     _nor_do_i_have_to_restore_anything
>     print $b
>    }

You have greatly misunderstood.  We're talking about how &foo manages
its callee-saves registers.  The registers involved, the ones that I'm
calling $a and $b, are P16-P31.

> Of course, if you're going to actually use GOTO to get to some label
> that you should only get to via a continuation ...

For purposes of allocating the callee-saves registers, a continuation
may as well _be_ a goto.

Don't feel bad, though.  I thought the same thing the first time *I*
heard about this problem.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to