diff options
Diffstat (limited to 'gcc/java/parse.y')
| -rw-r--r-- | gcc/java/parse.y | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index c8b4596a587..20e6f9add99 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -1,6 +1,6 @@ /* Source code parsing and tree node generation for the GNU compiler for the Java(TM) language. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com) @@ -5451,7 +5451,7 @@ java_fix_constructors (void) if (CLASS_INTERFACE (TYPE_NAME (class_type))) continue; - current_class = class_type; + output_class = current_class = class_type; for (decl = TYPE_METHODS (class_type); decl; decl = TREE_CHAIN (decl)) { if (DECL_CONSTRUCTOR_P (decl)) @@ -7575,7 +7575,7 @@ java_reorder_fields (void) for (current = gclass_list; current; current = TREE_CHAIN (current)) { - current_class = TREE_TYPE (TREE_VALUE (current)); + output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (current_class == stop_reordering) break; @@ -7632,7 +7632,7 @@ java_layout_classes (void) for (current = gclass_list; current; current = TREE_CHAIN (current)) { - current_class = TREE_TYPE (TREE_VALUE (current)); + output_class = current_class = TREE_TYPE (TREE_VALUE (current)); layout_class (current_class); /* Error reported by the caller */ @@ -7696,7 +7696,7 @@ java_complete_expand_methods (tree class_decl) { tree clinit, decl, first_decl; - current_class = TREE_TYPE (class_decl); + output_class = current_class = TREE_TYPE (class_decl); /* Pre-expand <clinit> to figure whether we really need it or not. If we do need it, we pre-expand the static fields so they're @@ -9017,6 +9017,15 @@ java_expand_classes (void) for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) { + tree current; + for (current = cur_ctxp->class_list; + current; + current = TREE_CHAIN (current)) + gen_indirect_dispatch_tables (TREE_TYPE (current)); + } + + for (cur_ctxp = ctxp_for_generation; cur_ctxp; cur_ctxp = cur_ctxp->next) + { ctxp = cur_ctxp; input_filename = ctxp->filename; lang_init_source (2); /* Error msgs have method prototypes */ @@ -9025,7 +9034,6 @@ java_expand_classes (void) } input_filename = main_input_filename; - /* Find anonymous classes and expand their constructor. This extra pass is necessary because the constructor itself is only generated when the method in which it is defined is expanded. */ @@ -9035,7 +9043,7 @@ java_expand_classes (void) ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { - current_class = TREE_TYPE (current); + output_class = current_class = TREE_TYPE (current); if (ANONYMOUS_CLASS_P (current_class)) { tree d; @@ -9063,7 +9071,7 @@ java_expand_classes (void) for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; - current_class = TREE_TYPE (current); + output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) @@ -9094,7 +9102,7 @@ java_expand_classes (void) for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { tree d; - current_class = TREE_TYPE (current); + output_class = current_class = TREE_TYPE (current); for (d = TYPE_METHODS (current_class); d; d = TREE_CHAIN (d)) { if (DECL_RESULT (d) == NULL_TREE) @@ -9159,7 +9167,7 @@ java_expand_classes (void) current; current = TREE_CHAIN (current)) { - current_class = TREE_TYPE (TREE_VALUE (current)); + output_class = current_class = TREE_TYPE (TREE_VALUE (current)); if (flag_emit_class_files) write_classfile (current_class); if (flag_emit_xref) @@ -9180,7 +9188,7 @@ java_finish_classes (void) ctxp = cur_ctxp; for (current = ctxp->class_list; current; current = TREE_CHAIN (current)) { - current_class = TREE_TYPE (current); + output_class = current_class = TREE_TYPE (current); finish_class (); } } |

