On Sun Nov 30 21:05:13 2008, [email protected] wrote:
> I'm trying to make mock objects in Rakudo, but the 'isa' opcode in  
> PIR seems to ignore my overridden isa() method.  

...and that's likely to be the case for some time to come.

In general, Parrot's vtable functions don't map well onto 
method calls, as would be the case if someone overrides 'isa',
'Str', 'true', etc.  In the specific case of VTABLE_isa, overriding
it to respond instead to the Perl 6 '.isa' function means that many
of Rakudo's internals are left without a way to do a true "isa" test
(which it currently has to do in order to find out the true underlying
representation of some classes).

For now, the bottom line is that we're probably not going to worry too
much about making all method overrides in Perl 6 appear correctly to PIR
opcodes;  especially in those cases where we need the PIR opcode's
functionality to mean something else for internals.

So, closing ticket for now -- we can revisit the issue later (as part of
handling vtable functions in general).

Pm

Reply via email to