[perl #41825] [BUG] morph vtable override not working in PIR

Andrew Whitworth via RT parrotbug-followup at parrotcode.org
Thu Jan 8 14:09:51 UTC 2009


On Wed Mar 14 07:49:33 2007, richard at hive-systems.com wrote:
> Hi,
> 
> Given the following:
> 
> .namespace ['A']
> 
> .sub 'morph' :method :vtable
>     say 'morphing!'
> .end
> 
> .sub main :main
>     $P0 = newclass 'A'
>     $P1 = new 'A'
>     morph $P1, .Undef
> .end
> 
> the 'morph' vtable method doesn't get called
> 
> Cheers,
> Rich
> 

The implementation of VTABLE_morph for the Object PMC doesn't call
Parrot_oo_find_vtable_override(), it calls SUPER() directly. I can put
together a patch for this to do what this ticket seems to want, but is
that the behavior that this should implement?

Question for the list: Do we want to be able to override the morph
vtable for Objects? Does it even make any sense to do it?

-- 
Andrew Whitworth
a.k.a Whiteknight




More information about the parrot-dev mailing list