diff options
author | Andrew MacLeod <amacleod@cygnus.com> | 1998-12-08 14:04:03 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 1998-12-08 14:04:03 +0000 |
commit | e6cfb550ab17484da95c0a3e94773fa42dccd27c (patch) | |
tree | 7f21607b0446aa635cee54fb52e2f750bc2be0d5 /gcc/cp/exception.cc | |
parent | 2bfdc2d4e73144131b2e2de7ccfc1183f63175ac (diff) | |
download | gcc-e6cfb550ab17484da95c0a3e94773fa42dccd27c.zip gcc-e6cfb550ab17484da95c0a3e94773fa42dccd27c.tar.gz gcc-e6cfb550ab17484da95c0a3e94773fa42dccd27c.tar.bz2 |
See ChangeLog..
Tue Dec 8 15:32:56 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
See ChangeLog.. These are the files that were changed:
* eh-common.h (struct eh_context): Add table_index for rethrows.
* rtl.h (enum reg_note): Add REG_EH_REGION and REG_EH_RETHROW reg notes.
* rtl.c (reg_note_name): Add strings for new reg_note enums.
* expr.h (rethrow_libfunc): New library decl.
* optabs.c (rethrow_libfunc): Initialize.
* except.h (struct eh_entry): Add new field 'rethrow_label'.
* except.c (create_rethrow_ref): New function to create a single
* flow.c (make_edges): Add different edges for rethrow calls,
* integrate.c (save_for_inline_eh_labelmap): New callback routine to
* libgcc2.c (find_exception_handler): Generalize to enable it to
* cp/except.c
* cp/exception.cc
From-SVN: r24194
Diffstat (limited to 'gcc/cp/exception.cc')
-rw-r--r-- | gcc/cp/exception.cc | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/gcc/cp/exception.cc b/gcc/cp/exception.cc index d0533aa..8e8f35f 100644 --- a/gcc/cp/exception.cc +++ b/gcc/cp/exception.cc @@ -117,13 +117,29 @@ __cp_exception_info (void) return &((*__get_eh_info ())->value); } -/* Compiler hook to return a pointer to the info for the current exception. +#define CP_EH_INFO ((cp_eh_info *) *__get_eh_info ()) + +/* Old Compiler hook to return a pointer to the info for the current exception. Used by get_eh_info (). */ extern "C" cp_eh_info * __cp_eh_info (void) { - return *__get_eh_info (); + cp_eh_info *p = CP_EH_INFO; + return p; +} + +/* Compiler hook to return a pointer to the info for the current exception, + Set the caught bit, and increment the number of handlers that are + looking at this exception. This makes handlers smaller. */ + +extern "C" cp_eh_info * +__start_cp_handler (void) +{ + cp_eh_info *p = CP_EH_INFO; + p->caught = 1; + p->handlers++; + return p; } /* Allocate a buffer for a cp_eh_info and an exception object of size SIZE, @@ -242,7 +258,7 @@ __cp_pop_exception (cp_eh_info *p) extern "C" void __uncatch_exception (void) { - cp_eh_info *p = __cp_eh_info (); + cp_eh_info *p = CP_EH_INFO; if (p == 0) terminate (); p->caught = false; @@ -263,7 +279,7 @@ __uncatch_exception (void) extern "C" void __check_eh_spec (int n, const void **spec) { - cp_eh_info *p = __cp_eh_info (); + cp_eh_info *p = CP_EH_INFO; for (int i = 0; i < n; ++i) { @@ -316,7 +332,7 @@ __throw_bad_typeid (void) bool std::uncaught_exception () { - cp_eh_info *p = __cp_eh_info (); + cp_eh_info *p = CP_EH_INFO; return p && ! p->caught; } |