diff options
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/java/class.c | 22 | ||||
-rw-r--r-- | gcc/java/constants.c | 7 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 2 | ||||
-rw-r--r-- | gcc/java/parse.y | 2 |
5 files changed, 24 insertions, 18 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index fe99c0a..4ee59ee 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2003-04-12 Zack Weinberg <zack@codesourcery.com> + + * class.c (make_field_value, make_method_value, get_dispatch_table) + (make_class_data, emit_offset_symbol_table) + * constants.c (build_constants_constructor) + * java-tree.h (START_RECORD_CONSTRUCTOR) + * parse.y (maybe_build_array_element_wfl): + Use build_constructor. + 2003-04-10 Eric Blake <ebb9@email.byu.edu> PR java/10253: diff --git a/gcc/java/class.c b/gcc/java/class.c index f121f0e..fff4247 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -1076,7 +1076,7 @@ make_field_value (tree fdecl) PUSH_FIELD_VALUE (finit, "info", - build (CONSTRUCTOR, field_info_union_node, NULL_TREE, + build_constructor (field_info_union_node, build_tree_list ((FIELD_STATIC (fdecl) ? TREE_CHAIN (TYPE_FIELDS (field_info_union_node)) @@ -1145,7 +1145,7 @@ make_method_value (tree mdecl) table = tree_cons (NULL_TREE, utf8, table); } type = build_prim_array_type (ptr_type_node, length); - table = build (CONSTRUCTOR, type, NULL_TREE, table); + table = build_constructor (type, table); /* Compute something unique enough. */ sprintf (buf, "_methods%d", method_name_count++); array = build_decl (VAR_DECL, get_identifier (buf), type); @@ -1267,9 +1267,8 @@ get_dispatch_table (tree type, tree this_class_addr) if (TARGET_VTABLE_USES_DESCRIPTORS) arraysize *= TARGET_VTABLE_USES_DESCRIPTORS; arraysize += 2; - return build (CONSTRUCTOR, - build_prim_array_type (nativecode_ptr_type_node, arraysize), - NULL_TREE, list); + return build_constructor (build_prim_array_type (nativecode_ptr_type_node, + arraysize), list); } static int @@ -1352,8 +1351,8 @@ make_class_data (tree type) field_array_type = build_prim_array_type (field_type_node, field_count); fields_decl = build_decl (VAR_DECL, mangled_classname ("_FL_", type), field_array_type); - DECL_INITIAL (fields_decl) = build (CONSTRUCTOR, field_array_type, - NULL_TREE, static_fields); + DECL_INITIAL (fields_decl) = build_constructor (field_array_type, + static_fields); TREE_STATIC (fields_decl) = 1; DECL_ARTIFICIAL (fields_decl) = 1; DECL_IGNORED_P (fields_decl) = 1; @@ -1378,8 +1377,8 @@ make_class_data (tree type) method_array_type = build_prim_array_type (method_type_node, method_count); methods_decl = build_decl (VAR_DECL, mangled_classname ("_MT_", type), method_array_type); - DECL_INITIAL (methods_decl) = build (CONSTRUCTOR, method_array_type, - NULL_TREE, nreverse (methods)); + DECL_INITIAL (methods_decl) = build_constructor (method_array_type, + nreverse (methods)); TREE_STATIC (methods_decl) = 1; DECL_ARTIFICIAL (methods_decl) = 1; DECL_IGNORED_P (methods_decl) = 1; @@ -1451,8 +1450,7 @@ make_class_data (tree type) } init = tree_cons (NULL_TREE, index, init); } - DECL_INITIAL (idecl) = build (CONSTRUCTOR, interface_array_type, - NULL_TREE, init); + DECL_INITIAL (idecl) = build_constructor (interface_array_type, init); TREE_STATIC (idecl) = 1; DECL_ARTIFICIAL (idecl) = 1; DECL_IGNORED_P (idecl) = 1; @@ -2099,7 +2097,7 @@ emit_offset_symbol_table (void) /* Put the list in the right order and make it a constructor. */ list = nreverse (list); - table = build (CONSTRUCTOR, method_symbols_array_type, NULL_TREE, list); + table = build_constructor (method_symbols_array_type, list); /* Make it the initial value for otable_syms and emit the decl. */ DECL_INITIAL (otable_syms_decl) = table; diff --git a/gcc/java/constants.c b/gcc/java/constants.c index 1a56df0..274a8bf 100644 --- a/gcc/java/constants.c +++ b/gcc/java/constants.c @@ -442,8 +442,8 @@ build_constants_constructor (void) data_decl = TREE_OPERAND (build_constant_data_ref (), 0); TREE_TYPE (data_decl) = build_array_type (ptr_type_node, index_type), - DECL_INITIAL (data_decl) = build (CONSTRUCTOR, TREE_TYPE (data_decl), - NULL_TREE, data_list); + DECL_INITIAL (data_decl) = build_constructor (TREE_TYPE (data_decl), + data_list); DECL_SIZE (data_decl) = TYPE_SIZE (TREE_TYPE (data_decl)); DECL_SIZE_UNIT (data_decl) = TYPE_SIZE_UNIT (TREE_TYPE (data_decl)); rest_of_decl_compilation (data_decl, (char *) 0, 1, 0); @@ -454,8 +454,7 @@ build_constants_constructor (void) current_class), tags_type); TREE_STATIC (tags_decl) = 1; - DECL_INITIAL (tags_decl) = build (CONSTRUCTOR, tags_type, - NULL_TREE, tags_list); + DECL_INITIAL (tags_decl) = build_constructor (tags_type, tags_list); rest_of_decl_compilation (tags_decl, (char*) 0, 1, 0); tags_value = build_address_of (tags_decl); } diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index adfd77e..62d2452 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -1650,7 +1650,7 @@ extern tree *type_map; /* Start building a RECORD_TYPE constructor with a given TYPE in CONS. */ #define START_RECORD_CONSTRUCTOR(CONS, CTYPE) { \ - CONS = build (CONSTRUCTOR, CTYPE, NULL_TREE, NULL_TREE);\ + CONS = build_constructor (CTYPE, NULL_TREE);\ TREE_CHAIN(CONS) = TYPE_FIELDS (CTYPE); } /* Append a field initializer to CONS for the dummy field for the inherited diff --git a/gcc/java/parse.y b/gcc/java/parse.y index b5808d4..df60f9e 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -14499,7 +14499,7 @@ maybe_build_array_element_wfl (tree node) static tree build_new_array_init (int location, tree values) { - tree constructor = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, values); + tree constructor = build_constructor (NULL_TREE, values); tree to_return = build1 (NEW_ARRAY_INIT, NULL_TREE, constructor); EXPR_WFL_LINECOL (to_return) = location; return to_return; |