[LLVMdev] trouble understanding value in dwarf exception mechanism

edA-qa mort-ora-y eda-qa at disemia.com
Sat May 4 01:32:27 PDT 2013

On 04/05/13 09:37, Duncan Sands wrote:
> Wouldn't that mean that for every stack frame, you would have to restore
> all registers, jump to your code for the stack frame (which would then do
> the type testing, i.e. in essence be an inlined version of the personality
> function), then maybe continue unwinding.  That seems expensive, and like
> a good way to get very fat landing pad code.  Anyway you can always have
> your personality function be very simple: it can not bother with any type
> comparisons, just always say "yes, there is a match", causing control to
> always branch to your landing pad, giving the effect that you want.

I guess I'm looking at my language, and even considering C++, where once
you start using closures, destructors, and defer statements, the frames
which have handling code greatly exceeds those which have no handling
code. Frames which don't need cleanup are often small enough to be
inlined. So the likelihood that an exception can skip over a frame is
very unlikely. Whereas the exception model seems to be optimized with
the assumption that a lot of stack frames can be skipped entirely.

edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130504/5a6f7a2c/attachment.sig>

More information about the llvm-dev mailing list