Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] C++ Throws
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Brown <caml-list@d...>
Subject: Re: [Caml-list] C++ Throws
On Fri, Aug 27, 2004 at 09:13:52PM -0700, David McClain wrote:

> I do find it amazing that C++ would be dumb enough to try to scaffold raw
> stack frames, instead of using some kind of dynamic link pointers to reach
> each frame C++. How in the world would any kind of cross-language
> interoperability ever function if this were the case. Mind you I'm not
> disputing your estimate here, it's just that I find it a bit incredulous.

It might depend on the compiler and possibly options.  Handling exceptions
by manually unwinding stack frames is popular because it transfers the cost
of exceptions to their occurrences, rather than each handle clause.  This
is a big efficiency gain for code where exceptions do not occur most of the
time.

I didn't catch which compiler you are using, but recent versions of G++
_do_ use unwinding exception handling that would be thrown off by the ocaml
stack frames.

Dave

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners