|
Boost : |
Subject: Re: [boost] The noexcept Specifier & Block
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2009-04-17 11:53:45
On Fri, Apr 17, 2009 at 10:27 AM, Alexander Terekhov <terekhov_at_[hidden]> wrote:
> Gabriel Dos Reis wrote:
>>
>> On Fri, Apr 17, 2009 at 6:55 AM, Alexander Terekhov <terekhov_at_[hidden]> wrote:
>> > Gabriel Dos Reis wrote:
>> >>
>> >> On Thu, Apr 16, 2009 at 7:11 PM, Alexander Terekhov <terekhov_at_[hidden]> wrote:
>> >> > Scott McMurray wrote:
>> >> > [...]
>> >> >> I don't see how you're going to get the "at throw point" you're asking for.
>> >> >
>> >> > Two-phase EH.
>> >>
>> >> An implementation strategy used by some compilers. It is not
>> >> something required by C++. It is mysterious why some popular
>> >> compilers insist on using that strategy when they know they are
>> >> dealing with C++ applications.
>> >
>> > Because that strategy allows to not unwind the stack for unexpected
>> > exceptions.
>>
>> So, now we are talking of cost of doing something
>> not required by C++ semantics; rarely used in practice,
>> but with a cost imposed on those who don't want it. A strategy
>> that hurts performance of C++ programs.
>
> Wow. Are you sure?
Yes.
> Let all the folks like
>
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
>
> know about such disastrous nature of two-phase EH.
That document only provides the complement to the psABI for the so-called
'common vendor ABI' with its 'official' website at
http://www.codesourcery.com/public/cxx-abi/abi-eh.html
And quoting for the document:
# A two-phase exception-handling model is not strictly necessary to implement
# C++ language semantics, but it does provide some benefits. For example,
# the first phase allows an exception-handling mechanism to dismiss an
# exception before stack unwinding begins, which allows resumptive exception
# handling (correcting the exceptional condition and resuming execution at
# the point where it was raised). While C++ does not support resumptive
# exception handling, other languages do, and the two-phase model allows
# C++ to coexist with those languages on the stack.
How many industrial strength languages support resumptive exception handling?
-- Gaby
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk