From 0d3453dfb69f5c4d090cd03a85b6595f3e995743 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 9 Jun 1998 13:28:26 +0000 Subject: [PATCH] Minor tweaks. * except.c (expand_start_catch): Rename to start_catch_handler. (expand_end_catch): Delete function. (expand_end_all_catch): Remove catch status that expand_end_catch use to do. * except.h (expand_start_catch): Rename prototype. (expand_end_catch): Delete prototype. * semantics.c (finish_try_block): Rename expand_start_catch, and delete expand_end_catch. * parse.y (function_try_block): Rename expand_start_catch, and delete expand_end_catch. * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete expand_end_catch. From-SVN: r20379 --- gcc/ChangeLog | 9 +++++++++ gcc/cp/ChangeLog | 9 +++++++++ gcc/cp/except.c | 3 +-- gcc/cp/parse.y | 3 +-- gcc/cp/semantics.c | 3 +-- gcc/except.c | 17 ++++++----------- gcc/except.h | 6 +----- 7 files changed, 28 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e86ecaad0fa..dafb655bdcf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Tue Jun 9 16:23:13 EDT 1998 Andrew MacLeod + + * except.c (expand_start_catch): Rename to start_catch_handler. + (expand_end_catch): Delete function. + (expand_end_all_catch): Remove catch status that expand_end_catch + use to do. + * except.h (expand_start_catch): Rename prototype. + (expand_end_catch): Delete prototype. + Tue Jun 9 12:57:32 1998 Mark Mitchell * invoke.texi: Add documentation for -mips4 and -mabi=*. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 09249c47683..622c9442aad 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +1998-06-09 Andrew MacLeod + + * semantics.c (finish_try_block): Rename expand_start_catch, and delete + expand_end_catch. + * parse.y (function_try_block): Rename expand_start_catch, and delete + expand_end_catch. + * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete + expand_end_catch. + 1998-06-09 Jason Merrill * search.c (lookup_member): New fn. diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 44e250ca263..d5859f80bf9 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -686,7 +686,7 @@ expand_end_eh_spec (raises) int count = 0; expand_start_all_catch (); - expand_start_catch (NULL); + start_catch_handler (NULL); expand_start_catch_block (NULL_TREE, NULL_TREE); /* Build up an array of type_infos. */ @@ -739,7 +739,6 @@ expand_end_eh_spec (raises) expand_expr (tmp, const0_rtx, VOIDmode, EXPAND_NORMAL); expand_end_catch_block (); - expand_end_catch (); expand_end_all_catch (); } diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 5feb62d65f0..44b3f68de88 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -3251,14 +3251,13 @@ function_try_block: ctor_initializer_opt compstmt { expand_start_all_catch (); - expand_start_catch (NULL); + start_catch_handler (NULL); } handler_seq { int nested = (hack_decl_function_context (current_function_decl) != NULL_TREE); expand_end_all_catch (); - expand_end_catch (); finish_function (lineno, (int)$3, nested); } ; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c2d687539d0..60c4c3213c3 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -589,7 +589,7 @@ finish_try_block (try_block) else { expand_start_all_catch (); - expand_start_catch (NULL); + start_catch_handler (NULL); } } @@ -604,7 +604,6 @@ finish_handler_sequence (try_block) RECHAIN_STMTS_FROM_CHAIN (try_block, TRY_HANDLERS (try_block)); else { - expand_end_catch (); expand_end_all_catch (); } } diff --git a/gcc/except.c b/gcc/except.c index b3cb9cdaa2a..708fba9c1f3 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1511,7 +1511,7 @@ expand_start_try_stmts () /* Called to begin a catch clause. The parameter is the object which will be passed to the runtime type check routine. */ void -expand_start_catch (rtime) +start_catch_handler (rtime) tree rtime; { rtx handler_label = catchstack.top->entry->exception_handler_label; @@ -1529,16 +1529,6 @@ expand_start_catch (rtime) add_new_handler (eh_region_entry, get_new_handler (handler_label, rtime)); } -/* End a catch clause by dequeuing the current region */ - -void -expand_end_catch () -{ - struct eh_entry *entry; - entry = pop_eh_entry (&catchstack); - free (entry); -} - /* Generate RTL for the start of a group of catch clauses. It is responsible for starting a new instruction sequence for the @@ -1641,10 +1631,15 @@ void expand_end_all_catch () { rtx new_catch_clause, outer_context = NULL_RTX; + struct eh_entry *entry; if (! doing_eh (1)) return; + /* Dequeue the current catch clause region. */ + entry = pop_eh_entry (&catchstack); + free (entry); + if (! exceptions_via_longjmp) { outer_context = ehstack.top->entry->outer_context; diff --git a/gcc/except.h b/gcc/except.h index 9198e41a37e..56b5cb91de5 100644 --- a/gcc/except.h +++ b/gcc/except.h @@ -228,13 +228,9 @@ extern void add_eh_table_entry PROTO((int n)); /* Start a catch clause, triggered by runtime value paramter. */ #ifdef TREE_CODE -extern void expand_start_catch PROTO((tree)); +extern void start_catch_handler PROTO((tree)); #endif -/* End a catch clause. */ - -extern void expand_end_catch PROTO((void)); - /* Returns a non-zero value if we need to output an exception table. */ extern int exception_table_p PROTO((void)); -- 2.30.2