+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
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));
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. */
/* 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);
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);
}
}
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;
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);
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);
}
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);
}
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
TRY
{ expand_start_try_stmts (); }
compstmt
- { expand_end_try_stmts ();
- expand_start_all_catch (); }
+ { expand_start_all_catch (); }
handler_seq
{ expand_end_all_catch (); }
;