At 1:46 PM +0100 1/9/03, Leopold Toetsch wrote:
Works for me. If it preserves the semantics we want to express, and it looks like it does, I'm just fine with it.Leopold Toetsch wrote:RFC: changing the clone op functionality slightly:Steve Fink wrote:(3) propose something else that solves the whole problem neatly.i.e. reorder code where possible, and anchor early,
Clone does in the first step pmc_new{,noinit} a PMC of the desired type. This is common to all classes. Then class specific deep copying jumps in.
I would like to change the clone functionality slightly to be:
inline op clone(out PMC, in PMC) {
$1 = pmc_new_noinit(interpreter, $2->vtable->type());
$2->vtable->clone(interpreter, $2, $1);
goto NEXT();
}
So, the newly created PMC would be anchored to the root set immediately. Cloning e.g a KEY, which currently would be b0rken, could then be done w/o disabling DOD.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk