On Tue, Jan 7, 2014 at 1:32 AM, Ben Kloosterman <[email protected]> wrote:


> Can we ensure that the interface value type which is wrapping a value type
> ( we dont care for reference) is always located in the same region /stack
> as the object it wrapped  ( if value type ) ?
>

Not in general. But in most cases we can ensure that (a) the interface does
not escape the lexical contour in which it was bound, and (b) the object it
wraps was lexically pre-existing. That's enough to ensure that the
interface becomes non-live before it's target becomes non-live.


> Speaking of int. ref what about an interface to a value type which is part
> of a heap object.
>

That's not a problem at all. The region of a field is the region of it's
container. For lifetime purposes it's exactly as if the interface had
wrapped the containing object.


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

Reply via email to