pmc2c.pl says:

=item C<SUPER(a,b,c)>

Calls the overridden implementation of the current method in the nearest
superclass, using the static type of C<SELF>.

=item C<DYNSUPER(a,b,c)>

As above, but uses the actual dynamic type of C<SELF>.


but for a dynamic class, if I try to use it I get errors such as:

perl5null.pmc: In function `Parrot_Perl5NULL_set_pointer_keyed_int':
perl5null.pmc:24: `enum_class_Perl5cargo_cult' undeclared (first use in this 
function)
perl5null.pmc:24: (Each undeclared identifier is reported only once
perl5null.pmc:24: for each function it appears in.)
make: *** [perl5null.o] Error 1

1: Perl5cargo_cult is the correct (static) superclass of Perl5NULL, so
   I think that the description of DYNSUPER is inaccurate - it's actually
   calling through the vtable of the defining class' parent (rather than
   SUPER that goes direct), rather than what it might imply, which is going
   to the superclass of the class of the invocant PMC.

2: Either way, it's bust for dynamic classes, as you can't know the type
   number of the parent class at compile time.

I'm not sure what to do about either.

Nicholas Clark

Reply via email to