This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
FW: Implementation of Exceptions
- From: Halldór Ísak Gylfason <halldori at ru dot is>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 4 Apr 2002 15:35:52 -0000
- Subject: FW: Implementation of Exceptions
-----Original Message-----
From: Robert Dewar [mailto:dewar@gnat.com]
Sent: 4. apríl 2002 15:30
To: gcc@gcc.gnu.org; Halldór Ísak Gylfason
Subject: Re: Implementation of Exceptions
>>Am I missing some important detail here?
No, you are not missing anything. It is of course possible to optimize
throwing of exceptions if you accept extra overhead on function calls.
Now normally we think in terms of taking overhead ONLY on function calls
which have associated exceptoin handlers (e.g. the setjmp/longjmp
approach
used in GNAT on many targets). Your scheme seems to introduce overhead
in every call. I suppose it might help on some peculiar applications,
but
overall it would be a clear loss. Typically exception handlers are
established
FAR FAR more often than exceptions are thrown in reasonably written
programs.
So I think your implementation, while technically sound, would be a loss
for
almost all applications.