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 Calling conventions. Again
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 12 2003, 11:49 am
Newsgroups: perl.perl6.internals
From: d...@sidhe.org (Dan Sugalski)
Date: Wed, 12 Nov 2003 11:46:02 -0500 (EST)
Local: Wed, Nov 12 2003 11:46 am
Subject: Calling conventions. Again
'Kay, here's the proposed changes:

1) Return conventions die. Chopped entirely out of the list
2) The hash for the sub/method name goes, though we may later regret that.
3) The return type info that was in I3 is gone. It's really "calling
context" and I think we may need a better way for things in the system to
figure out what context they're being called in.
4) The parameter list count that was in I1 is dead. If you care, ask the
damn array
5) We 'fess up and admit there's no difference between call and return
6) Note that non-PMC counts only need to be filled in if we're marked
"prototyped"

The call section is as follows. It's not checked in -- I want some list
abuse^Wdiscussion first, since it's Yet Another Damn Call Overhaul.

=head2 Calling conventions

The following registers are used in calling all subs and methods

=over 4

=item P0

Holds the object representing the subroutine.

=item P1

Holds the return continuation for the caller.

=item P2

Holds the object the sub was called on. (For method calls)

=item P3

The overflow parameters. Everything that wouldn't fit in a register
is in here. This PMC should act as an array, and belongs to the
called sub/function/method. The caller should not assume anything
about the state of the PMC passed in here after the call is made.

=item S0

The fully qualified name of the method or sub being called

=item I0

True if the sub is being called with prototyped parameters.

=item I1

The number of params in integer registers

=item I2

The number of parameters in PMC registers.

=item I3

The number of string parameters

=item I4

The number of numeric parameters

                                        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.