On 12/25/2011 10:23 PM, Andrei Alexandrescu wrote:

As a first step, we must make all allocations except stack type-aware,
and leave only the stack to be imprecise.


Couldn't the GC'ing the stack be handled in a similar style to how the Windows x64 ABI functions with respect to exception handling?

The unwinding code lives outside the normal program flow to reduce runtime overhead as much as posisble, at least until an exception is thrown. At which point the exception handlers traverse this data structure to unwind the stack from wherever you are in your function (and its caller and so on).

I would imagine a GC system could do something very similar. There are a few MSDN blogs with a bunch of useful links out to more detailed information:

http://blogs.msdn.com/b/freik/archive/2006/01/04/509372.aspx

http://blogs.msdn.com/b/freik/archive/2005/03/17/398200.aspx

http://msdn.microsoft.com/en-us/library/1eyas8tf.aspx

Reply via email to