On 15/05/2012 5:31 PM, Jonathan S. Shapiro wrote:
> The usual region subtyping relationship is based on nested lifespans.
> That is: it's a stack-like mechanism (ignoring first-class regions
> here). We don't want to implement the region storage on the stack
> itself, because region sizes can be fairly large and there can be
> intervening allocations. But it's perfectly possible to implement the
> region stack separately from the call stack, and it is also possible to
> keep a region-specific set of roots.

Why have a stack at all then? Regions all the way down, with stack
frames as regions. ML Kit does this, dividing regions into ones with
statically known size, and dynamic size. Static sizes get folded into
the normal stack. Region resetting handles the case you describe above,
although the analysis isn't simple.

Breaking the region nesting has been done many other ways, although the
simplest I've seen involves runtime GC of region handles [1]. It takes
the approach I initially described, but the program is in CPS form, so
no canonical stack at all. You instead have a set of regions which are
traced at safe points. It's like lifting GC up to the level of regions.
A nice compromise I thought, although you still have the overly
conservative object lifetime issues that any region system suffers.

Sandro

[1] http://lambda-the-ultimate.org/node/3634

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to