aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Manson <manson@charmed.cygnus.com>1996-09-05 00:43:02 +0000
committerMike Stump <mrs@gcc.gnu.org>1996-09-05 00:43:02 +0000
commit9ffa2541c214f58de29bafe667c066039d705871 (patch)
tree1bbaef1d75a7c7ea9cdf8d1f92a2a385299079dd
parent98d283063056ace6070cddf0c2e23f4ca95e2f60 (diff)
downloadgcc-9ffa2541c214f58de29bafe667c066039d705871.zip
gcc-9ffa2541c214f58de29bafe667c066039d705871.tar.gz
gcc-9ffa2541c214f58de29bafe667c066039d705871.tar.bz2
except.c (expand_start_try_stmts): Move to except.c in the backend.
* except.c (expand_start_try_stmts): Move to except.c in the backend. (expand_end_try_stmts): Remove. * init.c (perform_member_init): Use add_partial_entry () instead of directly manipulating lists. (emit_base_init): Ditto. From-SVN: r12689
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/cp-tree.h8
-rw-r--r--gcc/cp/except.c17
-rw-r--r--gcc/cp/init.c21
-rw-r--r--gcc/cp/parse.y6
5 files changed, 18 insertions, 43 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8527738..7bae0fc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
+
+ * except.c (expand_start_try_stmts): Move to except.c in the backend.
+ (expand_end_try_stmts): Remove.
+
+ * init.c (perform_member_init): Use add_partial_entry () instead
+ of directly manipulating lists.
+ (emit_base_init): Ditto.
+
Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (start_function): Only check interface_* for templates
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 441fe69..d48257d6 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -2132,15 +2132,7 @@ extern void check_default_args PROTO((tree));
extern void mark_used PROTO((tree));
/* in except.c */
-extern tree protect_list;
-extern void expand_eh_region_start PROTO((void));
-extern void expand_eh_region_end PROTO((tree));
-extern void end_protect_partials PROTO((void));
extern void expand_exception_blocks PROTO((void));
-extern void expand_start_try_stmts PROTO((void));
-extern void expand_end_try_stmts PROTO((void));
-extern void expand_start_all_catch PROTO((void));
-extern void expand_end_all_catch PROTO((void));
extern void start_catch_block PROTO((tree, tree));
extern void end_catch_block PROTO((void));
extern void expand_throw PROTO((tree));
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 16e5b20..6086aa6 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -347,23 +347,6 @@ init_exception_processing ()
saved_in_catch = lookup_name (get_identifier ("__eh_in_catch"), 0);
}
-/* Call this on start of a try block. */
-
-void
-expand_start_try_stmts ()
-{
- if (! doing_eh (1))
- return;
-
- expand_eh_region_start ();
-}
-
-void
-expand_end_try_stmts ()
-{
- expand_eh_region_end (integer_zero_node);
-}
-
/* Build a type value for use at runtime for a type that is matched
against by the exception handling system. */
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index 67df087..8ac11e8 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -153,10 +153,9 @@ expand_direct_vtbls_init (real_binfo, binfo, init_self, can_elide, addr)
/* Subroutine of emit_base_init. */
static void
-perform_member_init (member, name, init, explicit, protect_list)
+perform_member_init (member, name, init, explicit)
tree member, name, init;
int explicit;
- tree *protect_list;
{
tree decl;
tree type = TREE_TYPE (member);
@@ -244,10 +243,7 @@ perform_member_init (member, name, init, explicit, protect_list)
LOOKUP_NONVIRTUAL|LOOKUP_DESTRUCTOR, 0);
if (expr != error_mark_node)
- {
- expand_eh_region_start ();
- *protect_list = tree_cons (NULL_TREE, expr, *protect_list);
- }
+ add_partial_entry (expr);
}
}
@@ -532,8 +528,6 @@ emit_base_init (t, immediately)
int i, n_baseclasses = binfos ? TREE_VEC_LENGTH (binfos) : 0;
tree expr = NULL_TREE;
- my_friendly_assert (protect_list == NULL_TREE, 999);
-
if (! immediately)
{
int momentary;
@@ -618,15 +612,14 @@ emit_base_init (t, immediately)
if (TYPE_NEEDS_DESTRUCTOR (BINFO_TYPE (base_binfo)))
{
- expand_eh_region_start ();
+ tree expr;
/* All cleanups must be on the function_obstack. */
push_obstacks_nochange ();
resume_temporary_allocation ();
- protect_list = tree_cons (NULL_TREE,
- build_partial_cleanup_for (base_binfo),
- protect_list);
+ expr = build_partial_cleanup_for (base_binfo);
pop_obstacks ();
+ add_partial_entry (expr);
}
rbase_init_list = TREE_CHAIN (rbase_init_list);
@@ -677,7 +670,7 @@ emit_base_init (t, immediately)
from_init_list = 0;
}
- perform_member_init (member, name, init, from_init_list, &protect_list);
+ perform_member_init (member, name, init, from_init_list);
mem_init_list = TREE_CHAIN (mem_init_list);
}
@@ -715,7 +708,7 @@ emit_base_init (t, immediately)
my_friendly_assert (DECL_FIELD_CONTEXT (field) != t, 351);
#endif
- perform_member_init (field, name, init, 1, &protect_list);
+ perform_member_init (field, name, init, 1);
}
mem_init_list = TREE_CHAIN (mem_init_list);
}
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 06c4d82..8e928f9 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -3700,8 +3700,7 @@ function_try_block:
expand_start_early_try_stmts ();
}
ctor_initializer_opt compstmt_or_error
- { expand_end_try_stmts ();
- expand_start_all_catch (); }
+ { expand_start_all_catch (); }
handler_seq
{
int nested = (hack_decl_function_context
@@ -3715,8 +3714,7 @@ try_block:
TRY
{ expand_start_try_stmts (); }
compstmt
- { expand_end_try_stmts ();
- expand_start_all_catch (); }
+ { expand_start_all_catch (); }
handler_seq
{ expand_end_all_catch (); }
;