Commit 0a3af4d8 by Per Bothner

Use new TRY_FINALLY_EXPR tree node.

(
Use new TRY_FINALLY_EXPR tree node.  See ChangeLog.

From-SVN: r25312
parent ececaeae
...@@ -543,7 +543,6 @@ check_init (exp, before) ...@@ -543,7 +543,6 @@ check_init (exp, before)
{ {
tree try_clause = TREE_OPERAND (exp, 0); tree try_clause = TREE_OPERAND (exp, 0);
tree clause = TREE_OPERAND (exp, 1); tree clause = TREE_OPERAND (exp, 1);
tree finally = TREE_OPERAND (exp, 2);
words save = ALLOC_WORDS (num_current_words); words save = ALLOC_WORDS (num_current_words);
words tmp = ALLOC_WORDS (num_current_words); words tmp = ALLOC_WORDS (num_current_words);
struct alternatives alt; struct alternatives alt;
...@@ -559,17 +558,22 @@ check_init (exp, before) ...@@ -559,17 +558,22 @@ check_init (exp, before)
check_init (catch_clause, tmp); check_init (catch_clause, tmp);
done_alternative (tmp, &alt); done_alternative (tmp, &alt);
} }
if (finally != NULL_TREE)
{
check_init (finally, save);
UNION (alt.combined, alt.combined, save);
}
FREE_WORDS (tmp); FREE_WORDS (tmp);
FREE_WORDS (save); FREE_WORDS (save);
END_ALTERNATIVES (before, alt); END_ALTERNATIVES (before, alt);
} }
return; return;
case TRY_FINALLY_EXPR:
{
words tmp = ALLOC_WORDS (num_current_words);
COPY (tmp, before);
check_init (TREE_OPERAND (exp, 0), tmp);
check_init (TREE_OPERAND (exp, 1), before);
FREE_WORDS (tmp);
}
return;
case RETURN_EXPR: case RETURN_EXPR:
case THROW_EXPR: case THROW_EXPR:
if (TREE_OPERAND (exp, 0)) if (TREE_OPERAND (exp, 0))
......
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