On Nov 19, 2003, at 9:04 AM, Dan Sugalski wrote:

Just a quick heads-up--I checked in the preliminary patch for freeze/thaw
that Leo sent me for review. It'll change internally a fair amount, and
the vtable/low-level API is going to change, but the op-level interface
will be stable. I wanted it in before things driged any further, though,
so feel free to play but expect it to change rather a lot.

Two initial concerns:


1) I have a patch which I've been assembling to do ordered destruction. That needs to use the next_for_GC pointer (and I think any alternate implementation would need to as well). But Parrot_freeze_at_destruct() uses next_for_GC. I assume Parrot_freeze_at_destruct is intended to be called from a destroy() method; if so, there's a problem, and we'd need 2 next_for_GC-ish pointers. We certainly can't have a method intended to be called only at destruction-time which is incompatible with proper ordered destruction....

2) For the same patch, I'm using something very similar to the vtable->visit method used in the new freeze/thaw code (and actually my method was called vtable->visit as well, which may be where Leo got the name, since I had mentioned this before...). But the ordered-GC code needs to know about "children" in the sense of any referenced PObj (ie, children defined by what needs to be marked in a GC run), whereas the freeze code needs to know about only "logical children" (ie, only those which are intended to be frozen when the "parent" is frozen). So I would modify my ordered GC code to use Leo's vtable->visit, but it has a different notion of what children to visit, so I think we are either going to end up with two very-similar-but-different vtable methods, or we'll need extend vtable->visit to allow it to serve both purposes (either by calling visit with a flag which tells it which type of visitation to do, or by instead having a flag which is passed to the visit_child_function to tell it whether this is a "logical" child or merely a referenced object). Off the top of my head I think that "freeze-children" will always be a subset of "mark-children", so passing a flag to vtable->visit is probably cleaner.

JEff

Reply via email to