aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-11-26 18:04:45 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-11-26 10:04:45 -0800
commit532815a787849962ca2f2101aef12ec1d57b2cfd (patch)
treefd510bfba4be46b5f8449a5f32932ed69e327402 /gcc/java/parse.y
parente57df6fed97f4e7dd58dd00a1946c698b5a22d92 (diff)
downloadgcc-532815a787849962ca2f2101aef12ec1d57b2cfd.zip
gcc-532815a787849962ca2f2101aef12ec1d57b2cfd.tar.gz
gcc-532815a787849962ca2f2101aef12ec1d57b2cfd.tar.bz2
re PR java/18305 (Class initialization optimization is not done when compiled from .class)
2004-11-26 Andrew Pinski <pinskia@physics.uc.edu> PR java/18305 * decl.c (end_java_method): Call attach_init_test_initialization_flags on all the init_decls. * parse.y (attach_init_test_initialization_flags): Move to ... * expr.c (attach_init_test_initialization_flags): here and support BIND_EXPR also. * java-tree.h (attach_init_test_initialization_flags): Prototype. * jcf-parse.c (parse_class_file): Don't disable class init optimization. From-SVN: r91343
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y21
1 files changed, 0 insertions, 21 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 91776c6..2b3d3a4 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -347,7 +347,6 @@ static tree build_dot_class_method_invocation (tree, tree);
static void create_new_parser_context (int);
static tree maybe_build_class_init_for_field (tree, tree);
-static int attach_init_test_initialization_flags (void **, void *);
static int emit_test_initialization (void **, void *);
static char *string_convert_int_cst (tree);
@@ -16345,26 +16344,6 @@ init_src_parse (void)
/* This section deals with the functions that are called when tables
recording class initialization information are traversed. */
-/* Attach to PTR (a block) the declaration found in ENTRY. */
-
-static int
-attach_init_test_initialization_flags (void **entry, void *ptr)
-{
- tree block = (tree)ptr;
- struct treetreehash_entry *ite = (struct treetreehash_entry *) *entry;
-
- if (block != error_mark_node)
- {
- tree body = BLOCK_SUBBLOCKS (block);
- TREE_CHAIN (ite->value) = BLOCK_EXPR_DECLS (block);
- BLOCK_EXPR_DECLS (block) = ite->value;
- body = build2 (COMPOUND_EXPR, void_type_node,
- build1 (DECL_EXPR, void_type_node, ite->value), body);
- BLOCK_SUBBLOCKS (block) = body;
- }
- return true;
-}
-
/* This function is called for each class that is known definitely
initialized when a given static method was called. This function
augments a compound expression (INFO) storing all assignment to