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 towards a new call scheme
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 Sep 23 2004, 1:16 pm
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Thu, 23 Sep 2004 13:16:56 -0400
Local: Thurs, Sep 23 2004 1:16 pm
Subject: Re: towards a new call scheme
At 4:15 PM +0200 9/23/04, Leopold Toetsch wrote:

>I've started tweaking internals to get a faster calling scheme in
>place. Part 1 (in CVS) moved the subroutine's address into the
>parrot_sub_t structure. Accessing such Sub-internals via get_pointer
>& set_pointer is working still safely.

>Anyway, next will be to hide the return continuation in the
>interpreter context. So we need to have some opcodes to access the
>return continuation, e.g.:

>   get_cc(OUT Px)  # 1) get current continuation, i.e. the return cont.

In a rare, possibly unique burts of opcode parsimoniousness...
perhaps this would be a good thing for the interpinfo op. It returns
current interpreter info, and the current return continuation would
be a good one to do, as would the current object and current
sub/method PMC. (As well as the current namespace root, current
lexical pad root...)

>   return_cc()     # 2) return via current continuation

>1) is only needed for special porposes, like passing the
>continuation on to a different place. The normal way to return from
>a sub will be 2)

>If that's in, access to C<P1> as a return continuation will be deprecated.

Well... should we? We're still passing the return continuation *in*
in P1, unless you want to move it out and unconditionally make it a
parameter to invoke. Which is OK, but we should be up front.

>The PIR sequence:

>   .pcc_begin_return
>       .return foo
>   .pcc_end_return

>will do the right thing accordingly.

I think I'd also like to make a change to sub invocation, too, to
allow passing in alternate return continuations, which makes tail
calls easy. At this point I'm not inclined to have any special tail
call support built into parrot because it's just not needed, but IMCC
support is still handy.

A .returncont arg to the long-form sub call would work fine. If we
want to have a variant short-form to support it that'd be fine.
--
                                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.