Am Montag, 6. November 2006 21:54 schrieb Patrick R. Michaud:
> Alas, this seems to work only for immediate subclasses of a PMC.
> If we have a sub-subclass, then we're apparently back to the
> same problem as before:

I somehow thought that any object subclass would have a proper object vtable, 
but as that is also inherited from the (already broken) parent vtable, this 
of course doesn't work.

I've now removed [1] the default and the workaround for this one vtable call 
as a test case and the impact seems to be very low: one String failure and 
one explicit test for this case. It seems that these default vtable 
redirections aren't very heavily used, and I'm inclined to go that direction, 
i.e. remove the defualts. But that needs more testing by removing all such 
keyed redirections and implementing a few keyed_int vtables in core PMCs.

leo

[1]
(pmc2c is ignoring unknown vtable names, thus the xxx_ ;)

Index: src/pmc/parrotobject.pmc
===================================================================
--- src/pmc/parrotobject.pmc    (Revision 15139)
+++ src/pmc/parrotobject.pmc    (Arbeitskopie)
@@ -368,7 +368,7 @@
         }
     }

-    void set_integer_keyed_int (INTVAL key, INTVAL value) {
+    void xxx_set_integer_keyed_int (INTVAL key, INTVAL value) {
         STRING *meth = CONST_STRING(interpreter, "__set_integer_keyed_int");
         STRING *meth_v = CONST_STRING(interpreter, "set_integer_keyed_int");
         PMC *sub = find_vtable_meth(interpreter, pmc, meth_v);
Index: src/pmc/default.pmc
===================================================================
--- src/pmc/default.pmc (Revision 15139)
+++ src/pmc/default.pmc (Arbeitskopie)
@@ -680,7 +680,7 @@

 */

-    void set_integer_keyed_int (INTVAL key, INTVAL value) {
+    void xxx_set_integer_keyed_int (INTVAL key, INTVAL value) {
         PMC* r_key = INT2KEY(INTERP, key);
         DYNSELF.set_integer_keyed(r_key, value);
     }

Reply via email to