diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-07-20 12:26:02 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-07-20 12:26:02 +0000 |
commit | fa743e8cda25ba09a4731a3443df9e0e56e87581 (patch) | |
tree | d4f6d97c6ff518d744dc34b2b6c955e9348bb0b0 /gcc/config | |
parent | 35ae2ed81410448471c46f7757e6bc879d4de250 (diff) | |
download | gcc-fa743e8cda25ba09a4731a3443df9e0e56e87581.zip gcc-fa743e8cda25ba09a4731a3443df9e0e56e87581.tar.gz gcc-fa743e8cda25ba09a4731a3443df9e0e56e87581.tar.bz2 |
tree.h: Include vec.h
.: * tree.h: Include vec.h
(DEF_VEC_P(tree)): New type.
(BINFO_BASE_BINFOS, BINFO_N_BASE_BINFOS, BINFO_BASE_BINFO): Adjust.
(BINFO_BASE_APPEND, BINFO_BASE_ITERATE): New.
(BINFO_LANG_SLOT): Remove.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF): New.
(struct tree_binfo): Turn base_binfos into a trailing
VEC(tree). Add vtt_subvtt, vtt_vptr, primary fields.
(binfo_lang_slots): Remove.
* tree.c (binfo_lang_slots): Remove.
(make_tree_binfo_stat): Take a base binfo count, not a
lang slot count. Adjust.
* Makefile.in (TREE_H): Add vec.h
* alias.c (record_component_aliases): Adjust BINFO access.
* 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.
* config/sh/symbian.c (symbian_export_vtable_and_rtti_p): Likewise.
* doc/c-tree.texi (Classes): Update BINFO documentation.
cp:
* cp-tree.h (DEF_VEC_P(tree)): Remove here.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Moved to common.
(BINFO_LANG_SLOTS): Remove.
* tree.c (copy_binfo): Adjust BINFO creation and accessors.
* decl.c (xref_basetypes): Adjust BINFO creation and accessors.
* class.c (check_bases): Adjust BINFO accessors.
(determine_primary_base, finish_struct_bits,
maybe_warn_about_overly_private_class, warn_hidden,
walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
warn_about_ambiguous_bases, get_vfield_name,
dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
add_vcall_offset_vtbl_entries_r): Likewise.
* dump.c (cp_dump_tree): Likewise.
* init.c (sort_mem_initializers, expand_member_init, build_delete,
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor, do_build_assign_ref,
synthesize_exception_spec): Likewise.
name-lookup.c (arg_assoc_class): Likewise.
* pt.c (instantiate_class_template,
get_template_base_recursive): Likewise.
* rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
* typeck2.c (process_init_constructor): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, dfs_walk_real, look_for_overrides,
types_overlap_p, copied_binfo, original_binfo): Likewise.
(binfo_for_vtable): Remove
java:
* class.c (add_interface_do): Remove.
(set_super_info, interface_of_p, maybe_add_interface,
add_interface, make_class_data, layout_class,
add_miranda_methods): Adjust BINFO accessors and addition.
* expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
accessors.
* jcf-write.c (generate_classfile): Likewise.
* 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): Adjust BINFO accessors
and addition.
* typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
From-SVN: r84949
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 43 | ||||
-rw-r--r-- | gcc/config/sh/symbian.c | 20 |
2 files changed, 23 insertions, 40 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 86ea389..95d0d52 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2103,18 +2103,17 @@ classify_argument (enum machine_mode mode, tree type, if (TREE_CODE (type) == RECORD_TYPE) { /* For classes first merge in the field of the subclasses. */ - if (TYPE_BINFO (type) && BINFO_BASE_BINFOS (TYPE_BINFO (type))) + if (TYPE_BINFO (type)) { - tree bases = BINFO_BASE_BINFOS (TYPE_BINFO (type)); - int n_bases = BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); + tree binfo, base_binfo; int i; - for (i = 0; i < n_bases; ++i) + for (binfo = TYPE_BINFO (type), i = 0; + BINFO_BASE_ITERATE (binfo, i, base_binfo); i++) { - tree binfo = TREE_VEC_ELT (bases, i); int num; - int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8; - tree type = BINFO_TYPE (binfo); + int offset = tree_low_cst (BINFO_OFFSET (base_binfo), 0) * 8; + tree type = BINFO_TYPE (base_binfo); num = classify_argument (TYPE_MODE (type), type, subclasses, @@ -2191,18 +2190,17 @@ classify_argument (enum machine_mode mode, tree type, || TREE_CODE (type) == QUAL_UNION_TYPE) { /* For classes first merge in the field of the subclasses. */ - if (TYPE_BINFO (type) && BINFO_BASE_BINFOS (TYPE_BINFO (type))) + if (TYPE_BINFO (type)) { - tree bases = BINFO_BASE_BINFOS (TYPE_BINFO (type)); - int n_bases = BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); + tree binfo, base_binfo; int i; - for (i = 0; i < n_bases; ++i) + for (binfo = TYPE_BINFO (type), i = 0; + BINFO_BASE_ITERATE (binfo, i, base_binfo); i++) { - tree binfo = TREE_VEC_ELT (bases, i); int num; - int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8; - tree type = BINFO_TYPE (binfo); + int offset = tree_low_cst (BINFO_OFFSET (base_binfo), 0) * 8; + tree type = BINFO_TYPE (base_binfo); num = classify_argument (TYPE_MODE (type), type, subclasses, @@ -2816,20 +2814,15 @@ contains_128bit_aligned_vector_p (tree type) { tree field; - if (TYPE_BINFO (type) && BINFO_BASE_BINFOS (TYPE_BINFO (type))) + if (TYPE_BINFO (type)) { - tree bases = BINFO_BASE_BINFOS (TYPE_BINFO (type)); - int n_bases = BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); + tree binfo, base_binfo; int i; - for (i = 0; i < n_bases; ++i) - { - tree binfo = TREE_VEC_ELT (bases, i); - tree type = BINFO_TYPE (binfo); - - if (contains_128bit_aligned_vector_p (type)) - return true; - } + for (binfo = TYPE_BINFO (type), i = 0; + BINFO_BASE_ITERATE (binfo, i, base_binfo); i++) + if (contains_128bit_aligned_vector_p (BINFO_TYPE (base_binfo))) + return true; } /* And now merge the fields of structure. */ for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field)) diff --git a/gcc/config/sh/symbian.c b/gcc/config/sh/symbian.c index 33ab711..0469c54 100644 --- a/gcc/config/sh/symbian.c +++ b/gcc/config/sh/symbian.c @@ -618,9 +618,10 @@ symbian_export_vtable_and_rtti_p (tree ctype) bool inline_ctor_dtor; bool dllimport_ctor_dtor; bool dllimport_member; - tree binfos; + tree binfo, base_binfo; tree methods; tree key; + int i; int len; /* Make sure that we are examining a class... */ @@ -729,20 +730,9 @@ symbian_export_vtable_and_rtti_p (tree ctype) #endif /* Now we must check and possibly export the base classes. */ - binfos = BINFO_BASE_BINFOS (TYPE_BINFO (ctype)); - len = BINFO_N_BASE_BINFOS (TYPE_BINFO (ctype)); - - for (; len --;) - { - tree base_binfo; - tree basetype; - - /* Figure out which base we're looking at. */ - base_binfo = TREE_VEC_ELT (binfos, len); - basetype = TREE_TYPE (base_binfo); - - symbian_possibly_export_base_class (basetype); - } + for (i = 0, binfo = TYPE_BINFO (ctype); + BINFO_BASE_ITERATE (binfo, i, base_binfo); i++) + symbian_possibly_export_base_class (BINFO_TYPE (base_binfo)); return true; } |