On Wed, Oct 30, 2013 at 03:41:53PM -0700, Mike Stump wrote:
> The dtors only run, after the ctors run.  We mark where the ctors finish 
> spot, as the _start_ of the region for which we have to clean up.  Really, 
> the cleanup has nothing to do with ctors.  You can have dtors, without any 
> ctors, or ctors, without any dtors.
> 
> {
>   decl d;
>   s;
> }
> 
> transforms into:
> 
> <-----  start of lifetime of the storage for d
> ctor(d)
> <-----  start of lifetime of the fully constructed object d
> s;
> <-----  end of lifetime of fully constructed object d
> dtor(d)
> <-----  end of the storage of d
> 
> CLEANUP_STMT documents when the region protected by the cleanup starts.  One 
> want to describe that region is, the end of the ctors, if any, else after the 
> storage is allocated.  In the above, that is the second <---- spot.
> 
> Now, in the trees, the above is decl d; ctors; CLEANUP_STMT (s, dtors, d).
> 
> s is the region for which the cleanups are active for.  dtors is the cleanup 
> to perform on transfer out of that region, and d is the decl related to the 
> actions in dtors.

I see now.  Thanks very much, Mike.

        Marek

Reply via email to