On Friday, 7 February 2014 at 02:19:42 UTC, Andrei Alexandrescu wrote:
A better possibility is to allocate exceptions from a different heap and proclaim that the heap is cleaned once all catch blocks are left.

I wrote a quick proof of concept of this that can be tested right now:
http://arsdnet.net/dcode/except.d

It hooks _d_newclass to allocate Throwables on a little static bump-the-pointer array. Each catch block has a scope(success) in it that zeroes the throwables area back out to zero.

Reply via email to