This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]