o parrotclass extends delegate
o delegate's freeze vtable entry is Parrot_delegate_freeze
o Parrot_delegate_freeze should delegate the freeze vtable method to PASM.
However, when parrotclass.pmc is compiled to .c, its vtable method for freeze is NOT Parrot_delegate_freeze, but Parrot_default_freeze.
This makes me think that something in pmc2c2.pl isn't quite right, and digging in there, I see:
# XXX this is a quick hack to get the inheritance
# ParrotClass isa delegate
# ...
Are any of my assumptions here correct? Is this chunk of pmc2c2.pl the right place to look for implementing a fix?
> I've been trying to wrap my head around freezing and objects. My
> current understanding is that:
> o parrotclass extends delegate
> o delegate's freeze vtable entry is Parrot_delegate_freeze
> o Parrot_delegate_freeze should delegate the freeze vtable method to PASM.
I think that ParrotClass::freeze() and friends needs special treatment.
There should be a default implementation, which does the right thing.
But if there is a PASM override, it should call that, or some hooks...
The same holds for ParrotObject.
> However, when parrotclass.pmc is compiled to .c, its vtable method for
> freeze is NOT Parrot_delegate_freeze, but Parrot_default_freeze.
Could be something related to the different function prototypes of
freeze. But just implemeting the function should fix that.
leo