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

Andrew Whitworth via RT parrotbug-followup at parrotcode.org
Fri Jan 16 13:46:20 UTC 2009


On Thu Jan 15 10:44:51 2009, coke wrote:
> More generally, change the morph vtable to take a 'Type' instead of an
> it. In fact, given recent discussions about types on other threads,
> this should probably take a PMC, not a String, and take the same types
> as 'new' does.
> 
> Then we remove one more point where the int number was exposed
> outstide of the C api.

Okay, I did some work on this last night, and here's the current status.

1) Modified the behavior of the "morph" PIR override so that it takes a
string in trunk. We previously weren't able to override this method at
all, so nobody is used to the "old way" at the PIR level. This does mean
that for the time-being the PIR implementation of "morph" is different
from the C implementation of it. However, the benefit is that the
PIR-level API doesn't need to change later when the C-level API does.
2) Created a branch "morph_pmc_type" to make the switch from "void
morph(INTVAL type)" to "void morph(STRING *type)". Most of the
conversion is already done. I have some more changes to make and some
general cleanup before I call the work in the branch "done", however.
3) I've added a test for the behavior to t/oo/vtableoverride.t in trunk

If nobody has any complaints about this work, I'll add the old flavor of
morph to DEPRECATED.pod, and then merge the branch in sometime after
0.9.0 or 0.9.1. 




More information about the parrot-dev mailing list