DragonFly BSD
DragonFly kernel List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: C++ exception implementation (tangent)

From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Fri, 4 Feb 2005 14:08:46 +0100
Mail-followup-to: kernel@crater.dragonflybsd.org

On Thu, Feb 03, 2005 at 09:32:29PM -0500, David Cuthbert wrote:
> Greg 'groggy' Lehey wrote:
> >You'll notice that [C++ exceptions are] implemented with 
> >setjmp()/longjmp().
> Is this the current state of g++?

The current GCC C++ frontend supports multiple mechanisms for
exception handling, setjmp/longjmp is one of them.

> I thought -- perhaps incorrectly -- that EDG-based compilers used lookup 
> tables based on the PC.  This imposes no performance hit in the cases 
> where the exception isn't invoked -- it's popular for this reason.  I 
> thought that g++ was heading in this direction, but I haven't been 
> following the changes terribly closely.

I'm pretty sure this is exactly the case. IIRC there's still a minor
performance penalty for exception setup, but it's very small compared
to the older approach.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]