aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-07-07 10:21:04 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-07-07 10:21:04 +0000
commit604a320594b012c8d2cda2fc5d2bbd3230d034b1 (patch)
treef1107852a967ee8014a46e51df142dd36d2f7735 /gcc/java/class.c
parent6b66447a5241687f20ce263f8e51f5a9950aad97 (diff)
downloadgcc-604a320594b012c8d2cda2fc5d2bbd3230d034b1.zip
gcc-604a320594b012c8d2cda2fc5d2bbd3230d034b1.tar.gz
gcc-604a320594b012c8d2cda2fc5d2bbd3230d034b1.tar.bz2
tree.h (TYPE_BINFO_OFFSET, [...]): Remove.
* tree.h (TYPE_BINFO_OFFSET, TYPE_BINFO_VTABLE, TYPE_BINFO_VIRTUALS, TYPE_BINFO_BASETYPES, TYPE_BINFO_BASETYPE): Remove. (BINFO_BASETYPES, BINFO_N_BASETYPES, BINFO_BASETYPE): Rename to ... (BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): ... here. (BINFO_BASEACCESSES, BINFO_BASEACCESS): Rename to ... (BINFO_BASE_ACCESSES, BINFO_BASE_ACCESS): ... here. (BINFO_INHERITANCE_CHAIN): Redocument as it is actually used. (struct tree_binfo): Rename base_types to base_binfos. * alias.c (record_component_aliases): Adjust BINFO macros. * dbxout.c (dbxout_type): Likewise. * dwarf2out.c (gen_member_die): Likewise. * sdbout.c (sdbout_one_type): Likewise. * tree-dump.c (deque_and_dump): Likewise. * config/i386/i386.c (classify_argument, contains_128bit_aligned_vector_p): Likewise. * cp/cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove. * cp/class.c (build_primary_vtable, check_bases, determine_primary_base, finish_struct_bits, maybe_warn_about_overly_private_class, dfs_find_final_overrider_q, get_basefndecls, warn_hidden, walk_subobject_offsets, build_base_fields, create_vtable_ptr, propagate_binfo_offsets, layout_virtual_bases, end_of_class, warn_about_ambiguous_bases, finish_struct_1, get_vfield_name, contains_empty_class_p, dump_class_hierarchy_r, finish_vtbls, build_vtt_inits, dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits, add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust BINFO macros. * cp/decl.c (xref_basetypes): Likewise. * cp/dump.c (cp_dump_tree): Likewise. * cp/error.c (dump_expr): Likewise. * cp/init.c (sort_mem_initializers, expand_member_init, push_base_cleanups): Likewise. * cp/method.c (do_build_copy_constructor, do_build_assign_reg, synthesize_exception_spec): Likewise. * cp/name-lookup.c (arg_assoc_class): * cp/pt.c (instantiate_class_template, tsubst, get_template_base_recursive): * cp/ptree.c (cxx_print_type): * cp/rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise. * cp/search.c (lookup_base_r, dynamic_cast_base_recurse, dfs_access_in_type, access_in_type, lookup_field_queue_p, bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp, marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp, dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet, binfo_for_vtable, copied_binfo, original_binfo): Likewise * cp/tree.c (copy_base_binfos, make_binfo): Likewise. * cp/typeck.c (commmon_base_type): Likewise * cp/typeck2.c (process_init_constructor): Likewise * java/java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros. (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise. * java/class.c (set_super_info, class_depth, interface_of_p, maybe_add_interface, add_interface, make_class_data, layout_class, add_miranda_methods): Adjust BINFO macros. * java/expr.c (can_widen_reference_to, lookup_field): Likewise. * java/jcf-write.c (generate_classfile): Likewise. * java/parse.y (patch_anonymous_class, check_inner_circular_reference, check_circular_reference, java_complete_class, check_abstract_method_definitions, java_check_abstract_method_definitions, check_interface_throws_clauses, java_check_abstract_methods, lookup_java_interface_method2, find_applicable_accessible_methods_list): Likewise. * java/typeck.c (find_method_in_interface): Likewise. * java/verify.c (merge_types): Likewise. From-SVN: r84198
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index be4b3fd..48f6b86 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -477,13 +477,13 @@ set_super_info (int access_flags, tree this_class,
total_supers++;
TYPE_VFIELD (this_class) = TYPE_VFIELD (object_type_node);
- TYPE_BINFO_BASETYPES (this_class) = make_tree_vec (total_supers);
+ BINFO_BASE_BINFOS (TYPE_BINFO (this_class)) = make_tree_vec (total_supers);
if (super_class)
{
tree super_binfo = make_tree_binfo (0);
BINFO_TYPE (super_binfo) = super_class;
BINFO_OFFSET (super_binfo) = integer_zero_node;
- TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (this_class)), 0)
+ TREE_VEC_ELT (BINFO_BASE_BINFOS (TYPE_BINFO (this_class)), 0)
= super_binfo;
CLASS_HAS_SUPER (this_class) = 1;
}
@@ -519,7 +519,7 @@ class_depth (tree clas)
while (clas != object_type_node)
{
depth++;
- clas = TYPE_BINFO_BASETYPE (clas, 0);
+ clas = BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (clas), 0));
}
return depth;
}
@@ -532,7 +532,7 @@ interface_of_p (tree type1, tree type2)
int n, i;
tree basetype_vec;
- if (!(basetype_vec = TYPE_BINFO_BASETYPES (type2)))
+ if (!(basetype_vec = BINFO_BASE_BINFOS (TYPE_BINFO (type2))))
return 0;
n = TREE_VEC_LENGTH (basetype_vec);
for (i = 0; i < n; i++)
@@ -627,7 +627,7 @@ add_interface_do (tree basetype_vec, tree interface_class, int i)
tree
maybe_add_interface (tree this_class, tree interface_class)
{
- tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
+ tree basetype_vec = BINFO_BASE_BINFOS (TYPE_BINFO (this_class));
int i;
int n = TREE_VEC_LENGTH (basetype_vec);
for (i = 0; ; i++)
@@ -651,7 +651,7 @@ maybe_add_interface (tree this_class, tree interface_class)
void
add_interface (tree this_class, tree interface_class)
{
- tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
+ tree basetype_vec = BINFO_BASE_BINFOS (TYPE_BINFO (this_class));
int i;
int n = TREE_VEC_LENGTH (basetype_vec);
for (i = 0; ; i++)
@@ -1627,7 +1627,8 @@ make_class_data (tree type)
/* Build and emit the array of implemented interfaces. */
if (type != object_type_node)
- interface_len = TREE_VEC_LENGTH (TYPE_BINFO_BASETYPES (type)) - 1;
+ interface_len = BINFO_N_BASE_BINFOS (TYPE_BINFO (type)) - 1;
+
if (interface_len > 0)
{
tree init = NULL_TREE;
@@ -1639,7 +1640,7 @@ make_class_data (tree type)
interface_array_type);
for (i = interface_len; i > 0; i--)
{
- tree child = TREE_VEC_ELT (TYPE_BINFO_BASETYPES (type), i);
+ tree child = TREE_VEC_ELT (BINFO_BASE_BINFOS (TYPE_BINFO (type)), i);
tree iclass = BINFO_TYPE (child);
tree index;
if (! flag_indirect_dispatch
@@ -2032,7 +2033,7 @@ layout_class (tree this_class)
of this itself. */
if (!CLASS_FROM_SOURCE_P (this_class))
{
- tree basetype_vec = TYPE_BINFO_BASETYPES (this_class);
+ tree basetype_vec = BINFO_BASE_BINFOS (TYPE_BINFO (this_class));
if (basetype_vec)
{
@@ -2068,7 +2069,7 @@ layout_class (tree this_class)
static void
add_miranda_methods (tree base_class, tree search_class)
{
- tree basetype_vec = TYPE_BINFO_BASETYPES (search_class);
+ tree basetype_vec = BINFO_BASE_BINFOS (TYPE_BINFO (search_class));
int i, n = TREE_VEC_LENGTH (basetype_vec);
for (i = 1; i < n; ++i)
{