OK, after talking with Felix and Niko (thanks!) here's a proposal.
* Whenever we borrow an `@mut` to `&mut`, add it to a "borrowed set" for
the duration of the borrow.
* Objects in the borrowed set are grayed before each incremental GC slice.
* Objects in the borrowed set are scanned during each minor collection,
even if they're tenured.
* When removing an object from the borrowed set (because the borrowed is
done), add it to a remembered set. Objects in the remembered set are
scanned during minor collections.
* There are no other write barriers.
I believe (although I haven't thought about it too hard) that this
suffices to make generational and incremental GC work in Rust's
mostly-copying setting.
Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev