On Tue, Jul 30, 2013 at 4:59 PM, David Jeske <[email protected]> wrote:
> On Tue, Jul 30, 2013 at 4:43 PM, Jonathan S. Shapiro <[email protected]>wrote: > >> Or stick them in a region whose liveness doesn't shrink, e.g. because >> every pointer overwrite in that region is a borrowed pointer overwrite. >> This is *exactly* the scenario that has me thinking about >> region-annotated borrowed pointers. >> > > So I'm thinking during gc-tracing you effectively credit all references > tagged to the region to the region-box, which allows you to get the C-like > performance benefits of direct interior pointers as long as you are willing > to keep the entire region alive until the GC knows all references with that > tag are gone. With 64 bit pointers and bounded max-regions you can just > steal some address bits for the region tag. Did I get that right? > Nope. I was thinking about something that is completely doable from static type information. No tags required. > What I don't understand is how this is better than a regular GC heap, > since you still have to trace all the references to determine region > liveliness. I suppose it has the advantage that it more naturally supports > stored borrowed pointers to elements inside value-type arrays. > Think about it again: all overwrites occur on borrowed pointers. If a reference resides in a borrowed pointer, then *by definition* the liverness of its target object is guaranteed by some non-borrowed pointer somewhere else. Since this is true, *there is no point collecting a region until a non-borrowed pointer has been overwritten*, because there are no dropped objects to be collected. The real condition required is a bit stronger than that, but I think it's doable and potentially useful. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
