At 5:24 PM +0200 8/26/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:

[ a slightly modified version of this proposal made it into CVS in the
  meantime ]

At 10:54 AM +0200 8/24/04, Leopold Toetsch wrote:

DOD_WRITE_BARRIER(interp, aggregate, old_item, new_item)

For hash keys we might need either two such calls (the 2nd with keys) or
an extended form that both takes keys and PObj*.

How 'bout instead we have:

STORE_POINTER(interp, dest_pmc, address_to_write, value_to_write)

This should combine the barrier and the actual write?

Yeah. Some of the systems will want it to be functionally atomic, and this gives us a single place to hide it all. Should have enough info for the current dull M&S, a tri-color system, or even a refcount scheme, so I think we're covered,.


>>[1] we might consider an explicit opcode C<unused {Px, Sx}> though,
which could be emitted for temporariers. I know that we had C<destroy>
some time ago (at that time I thought it would be unneeded ;) But it
could take pressure from the GC system.

 I'm all for putting destroy back in. It'll still be somewhat limited
 (the thing being destroyed can't go onto the free list until the DOD
 gets to it) but it'll be immediate and potentially gives the DOD
 fewer things to go trace.

It depends on the GC scheme: one implementing the strong tri-color invariant can immediately set that to-be-destroyed object to white, when it's gray. If it contains other white but reachable objects these must be reachable by other paths.

Fair 'nuff. That'd make things quicker in some circumstances.

A snapshot-at-beginning scheme (utilizing the weak tri-color invariant)
can't take advantage of the destroy opcode.

Should the opcode be really called C<destroy>, which would imply some
immediate destruction?

Well, I could see calling it terminate, clear, undef, or whack. (Or bend, fold, spindle, or mutilate, but that joke's a bit obscure) destroying the pmc would call the pmc's destroy method right then and then turn the thing into an Undef PMC, assuming there wasn't an easy way to tell that it was truly unreferenced, with the DOD sweep finding it at some point.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to