Commit de8e49f3 by Nathan Sidwell Committed by Nathan Sidwell

c-semantics.c (add_scope_stmt): Don't call current_scope_stmt_stack multiple times.

	* c-semantics.c (add_scope_stmt): Don't call
	current_scope_stmt_stack multiple times.

From-SVN: r41521
parent 0ba8a114
2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
* c-semantics.c (add_scope_stmt): Don't call
current_scope_stmt_stack multiple times.
2001-04-24 Zack Weinberg <zackw@stanford.edu> 2001-04-24 Zack Weinberg <zackw@stanford.edu>
Nathan Sidwell <nathan@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com>
......
...@@ -112,8 +112,9 @@ add_scope_stmt (begin_p, partial_p) ...@@ -112,8 +112,9 @@ add_scope_stmt (begin_p, partial_p)
int begin_p; int begin_p;
int partial_p; int partial_p;
{ {
tree *stack_ptr = current_scope_stmt_stack ();
tree ss; tree ss;
tree top; tree top = *stack_ptr;
/* Build the statement. */ /* Build the statement. */
ss = build_stmt (SCOPE_STMT, NULL_TREE); ss = build_stmt (SCOPE_STMT, NULL_TREE);
...@@ -123,15 +124,13 @@ add_scope_stmt (begin_p, partial_p) ...@@ -123,15 +124,13 @@ add_scope_stmt (begin_p, partial_p)
/* Keep the scope stack up to date. */ /* Keep the scope stack up to date. */
if (begin_p) if (begin_p)
{ {
*current_scope_stmt_stack () top = tree_cons (ss, NULL_TREE, top);
= tree_cons (ss, NULL_TREE, *current_scope_stmt_stack ()); *stack_ptr = top;
top = *current_scope_stmt_stack ();
} }
else else
{ {
top = *current_scope_stmt_stack ();
TREE_VALUE (top) = ss; TREE_VALUE (top) = ss;
*current_scope_stmt_stack () = TREE_CHAIN (top); *stack_ptr = TREE_CHAIN (top);
} }
/* Add the new statement to the statement-tree. */ /* Add the new statement to the statement-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