From 87caf699bdbee02675437483d08bcfa742277a62 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Sun, 25 Nov 2007 14:26:10 +0000 Subject: [PATCH] tree.h (struct tree_block): Move locus member next to flags. 2007-11-25 Richard Guenther * tree.h (struct tree_block): Move locus member next to flags. * c-decl.c (SCOPE_LIST_APPEND): Use BLOCK_CHAIN. (SCOPE_LIST_CONCAT): Likewise. (pop_scope): Likewise. * function.c (instantiate_decls_1): Likewise. (setjmp_vars_warning): Likewise. * emit-rtl.c (set_used_decls): Likewise. * tree-inline.c (add_lexical_block): Likewise. cp/ decl.c (poplevel): Use BLOCK_CHAIN. ada/ utils.c (gnat_pushlevel): Use BLOCK_CHAIN. (gnat_poplevel): Likewise. From-SVN: r130407 --- gcc/ChangeLog | 12 ++++++++++++ gcc/ada/ChangeLog | 5 +++++ gcc/ada/utils.c | 8 ++++---- gcc/c-decl.c | 6 +++--- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 2 +- gcc/emit-rtl.c | 2 +- gcc/function.c | 4 ++-- gcc/tree-inline.c | 2 +- gcc/tree.h | 3 ++- 10 files changed, 35 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 670c0ac04e8..c74de4ffe09 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2007-11-25 Richard Guenther + + * tree.h (struct tree_block): Move locus member next to + flags. + * c-decl.c (SCOPE_LIST_APPEND): Use BLOCK_CHAIN. + (SCOPE_LIST_CONCAT): Likewise. + (pop_scope): Likewise. + * function.c (instantiate_decls_1): Likewise. + (setjmp_vars_warning): Likewise. + * emit-rtl.c (set_used_decls): Likewise. + * tree-inline.c (add_lexical_block): Likewise. + 2007-11-24 Hans-Peter Nilsson * rtlanal.c (label_is_jump_target_p): Return true for a matching diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4f229ba34a4..cfe27b11937 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2007-11-25 Richard Guenther + + utils.c (gnat_pushlevel): Use BLOCK_CHAIN. + (gnat_poplevel): Likewise. + 2007-11-25 Eric Botcazou * decl.c (gnat_to_gnu_entity) : If the type has diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 9fed4a9cb5e..e0c0065a652 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -298,8 +298,8 @@ gnat_pushlevel () if (free_block_chain) { newlevel->block = free_block_chain; - free_block_chain = TREE_CHAIN (free_block_chain); - TREE_CHAIN (newlevel->block) = NULL_TREE; + free_block_chain = BLOCK_CHAIN (free_block_chain); + BLOCK_CHAIN (newlevel->block) = NULL_TREE; } else newlevel->block = make_node (BLOCK); @@ -365,12 +365,12 @@ gnat_poplevel () BLOCK_SUBBLOCKS (level->chain->block) = chainon (BLOCK_SUBBLOCKS (block), BLOCK_SUBBLOCKS (level->chain->block)); - TREE_CHAIN (block) = free_block_chain; + BLOCK_CHAIN (block) = free_block_chain; free_block_chain = block; } else { - TREE_CHAIN (block) = BLOCK_SUBBLOCKS (level->chain->block); + BLOCK_CHAIN (block) = BLOCK_SUBBLOCKS (level->chain->block); BLOCK_SUBBLOCKS (level->chain->block) = block; TREE_USED (block) = 1; set_block_for_group (block); diff --git a/gcc/c-decl.c b/gcc/c-decl.c index bcf20e09a37..e0eb450ef9b 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -375,7 +375,7 @@ static GTY((deletable)) struct c_binding *binding_freelist; struct c_scope *s_ = (scope); \ tree d_ = (decl); \ if (s_->list##_last) \ - TREE_CHAIN (s_->list##_last) = d_; \ + BLOCK_CHAIN (s_->list##_last) = d_; \ else \ s_->list = d_; \ s_->list##_last = d_; \ @@ -386,7 +386,7 @@ static GTY((deletable)) struct c_binding *binding_freelist; struct c_scope *t_ = (tscope); \ struct c_scope *f_ = (fscope); \ if (t_->to##_last) \ - TREE_CHAIN (t_->to##_last) = f_->from; \ + BLOCK_CHAIN (t_->to##_last) = f_->from; \ else \ t_->to = f_->from; \ t_->to##_last = f_->from##_last; \ @@ -693,7 +693,7 @@ pop_scope (void) TREE_USED (block) = 1; /* In each subblock, record that this is its superior. */ - for (p = scope->blocks; p; p = TREE_CHAIN (p)) + for (p = scope->blocks; p; p = BLOCK_CHAIN (p)) BLOCK_SUPERCONTEXT (p) = block; BLOCK_VARS (block) = 0; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d07b5a09d91..cd0ceb37383 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2007-11-25 Richard Guenther + + decl.c (poplevel): Use BLOCK_CHAIN. + 2007-11-24 Ollie Wild * typeck.c (delta_from_ptrmemfunc): New function. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f020c270f89..7d1451c1fbe 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -587,7 +587,7 @@ poplevel (int keep, int reverse, int functionbody) /* In each subblock, record that this is its superior. */ if (keep >= 0) - for (link = subblocks; link; link = TREE_CHAIN (link)) + for (link = subblocks; link; link = BLOCK_CHAIN (link)) BLOCK_SUPERCONTEXT (link) = block; /* We still support the old for-scope rules, whereby the variables diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 5ce8519993b..f9b13470fe5 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2441,7 +2441,7 @@ set_used_decls (tree blk) set_used_flags (DECL_RTL (t)); /* Now process sub-blocks. */ - for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t)) + for (t = BLOCK_SUBBLOCKS (blk); t; t = BLOCK_CHAIN (t)) set_used_decls (t); } diff --git a/gcc/function.c b/gcc/function.c index f549c777101..249d715004b 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1635,7 +1635,7 @@ instantiate_decls_1 (tree let) } /* Process all subblocks. */ - for (t = BLOCK_SUBBLOCKS (let); t; t = TREE_CHAIN (t)) + for (t = BLOCK_SUBBLOCKS (let); t; t = BLOCK_CHAIN (t)) instantiate_decls_1 (t); } @@ -3542,7 +3542,7 @@ setjmp_vars_warning (bitmap setjmp_crosses, tree block) " % or %", decl); } - for (sub = BLOCK_SUBBLOCKS (block); sub; sub = TREE_CHAIN (sub)) + for (sub = BLOCK_SUBBLOCKS (block); sub; sub = BLOCK_CHAIN (sub)) setjmp_vars_warning (setjmp_crosses, sub); } diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index da52d6c82e2..cb161db8398 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2474,7 +2474,7 @@ add_lexical_block (tree current_block, tree new_block) /* Walk to the last sub-block. */ for (blk_p = &BLOCK_SUBBLOCKS (current_block); *blk_p; - blk_p = &TREE_CHAIN (*blk_p)) + blk_p = &BLOCK_CHAIN (*blk_p)) ; *blk_p = new_block; BLOCK_SUPERCONTEXT (new_block) = current_block; diff --git a/gcc/tree.h b/gcc/tree.h index 75702ec0606..0ac57be9c8b 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2060,13 +2060,14 @@ struct tree_block GTY(()) unsigned abstract_flag : 1; unsigned block_num : 30; + location_t locus; + tree vars; tree subblocks; tree supercontext; tree abstract_origin; tree fragment_origin; tree fragment_chain; - location_t locus; }; /* Define fields and accessors for nodes representing data types. */ -- 2.30.2