diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-07-11 10:53:06 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-07-11 10:53:06 +0100 |
commit | 9dcf6e7366cda28e32258e576e09337818c8bb05 (patch) | |
tree | 9bfd7630da8e5c58f26e9976e1d534d1c74544c6 /gcc/java/decl.c | |
parent | fae1b38dc82248b70271f42647fa92b82ca6e200 (diff) | |
download | gcc-9dcf6e7366cda28e32258e576e09337818c8bb05.zip gcc-9dcf6e7366cda28e32258e576e09337818c8bb05.tar.gz gcc-9dcf6e7366cda28e32258e576e09337818c8bb05.tar.bz2 |
langhooks.h (estimate_num_insns, [...]): Remove hooks.
* langhooks.h (estimate_num_insns, pushlevel, poplevel, set_block,
maybe_build_cleanup, update_decl_after_saving): Remove hooks.
* langhooks.c (lhd_clear_binding_stack): Remove.
* langhooks-def.h (lhd_clear_binding_stack,
LANG_HOOKS_MAYBE_BUILD_CLEANUP,
LANG_HOOKS_UPDATE_DECL_AFTER_SAVING,
LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.
(LANG_HOOKS_CLEAR_BINDING_STACK): Define to lhd_do_nothing.
* system.h (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_SET_BLOCK,
LANG_HOOKS_MAYBE_BUILD_CLEANUP,
LANG_HOOKS_UPDATE_DECL_AFTER_SAVING, LANG_HOOKS_POPLEVEL): Poison.
* tree.h (poplevel): Don't declare.
* c-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.
* objc/objc-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK,
LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK):
Remove.
ada:
* misc.c (LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK): Remove.
cp:
* cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
* cp-tree.h (poplevel): Declare.
(set_block): Remove.
* decl.c (set_block): Remove.
fortran:
* f95-lang.c (set_block): Remove.
(gfc_clear_binding_stack): New.
(LANG_HOOKS_CLEAR_BINDING_STACK): Define.
(struct binding_level): Remove block_created_by_back_end.
(clear_binding_level): Likewise.
(poplevel): Don't handle block_created_by_back_end.
java:
* java-tree.h (set_block): Remove.
* lang.c (java_clear_binding_stack): New.
(LANG_HOOKS_CLEAR_BINDING_STACK): Define.
* decl.c (struct binding_level): Remove this_block.
(clear_binding_level): Likewise.
(poplevel): Don't handle this_block.
(set_block): Remove.
treelang:
* treetree.c (set_block): Remove.
(struct binding_level): Remove block_created_by_back_end.
(clear_binding_level): Likewise.
(tree_code_create_function_initial,
tree_code_create_function_wrapup): Call pushlevel and poplevel
directly rather than through hooks.
(poplevel): Don't handle block_created_by_back_end.
From-SVN: r84499
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r-- | gcc/java/decl.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 5f2771d..b028967 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -299,10 +299,6 @@ struct binding_level GTY(()) that were entered and exited one level down. */ tree blocks; - /* The BLOCK node for this level, if one has been preallocated. - If 0, the BLOCK is allocated (if needed) when the level is popped. */ - tree this_block; - /* The binding level which this one is contained in (inherits from). */ struct binding_level *level_chain; @@ -348,7 +344,6 @@ static const struct binding_level clear_binding_level NULL_TREE, /* names */ NULL_TREE, /* shadowed */ NULL_TREE, /* blocks */ - NULL_TREE, /* this_lock */ NULL_BINDING_LEVEL, /* level_chain */ LARGEST_PC, /* end_pc */ 0, /* start_pc */ @@ -1276,7 +1271,6 @@ poplevel (int keep, int reverse, int functionbody) tree block = 0; tree decl; tree bind = 0; - int block_previously_created; #if defined(DEBUG_JAVA_BINDING_LEVELS) binding_depth--; @@ -1319,10 +1313,7 @@ poplevel (int keep, int reverse, int functionbody) create a BLOCK to record them for the life of this function. */ block = 0; - block_previously_created = (current_binding_level->this_block != 0); - if (block_previously_created) - block = current_binding_level->this_block; - else if (keep || functionbody) + if (keep || functionbody) { block = make_node (BLOCK); TREE_TYPE (block) = void_type_node; @@ -1466,9 +1457,8 @@ poplevel (int keep, int reverse, int functionbody) { if (block) { - if (!block_previously_created) - current_binding_level->blocks - = chainon (current_binding_level->blocks, block); + current_binding_level->blocks + = chainon (current_binding_level->blocks, block); } /* If we did not make a block for the level just exited, any blocks made for inner levels @@ -1571,19 +1561,6 @@ insert_block (tree block) = chainon (current_binding_level->blocks, block); } -/* Set the BLOCK node for the innermost scope - (the one we are currently in). */ - -void -set_block (tree block) -{ - current_binding_level->this_block = block; - current_binding_level->names = chainon (current_binding_level->names, - BLOCK_VARS (block)); - current_binding_level->blocks = chainon (current_binding_level->blocks, - BLOCK_SUBBLOCKS (block)); -} - /* integrate_decl_tree calls this function. */ void |