Leopold Toetsch wrote:

Luke Palmer <[EMAIL PROTECTED]> wrote:

Leopold Toetsch writes:

Why do we have the special notion of current_object in the first place?
Why not just pass all in as P5, P6, ...?

I agree that this is the way to go.  Especially if we have some marker
somewhere that tells us that we were called as a method.

Does the Perl6 compiler know function signatures at compile time? S06 states: "Passing two many or too few invocants is a fatal error." For a runtime check we'd need additionally the MMD object count.

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

As to compile time/runtime checks.... Python will need complete function signature (not just the number, but the actual names of each of the paramters) at runtime. At the moment, I'm storing this as a property.

- Sam Ruby

Reply via email to