Hi,
Just looking at the Class and Object PMCs and a couple of things concern me.
1) Inside the method finding code I see this has been added:
if ( ! PMC_IS_NULL(namespace)
&& VTABLE_exists_keyed_str(interp, namespace, name)) {
PMC *ret = VTABLE_get_pmc_keyed_str(interp, namespace, name);
PCCRETURN(PMC *ret);
}
Which is in contradiction with PDD15:
"Since the method list and vtable override list are stored in the class
PMC, method finding is a lookup on the class object and not a lookup in
the namespace."
2) find_method used to be implemented in the Object PMC. I see now that
there is a find_method PCCMETHOD in the Class PMC that the Object PMC
calls. This is bad, since all PCCMETHODs are eventually supposed to be
moved out to a role so we don't pollute the method "namespace" or a
Class with things that other languages don't want. That means that
Object should not rely on there being a find_method PCCMETHOD in the class.
To me it feels wrong for it to be there anyway. Class methods are
distinct from object methods. The PCCMETHODs described in PDD15 are
methods of an instance of Class. The things that you add_method'd to a
class are methods of objects instantiated from the class.
Thanks,
Jonathan