Dan Sugalski <[EMAIL PROTECTED]> wrote:

> Ah, I was thinking it was a single-level clone of data--basically a
> shallow copy. I'll go fix.

I still don't know, how deep vtable->clone should really go. Currently
its of course still borken: it clones recursive-deeply and fails on
self-referentials structures. But that is handled by Parrot_clone() which
uses freeze/thaw.

Back to the original problem: Is there any reason not to just have

  PMC* clone() {
    return SELF;
  }

in parrotclass.pmc? A class is a class, nothing to duplicate IMHO.

Anyway, we need a way to specify somehow, how to clone or have two
vtables or opcodes to deal with that. Duplicating thread arguments also
needs (very likely) a deep clone.

leo

Reply via email to