Dan Sugalski writes:
> At 10:42 PM +0100 12/17/03, Leopold Toetsch wrote:
> >While playing with calling threaded subs, I came along a thing which 
> >I think might be suboptimal:
> >pdd03 states that the method PMC should go into P2. This doesn't 
> >really play with Perl5 <-> Perl6 interoperbility IMHO. Perl5 methods 
> >are plain subs, where the first param is the object.
> 
> PDD 03 states that the *object* goes in P2. This works out just fine 
> with perl 5 style method calls, where the argument list doesn't 
> distinguish the object other than by position. What happens is that 
> when a perl 5 sub is called, @_ is a combination of P2 if it's 
> non-NULL, and the remaining PMC registers. It's slightly more work 
> for the perl 5 code generator to handle the check, but other than 
> that it shouldn't be a problem.

Or perhaps the invocant can go in both P2 and $_[0] (depending on where
that happens to be).

Luke

Reply via email to