[M3devel] how to use gcc exception/unwind support?
Tony Hosking
hosking at cs.purdue.edu
Thu Jan 6 19:51:18 CET 2011
I'd like something that allows us to use the existing RTExStack exception tables and does not depend on the compiler back-end to emit exception tables, except for assurances that code will not move around labels that define exception scopes.
The advantage of this is that we can retain portability to different back-ends, so long as the runtime supports the necessary RTStack routines.
On Jan 6, 2011, at 10:57 AM, Jay K wrote:
> I think _Unwind_RaiseException is the way to go.
> It is the Linux runtime, the Darwin runtime, the *BSD runtime.
> There still remains the setjmp option for portability.
> libunwind is sort of an option, carrying it around, but I think probably not preferred.
>
> - Jay
>
> From: hosking at cs.purdue.edu
> Date: Thu, 6 Jan 2011 09:27:03 -0500
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] how to use gcc exception/unwind support?
>
> I am just leery of getting too much more entangled with the gcc runtime.
> It makes our compiler even more non-portable.
>
> On Jan 6, 2011, at 2:21 AM, Jay K wrote:
>
> >> Yes, indeed. We don't need all the overhead of the C++ exception handling mechanism.
>
>
> > It is so much? Well, it maybe is more to understand.
>
>
> There is also a very good chance that raising a Modula-3 exception
> will run C++ destructors for intervening threads, which is desirable,
> if we do this "right".
> Likewise, C++ exceptions running Modula-3 unlock/finally blocks.
> Interop can be good.
>
>
> - Jay
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110106/0d021040/attachment-0002.html>
More information about the M3devel
mailing list