Leopold Toetsch wrote:

Sam Ruby wrote:

A few observations, first from an Parrot Internal perspective... in general, the code for the opcodes tend to do things like the following:

$1->vtable->get_string(interpreter, $1)

Note that the object tends to be repeated as the first argument. It often the case that the first argument matches the object on which the dispatch is based, but it is not necessarily so. In particular, these two values will be different whenever the implementation of a method wants to invoke the equivalent of SUPER(args).

Not quite. That'll be

  class_self."__super"(args)

so again the invocant is the first argument after interpreter.

Believe it or not, I think we are agreeing.

To invoke a method on an object using Parrot Calling Conventions, P2 needs to be the object used for dispatch purposes, and P5 needs to be the actual object. In many cases, they will be the same, but in some cases they will differ.

This isn't obvious from PDD03, but a simple clarification would take care of that.

- Sam Ruby

Reply via email to