Dan Sugalski <[EMAIL PROTECTED]> writes:
> At 08:19 PM 9/3/2001 -0400, Sam Tregar wrote:
> >Speaking of soubroutines, what is Parrot's calling conventions?  Obviously
> >we're no long in PUSH/POP land...
> 
> Up until now, I didn't know, so consider yourself the first to find out. :)
> 
> * Integer, String, and Number registers 0-x are used to pass
> * parameters when the compiler calls routines.
> 
> 
> * PMC registers 0-x are used to pass parameters *if* the sub has a
> * prototype. If the sub does *not* have a prototype, a list is created
> * and passed in PMC register 0.
> 
> 
> * Subs may have variable number, or unknown number, of PMC parameters.
> * (Basically Parrot variables) They may *not* take a variable or
> * unknown number of integer, string, or number parameters.
> 
> 
> * Subs may not change prototypes
> 
> * Sub prototypes must be known at compile time. (I.e. by the end of
> * the primary compilation phase, and before mainline run time.
> * Basically the equivalent to the end of BEGIN or beginning of CHECK
> * phase)
> 
> 
> * Methods get their parameters passed in as a list in PMC register 0,
> * unless we can unambiguously figure out their prototype at
> * compilation time

Will the subroutine know how it was called? (ie: Through method
dispatch or through straightforward symbol table lookup. I'm really
hoping the answer to this is 'yes'.) Or will methods and subroutines
be distinct now?

-- 
Piers Cawley
www.iterative-software.com

Reply via email to