diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-08 12:43:28 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-08 12:43:28 +0000 |
commit | 173f0beca7913e54d2a09ecbb7354c60d4b7365a (patch) | |
tree | 8c6db0a08fe59e66faaa88318e5d8e194578463d /gcc/eh-common.h | |
parent | 41124432afe1975743312e7c10f8dd712117cdcb (diff) | |
download | gcc-173f0beca7913e54d2a09ecbb7354c60d4b7365a.tar.gz |
Thu Jun 8 14:16:15 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
* eh-common.h: Remove NEW_EH_MODEL compile time flag, and replace with
flag_new_exceptions runtime flag.
(struct old_exception_table): New struct which represents what
the exception table looks like without the new model.
(NEW_EH_RUNTIME): New value used as a tag in the exception table to
flag that this is a new style table.
* except.h: Remove compile time flag NEW_EH_MODEL.
(expand_builtin_eh_stub_old): New prototype.
* tree.h (enum built_in_function): Add BUILT_IN_EH_STUB_OLD.
* expr.c (expand_builtin): New builtin func BUILT_IN_EH_STUB_OLD.
* c-decl.c (init_decl_processing): Add new builtin function
__builtin_eh_stub_old.
* final.c (final_scan_insn): Replace compile time flag NEW_EH_MODEL.
* flags.h (flag_new_exceptions): New runtime flag.
* toplev.c (flag_new_exceptions): Initialize default to 0,
-fnew-exceptions sets to 1.
* except.c (output_exception_table_entry): Output New style exception
identifier into table, and replace compile time flag NEW_EH_MODEL
with runtime flag flag_new_exceptions.
(output_exception_table): Replace compile time flag NEW_EH_MODEL.
(expand_builtin_eh_stub_old): Duplicates original functionality of
expand_builtin_eh_stub.
(expand_builtin_eh_stub): Replace compile time flag NEW_EH_MODEL.
* libgcc2.c (find_exception_handler): Remove NEW_EH_MODEL #ifdefs.
(old_find_exception_handler): New func, same as find_exception_handler
except it works on the old style exception table.
(__throw): Replace NEW_EH_MODEL. Detect new model based on presence
of identifier in the exception table, and call appropriate routines.
1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
* except.c (init_exception_processing): Remove NEW_EH_MODEL compile
time flag. Call __cp_eh_info instead of __cp_exception_info.
* exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
(__cp_exception_info): Return offset into cp_eh_info structure to
match what use to be the start of this structure.
(__cp_eh_info): New function to return a pointer to cp_eh_info struct.
(__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
compile time flag.
(__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
__cp_eh_info instead of __cp_exception_info.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20336 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/eh-common.h')
-rw-r--r-- | gcc/eh-common.h | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/gcc/eh-common.h b/gcc/eh-common.h index 708946b412a..51ecf31470e 100644 --- a/gcc/eh-common.h +++ b/gcc/eh-common.h @@ -5,7 +5,7 @@ independant exception handling model. Both the static compiler and the runtime library share this file. */ -/* The compiler flag NEW_EH_MODEL is used to determine whether the +/* The runtime flag flag_new_exceptions is used to determine whether the compiler supports the new runtime typechecking mechanism or not. Under the new model, runtime info is contained in the exception table, and the __throw() library routine determines which handler to call based @@ -18,17 +18,6 @@ #include "gansidecl.h" -#ifndef NEW_EH_MODEL - -struct eh_context -{ - void **dynamic_handler_chain; - /* This is language dependent part of the eh context. */ - void *info; -}; - -#else - /* The handler_label field MUST be the first field in this structure. The __throw() library routine expects uses __eh_stub() from except.c, which simply dereferences the context pointer to get the handler */ @@ -41,23 +30,14 @@ struct eh_context void *info; }; -#endif - - #ifndef EH_TABLE_LOOKUP -#ifndef NEW_EH_MODEL - -typedef struct exception_table +typedef struct old_exception_table { void *start_region; void *end_region; void *exception_handler; -} exception_table; - -typedef exception_table exception_descriptor; - -#else +} old_exception_table; typedef struct exception_table { @@ -76,11 +56,18 @@ typedef struct exception_lang_info short version; } exception_lang_info; +/* This value in the first field of the exception descriptor + identifies the descriptor as the new model format. This value would never + be present in this location under the old model */ + +#define NEW_EH_RUNTIME ((void *) -2) + /* Each function has an exception_descriptor which contains the language info, and a table of exception ranges and handlers */ typedef struct exception_descriptor { + void *runtime_id_field; exception_lang_info lang; exception_table table[1]; } exception_descriptor; @@ -126,8 +113,6 @@ enum exception_source_language EH_LANG_Mips_Assembler = 0x8001 }; -#endif - #endif /* EH_TABLE_LOOKUP */ |