Steve Fink <[EMAIL PROTECTED]> wrote: > I'm not sure how to use the current pdd03's calling conventions to > implement what I want right now. Let's consider Perl6:
First, that whole stuff definitely needs more clarification. Calling and return conventions are not symmetrical, C<I1> (number of items in C<P3>) is redundant... And we probably need pdd03-examples.pod. > sub f ($a, $b) { ... } > f(1, 2); > &f(1, 2); > I0 = 1 # have prototype > I5 = 1 > I6 = 2 As the sub doesn't specify taking C<int>, arguments would go into P5 and P6. > It would be tempting to change all pushtop,pushbottom,poptop,popbottom > ops into ones that had the start register and number of registers as > arguments. No. These ops are used to save registers for the caller and not for argument passing. > sub f($a, $b, $c, $d) { ... } > f(1, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], @array); I would at least expect a compiler warning: "Suboptimal argument passing detected in function call ...". leo