I dug around a bit and couldn't find a reason for why it shouldn't work.
Note that I can't even call name() on a Class PMC either. Hm.
-- c
You were probably looking for the C<get_mro> opcode. Your get_parents() is
only returning the immediate parent(s) of that _class_ but not the full
chain, which is in C<vtable->mro>.
See also: perldoc src/ops/pmc.ops
> I dug around a bit and couldn't find a reason for why it shouldn't work.
You are calling it on a ParrotObject, which ought to delegate the call to it's
class. But as said, you'd get only 'Child' in your case.
> Note that I can't even call name() on a Class PMC either. Hm.
As a method? You can't call any vtable function with method syntax.
See also:
http://perlcabal.org/~lt/toreview/Cfunc.pod
But there is:
inline op typeof (out STR, invar PMC) {
$1 = VTABLE_name(interpreter, $2);
goto NEXT();
}
i.e. the C<typeof> opcode is the interface to the class name.
> -- c
leo