Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Unifying call and return
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Sugalski  
View profile  
 More options Nov 10 2003, 9:48 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Mon, 10 Nov 2003 09:50:09 -0500 (EST)
Local: Mon, Nov 10 2003 9:50 am
Subject: Unifying call and return
Okay, so it's time to get this taken care of.

Right now, the only true difference between a sub call and a return, at
least at the assembly level, is that we don't pass back a return
continuation when we're returning. You can, if you really want, even
arguably consider a sub PMC as a frozen semi-stateleless continuation.
(Not, mind, that I'd suggest it, as it'll make your brain hurt)

Anyway, call and return parameter lists are almost, but not quite, the
same. While that's not inherently bad, it seems pretty sub-optimal and
means two sets of parameter handling code, one for inbound call parms and
one for return parms. Seems silly, especially since they've got close to
identical semantics (since return params can be prototyped, as we can
return multiple values and may want to know what the assignment list for
the return is)

Anyway, time to unify. The question, then, is what gets kept and what gets
tossed. The return spec says we pass in the number of P, I, S, and N
params we're returning, which is fine, except we don't have enough
registers for that and the stuff we're passing in in I registers now. We
use all 5 when making a call. One overlaps with returns (The number of PMC
params) and that leaves us needing three ints.

We can toss some of the inbound stuff and make them optional properties on
the return continuation, which is where the return signature should live
as well (with the same property name as a sub or method's PMC signature)
which'd leave us needing two ints. I'm not sure if its worth trimming out
things from the registers to make space, or moving the two other counts to
N registers.

Oh, and we need to make sure the PMC count is in the same register for
calls as returns. It isn't now, which is a sloppy oversight and one we'll
fix as part of this.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
d...@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.