Commit 16842c15 by Jason Merrill

except.c (expand_eh_region_start): Don't start a new block.

        * except.c (expand_eh_region_start): Don't start a new block.
        (expand_eh_region_end): Don't end a block.
        * stmt.c (expand_end_bindings): Don't end EH blocks.
        (expand_decl_cleanup): Starting an EH region won't change the block.
        (mark_block_as_eh_region, mark_block_as_not_eh_region): Lose.
        (is_eh_region): Lose.
        * tree.h: Adjust.

From-SVN: r41647
parent 6fa0f379
2001-04-28 Jason Merrill <jason_merrill@redhat.com>
* except.c (expand_eh_region_start): Don't start a new block.
(expand_eh_region_end): Don't end a block.
* stmt.c (expand_end_bindings): Don't end EH blocks.
(expand_decl_cleanup): Starting an EH region won't change the block.
(mark_block_as_eh_region, mark_block_as_not_eh_region): Lose.
(is_eh_region): Lose.
* tree.h: Adjust.
2001-04-27 Jeffrey Oldham <oldham@codesourcery.com>
* except.c (expand_eh_region_end_cleanup): word_mode, not Pmode.
* collect2.c (main): Add `-L' case to remove duplicate entries.
(is_in_args): New function to check for a duplicate argument.
* defaults.h (LINK_ELIMINATE_DUPLICATE_LDIRECTORIES): New macro.
......
......@@ -643,17 +643,6 @@ expand_eh_region_start ()
if (! doing_eh (0))
return;
/* We need a new block to record the start and end of the dynamic
handler chain. We also want to prevent jumping into a try block. */
expand_start_bindings (2);
/* But we don't need or want a new temporary level. */
pop_temp_slots ();
/* Mark this block as created by expand_eh_region_start. This is so
that we can pop the block with expand_end_bindings automatically. */
mark_block_as_eh_region ();
/* Insert a new blank region as a leaf in the tree. */
new_region = (struct eh_region *) xcalloc (1, sizeof (*new_region));
cur_region = cfun->eh->cur_region;
......@@ -691,20 +680,6 @@ expand_eh_region_end ()
/* Pop. */
cfun->eh->cur_region = cur_region->outer;
/* If we have already started ending the bindings, don't recurse. */
if (is_eh_region ())
{
/* Because we don't need or want a new temporary level and
because we didn't create one in expand_eh_region_start,
create a fake one now to avoid removing one in
expand_end_bindings. */
push_temp_slots ();
mark_block_as_not_eh_region ();
expand_end_bindings (NULL_TREE, 0, 0);
}
return cur_region;
}
......@@ -739,7 +714,7 @@ expand_eh_region_end_cleanup (handler)
it, we need to save the EH return data registers around it. */
data_save[0] = gen_reg_rtx (Pmode);
emit_move_insn (data_save[0], get_exception_pointer ());
data_save[1] = gen_reg_rtx (Pmode);
data_save[1] = gen_reg_rtx (word_mode);
emit_move_insn (data_save[1], get_exception_filter ());
expand_expr (handler, const0_rtx, VOIDmode, 0);
......
......@@ -3380,28 +3380,6 @@ is_body_block (stmt)
return 0;
}
/* Mark top block of block_stack as an implicit binding for an
exception region. This is used to prevent infinite recursion when
ending a binding with expand_end_bindings. It is only ever called
by expand_eh_region_start, as that it the only way to create a
block stack for a exception region. */
void
mark_block_as_eh_region ()
{
block_stack->data.block.exception_region = 1;
if (block_stack->next
&& block_stack->next->data.block.conditional_code)
{
block_stack->data.block.conditional_code
= block_stack->next->data.block.conditional_code;
block_stack->data.block.last_unconditional_cleanup
= block_stack->next->data.block.last_unconditional_cleanup;
block_stack->data.block.cleanup_ptr
= block_stack->next->data.block.cleanup_ptr;
}
}
/* True if we are currently emitting insns in an area of output code
that is controlled by a conditional expression. This is used by
the cleanup handling code to generate conditional cleanup actions. */
......@@ -3412,29 +3390,6 @@ conditional_context ()
return block_stack && block_stack->data.block.conditional_code;
}
/* Mark top block of block_stack as not for an implicit binding for an
exception region. This is only ever done by expand_eh_region_end
to let expand_end_bindings know that it is being called explicitly
to end the binding layer for just the binding layer associated with
the exception region, otherwise expand_end_bindings would try and
end all implicit binding layers for exceptions regions, and then
one normal binding layer. */
void
mark_block_as_not_eh_region ()
{
block_stack->data.block.exception_region = 0;
}
/* True if the top block of block_stack was marked as for an exception
region by mark_block_as_eh_region. */
int
is_eh_region ()
{
return cfun && block_stack && block_stack->data.block.exception_region;
}
/* Emit a handler label for a nonlocal goto handler.
Also emit code to store the handler label in SLOT before BEFORE_INSN. */
......@@ -3637,26 +3592,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
int mark_ends;
int dont_jump_in;
{
register struct nesting *thisblock;
while (block_stack->data.block.exception_region)
{
/* Because we don't need or want a new temporary level and
because we didn't create one in expand_eh_region_start,
create a fake one now to avoid removing one in
expand_end_bindings. */
push_temp_slots ();
block_stack->data.block.exception_region = 0;
expand_end_bindings (NULL_TREE, 0, 0);
}
/* Since expand_eh_region_start does an expand_start_bindings, we
have to first end all the bindings that were created by
expand_eh_region_start. */
thisblock = block_stack;
register struct nesting *thisblock = block_stack;
/* If any of the variables in this scope were not used, warn the
user. */
......@@ -4077,9 +4013,6 @@ expand_decl_cleanup (decl, cleanup)
else
expand_eh_region_start ();
/* If that started a new EH region, we're in a new block. */
thisblock = block_stack;
if (cond_context)
{
seq = get_insns ();
......
......@@ -2552,13 +2552,8 @@ extern void start_cleanup_deferral PARAMS ((void));
extern void end_cleanup_deferral PARAMS ((void));
extern int is_body_block PARAMS ((tree));
extern void mark_block_as_eh_region PARAMS ((void));
extern void mark_block_as_not_eh_region PARAMS ((void));
extern int is_eh_region PARAMS ((void));
extern int conditional_context PARAMS ((void));
extern tree last_cleanup_this_contour PARAMS ((void));
extern int expand_dhc_cleanup PARAMS ((tree));
extern int expand_dcc_cleanup PARAMS ((tree));
extern void expand_start_case PARAMS ((int, tree, tree,
const char *));
extern void expand_end_case PARAMS ((tree));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment