Dan Sugalski <[EMAIL PROTECTED]> writes:

> 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.

It is missing from PDD03 that P2 must be set to NULL in case of a
normal subroutine call. Otherwise P2 can contain everything and the
called function has no way to decide if the data is valid.
An other possibility would be to let invoke set P2 to null, but I
don't like the idea of having more sideeffects in invoke. This also
makes it impossible to write callmeth as:
  find_method P0, P2, S0
  invoke P0

bye
boe
-- 
Juergen Boemmels                        [EMAIL PROTECTED]
Fachbereich Physik                      Tel: ++49-(0)631-205-2817
Universitaet Kaiserslautern             Fax: ++49-(0)631-205-3906
PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F  23 F6 C7 2F 85 93 DD 47

Reply via email to