Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Freeze, objects, crash, boom.

6 views
Skip to first unread message

William Coleda

unread,
May 26, 2004, 1:44:11 PM5/26/04
to Perl 6 Internals

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.

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?


Leopold Toetsch

unread,
May 28, 2004, 4:10:06 AM5/28/04
to William Coleda, perl6-i...@perl.org
William Coleda <wi...@coleda.com> wrote:

> 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

0 new messages