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
This commit is contained in:
parent
98d2830630
commit
9ffa2541c2
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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. */
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 (); }
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue