Ah, I reread one of your earlier posts. It appears that you are
proposing to pass the arguments in a PerlArray. So flattening is
possible.

Then what I am saying is that

  sub f($a,$b) { ... }

is going to expect $a to be in P5 and $b to by in P6. In your scheme,
$a would be in P5[0] and $b would be in P5[1]. While I personally am
not fundamentally opposed to that idea, I believe it's not going to
fly because

 1. the whole point of using register parameter passing is to avoid
    exactly this.

 2. the existing Perl6 builtin functions could not be given prototypes

 3. other Parrot-hosted languages would not interoperate -- they would
    need to treat all functions using this calling convention as
    single-argument functions that took an array

Or are you saying that this is only used for non-prototyped calls? I
believe this directly violates something Dan said. He expects an
unprototyped call passing two scalars to pass those scalars in P5 and
P6 and have no speed cost as compared to calling the same function
with a prototype. Which makes sense, though one could certainly argue
about the frequencies of various sorts of calls -- it might be enough
to streamline prototyped functions involving no flattening, and not
worry about non-prototyped calls, simple or not.

Reply via email to