On Wednesday, 16 May 2012 at 13:10:05 UTC, Steven Schveighoffer wrote:
I don't see exception handling in the generated code (at least I don't see the _d_local_unwind2), I wonder a) if this is more efficient than scope(exit), and b) if so, why can't the compiler do this automatically?

I think you might be misreading the assembly – which operating system are you on? You can only expect to see _d_local_unwind on Windows, Dwarf EH is implemented differently.

In the first case, where the code can't throw, the exception handling code is probably not generated at all.

David

Reply via email to