diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 925592634de..4100c8561a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2004-07-06 Nathan Sidwell + + * tree.h (TREE_VIA_VIRTUAL): Rename to ... + (BINFO_VIRTUAL_P): ... here. Require TREE_BINFO only. + (BINFO_MARKED, BINFO_FLAG_[16]): New binfo flags. + * dbxout.c (dbxout_type): Use BINFO_VIRTUAL_P. + * dwarf2out.c (add_data_member_location_attribute): Likewise. + (gen_inheritance_die): Likewise. + * tree-dump.c (deque_and_dump): Likewise. + * doc/c-tree.texi (Binfos): Add under reconstruction note. + 2004-07-06 Steven Bosscher * config/mcore/mcore.c (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE): diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a9dc8578333..ff63da14f45 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,41 @@ +2004-07-06 Nathan Sidwell + + * cp-tree.h (BINFO_MARKED): Remove. + (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED, + BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P, + BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n. + (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P. + * class.c (build_base_path): Use BINFO_VIRTUAL_P. + (mark_primary_bases, determine_primary_base, base_derived_from, + dfs_find_final_overrider, dfs_find_final_overrider_q, + dfs_find_inal_overrider_post, update_vtable_entry_for_fn, + dfs_modify_vtables, walk_subobject_offsets, + layout_nonempty_base_or_field, build_base_field, + build_base_fields, propagate_binfo_offsets, layout_virtual_bases, + end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable, + finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits, + build_ctor_vtbl_group, accumulate_vtble_inits, + dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries, + build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r, + add_vcall_offset_vtbl_entries_1): Likewise. + * decl.c (xref_basetypes): Incomming virtual base indicated by + TREE_TYPE. Adjust. + * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P. + * init.c (finish_init_stmts, sort_mem_initializers, + emit_mem_initializers, build_vtble_address, expand_member_init, + push_base_cleanups): Likewise. + * method.c (do_build_copy_constructor): Likewise. + * pt.c (instantiate_class_template, + get_template_base_recursive): Likewise. + * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init, + get_pseudo_ti_desc): Likewise. + * search.c (lookup_base_r, dynamic_cast_base_recurse, + binfo_from_vbase, binfo_via_virtual, copied_binfo, + original_binfo): Likewise. + * semantics.c (finish_base_specifier): Virtualness is indicated + by TREE_TYPE. + * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P. + 2004-07-06 Mark Mitchell Revert: diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 85f8864a206..f3ebb83ddb4 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -264,7 +264,7 @@ build_base_path (enum tree_code code, d_binfo = probe; if (is_empty_class (BINFO_TYPE (probe))) has_empty = true; - if (!v_binfo && TREE_VIA_VIRTUAL (probe)) + if (!v_binfo && BINFO_VIRTUAL_P (probe)) v_binfo = probe; } @@ -1257,7 +1257,7 @@ check_bases (tree t, basetype); } - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) /* A virtual base does not effect nearly emptiness. */ ; else if (CLASSTYPE_NEARLY_EMPTY_P (basetype)) @@ -1312,7 +1312,7 @@ mark_primary_bases (tree type) /* A virtual binfo might have been copied from within another hierarchy. As we're about to use it as a primary base, make sure the offsets match. */ - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) { tree delta = size_diffop (convert (ssizetype, BINFO_OFFSET (binfo)), @@ -1363,7 +1363,7 @@ determine_primary_base (tree t) { /* We prefer a non-virtual base, although a virtual one will do. */ - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) continue; if (!CLASSTYPE_HAS_PRIMARY_BASE_P (t)) @@ -1380,7 +1380,7 @@ determine_primary_base (tree t) vfields; vfields = TREE_CHAIN (vfields)) if (VF_BINFO_VALUE (vfields) == NULL_TREE - || ! TREE_VIA_VIRTUAL (VF_BINFO_VALUE (vfields))) + || ! BINFO_VIRTUAL_P (VF_BINFO_VALUE (vfields))) CLASSTYPE_VFIELDS (t) = tree_cons (base_binfo, VF_BASETYPE_VALUE (vfields), @@ -1444,7 +1444,7 @@ determine_primary_base (tree t) { tree basetype = BINFO_TYPE (base_binfo); - if (TREE_VIA_VIRTUAL (base_binfo) + if (BINFO_VIRTUAL_P (base_binfo) && CLASSTYPE_NEARLY_EMPTY_P (basetype)) { /* If this is not an indirect primary base, then it's @@ -1916,7 +1916,7 @@ base_derived_from (tree derived, tree base) { if (probe == derived) return true; - else if (TREE_VIA_VIRTUAL (probe)) + else if (BINFO_VIRTUAL_P (probe)) /* If we meet a virtual base, we can't follow the inheritance any more. See if the complete type of DERIVED contains such a virtual base. */ @@ -1959,7 +1959,7 @@ dfs_find_final_overrider (tree binfo, void* data) path = tree_cons (NULL_TREE, probe, path); if (same_type_p (BINFO_TYPE (probe), ffod->most_derived_type)) break; - if (TREE_VIA_VIRTUAL (probe)) + if (BINFO_VIRTUAL_P (probe)) { probe = TREE_VALUE (vpath); vpath = TREE_CHAIN (vpath); @@ -2008,7 +2008,7 @@ dfs_find_final_overrider_q (tree derived, int ix, void *data) tree binfo = BINFO_BASETYPE (derived, ix); find_final_overrider_data *ffod = (find_final_overrider_data *) data; - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) ffod->vpath = tree_cons (NULL_TREE, derived, ffod->vpath); return binfo; @@ -2019,7 +2019,7 @@ dfs_find_final_overrider_post (tree binfo, void *data) { find_final_overrider_data *ffod = (find_final_overrider_data *) data; - if (TREE_VIA_VIRTUAL (binfo) && TREE_CHAIN (ffod->vpath)) + if (BINFO_VIRTUAL_P (binfo) && TREE_CHAIN (ffod->vpath)) ffod->vpath = TREE_CHAIN (ffod->vpath); return NULL_TREE; @@ -2188,7 +2188,7 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, { /* We convert via virtual base. Find the virtual base and adjust the fixed offset to be from there. */ - while (!TREE_VIA_VIRTUAL (thunk_binfo)) + while (!BINFO_VIRTUAL_P (thunk_binfo)) thunk_binfo = BINFO_INHERITANCE_CHAIN (thunk_binfo); virtual_offset = thunk_binfo; @@ -2233,7 +2233,7 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, /* If we find a virtual base, and we haven't yet found the overrider, then there is a virtual base between the declaring base (first_defn) and the final overrider. */ - if (TREE_VIA_VIRTUAL (b)) + if (BINFO_VIRTUAL_P (b)) { virtual_base = b; break; @@ -2260,7 +2260,7 @@ update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals, while ((probe = get_primary_binfo (probe)) && (unsigned) list_length (BINFO_VIRTUALS (probe)) > ix) - if (TREE_VIA_VIRTUAL (probe)) + if (BINFO_VIRTUAL_P (probe)) virtual_base = probe; if (virtual_base) @@ -2309,7 +2309,7 @@ dfs_modify_vtables (tree binfo, void* data) primary base; we're not going to use that vtable anyhow. We do still need to do this for virtual primary bases, as they could become non-primary in a construction vtable. */ - (!BINFO_PRIMARY_P (binfo) || TREE_VIA_VIRTUAL (binfo)) + (!BINFO_PRIMARY_P (binfo) || BINFO_VIRTUAL_P (binfo)) /* Similarly, a base without a vtable needs no modification. */ && CLASSTYPE_VFIELDS (BINFO_TYPE (binfo))) { @@ -3273,11 +3273,11 @@ walk_subobject_offsets (tree type, binfo = BINFO_BASETYPE (type_binfo, i); if (abi_version_at_least (2) - && TREE_VIA_VIRTUAL (binfo)) + && BINFO_VIRTUAL_P (binfo)) continue; if (!vbases_p - && TREE_VIA_VIRTUAL (binfo) + && BINFO_VIRTUAL_P (binfo) && !BINFO_PRIMARY_P (binfo)) continue; @@ -3339,7 +3339,7 @@ walk_subobject_offsets (tree type, above.) */ tree vbase = get_primary_binfo (type_binfo); - if (vbase && TREE_VIA_VIRTUAL (vbase) + if (vbase && BINFO_VIRTUAL_P (vbase) && BINFO_PRIMARY_BASE_OF (vbase) == type_binfo) { r = (walk_subobject_offsets @@ -3517,7 +3517,7 @@ layout_nonempty_base_or_field (record_layout_info rli, break; /* G++ 3.2 did not check for overlaps when placing a non-empty virtual base. */ - if (!abi_version_at_least (2) && binfo && TREE_VIA_VIRTUAL (binfo)) + if (!abi_version_at_least (2) && binfo && BINFO_VIRTUAL_P (binfo)) break; if (layout_conflict_p (field_p ? type : binfo, offset, offsets, field_p)) @@ -3679,7 +3679,7 @@ build_base_field (record_layout_info rli, tree binfo, atend = layout_empty_base (binfo, eoc, offsets); /* A nearly-empty class "has no proper base class that is empty, not morally virtual, and at an offset other than zero." */ - if (!TREE_VIA_VIRTUAL (binfo) && CLASSTYPE_NEARLY_EMPTY_P (t)) + if (!BINFO_VIRTUAL_P (binfo) && CLASSTYPE_NEARLY_EMPTY_P (t)) { if (atend) CLASSTYPE_NEARLY_EMPTY_P (t) = 0; @@ -3757,7 +3757,7 @@ build_base_fields (record_layout_info rli, /* Virtual bases are added at the end (a primary virtual base will have already been added). */ - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) continue; next_field = build_base_field (rli, base_binfo, @@ -4387,7 +4387,7 @@ propagate_binfo_offsets (tree binfo, tree offset) } /* Skip virtual bases that aren't our canonical primary base. */ - if (TREE_VIA_VIRTUAL (base_binfo) + if (BINFO_VIRTUAL_P (base_binfo) && BINFO_PRIMARY_BASE_OF (base_binfo) != binfo) continue; @@ -4436,7 +4436,7 @@ layout_virtual_bases (record_layout_info rli, splay_tree offsets) allocated in inheritance graph order. */ for (vbase = TYPE_BINFO (t); vbase; vbase = TREE_CHAIN (vbase)) { - if (!TREE_VIA_VIRTUAL (vbase)) + if (!BINFO_VIRTUAL_P (vbase)) continue; if (!BINFO_PRIMARY_P (vbase)) @@ -4507,7 +4507,7 @@ end_of_class (tree t, int include_virtuals_p) binfo = BINFO_BASETYPE (TYPE_BINFO (t), i); if (!include_virtuals_p - && TREE_VIA_VIRTUAL (binfo) + && BINFO_VIRTUAL_P (binfo) && BINFO_PRIMARY_BASE_OF (binfo) != TYPE_BINFO (t)) continue; @@ -6257,7 +6257,7 @@ get_vfield_name (tree type) while (BINFO_BASETYPES (binfo) && TYPE_CONTAINS_VPTR_P (BINFO_TYPE (BINFO_BASETYPE (binfo, 0))) - && ! TREE_VIA_VIRTUAL (BINFO_BASETYPE (binfo, 0))) + && ! BINFO_VIRTUAL_P (BINFO_BASETYPE (binfo, 0))) binfo = BINFO_BASETYPE (binfo, 0); type = BINFO_TYPE (binfo); @@ -6525,7 +6525,7 @@ dump_class_hierarchy_r (FILE *stream, fprintf (stream, " empty"); else if (CLASSTYPE_NEARLY_EMPTY_P (BINFO_TYPE (binfo))) fprintf (stream, " nearly-empty"); - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) fprintf (stream, " virtual"); fprintf (stream, "\n"); @@ -6680,7 +6680,7 @@ dump_vtable (tree t, tree binfo, tree vtable) type_as_string (binfo, TFF_PLAIN_IDENTIFIER)); if (ctor_vtbl_p) { - if (!TREE_VIA_VIRTUAL (binfo)) + if (!BINFO_VIRTUAL_P (binfo)) fprintf (stream, " (0x%lx instance)", (unsigned long)binfo); fprintf (stream, " in %s", type_as_string (t, TFF_PLAIN_IDENTIFIER)); } @@ -6777,7 +6777,7 @@ finish_vtbls (tree t) /* Then come the virtual bases, also in inheritance graph order. */ for (vbase = TYPE_BINFO (t); vbase; vbase = TREE_CHAIN (vbase)) { - if (!TREE_VIA_VIRTUAL (vbase)) + if (!BINFO_VIRTUAL_P (vbase)) continue; accumulate_vtbl_inits (vbase, vbase, TYPE_BINFO (t), t, list); } @@ -6928,7 +6928,7 @@ build_vtt_inits (tree binfo, tree t, tree* inits, tree* index) for (i = 0; i < BINFO_N_BASETYPES (binfo); ++i) { b = BINFO_BASETYPE (binfo, i); - if (!TREE_VIA_VIRTUAL (b)) + if (!BINFO_VIRTUAL_P (b)) inits = build_vtt_inits (BINFO_BASETYPE (binfo, i), t, inits, index); } @@ -6967,7 +6967,7 @@ build_vtt_inits (tree binfo, tree t, tree* inits, tree* index) if (top_level_p) for (b = TYPE_BINFO (BINFO_TYPE (binfo)); b; b = TREE_CHAIN (b)) { - if (!TREE_VIA_VIRTUAL (b)) + if (!BINFO_VIRTUAL_P (b)) continue; inits = build_vtt_inits (b, t, inits, index); @@ -7016,7 +7016,7 @@ dfs_build_secondary_vptr_vtt_inits (tree binfo, void *data) return NULL_TREE; /* We're not interested in non-virtual primary bases. */ - if (!TREE_VIA_VIRTUAL (binfo) && BINFO_PRIMARY_P (binfo)) + if (!BINFO_VIRTUAL_P (binfo) && BINFO_PRIMARY_P (binfo)) return NULL_TREE; /* If BINFO has virtual bases or is reachable via a virtual path @@ -7036,7 +7036,7 @@ dfs_build_secondary_vptr_vtt_inits (tree binfo, void *data) TYPE_SIZE_UNIT (ptr_type_node)); /* Add the initializer for the secondary vptr itself. */ - if (top_level_p && TREE_VIA_VIRTUAL (binfo)) + if (top_level_p && BINFO_VIRTUAL_P (binfo)) { /* It's a primary virtual base, and this is not the construction vtable. Find the base this is primary of in the inheritance graph, @@ -7126,7 +7126,7 @@ build_ctor_vtbl_group (tree binfo, tree t) { tree b; - if (!TREE_VIA_VIRTUAL (vbase)) + if (!BINFO_VIRTUAL_P (vbase)) continue; b = copied_binfo (vbase, binfo); @@ -7196,7 +7196,7 @@ accumulate_vtbl_inits (tree binfo, tree base_binfo = BINFO_BASETYPE (binfo, i); /* Skip virtual bases. */ - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) continue; accumulate_vtbl_inits (base_binfo, BINFO_BASETYPE (orig_binfo, i), @@ -7220,7 +7220,7 @@ dfs_accumulate_vtbl_inits (tree binfo, int ctor_vtbl_p = !same_type_p (BINFO_TYPE (rtti_binfo), t); if (ctor_vtbl_p - && TREE_VIA_VIRTUAL (orig_binfo) && BINFO_PRIMARY_P (orig_binfo)) + && BINFO_VIRTUAL_P (orig_binfo) && BINFO_PRIMARY_P (orig_binfo)) { /* In the hierarchy of BINFO_TYPE (RTTI_BINFO), this is a primary virtual base. If it is not the same primary in @@ -7245,14 +7245,14 @@ dfs_accumulate_vtbl_inits (tree binfo, for (; b; b = BINFO_PRIMARY_BASE_OF (b)) { last = b; - if (TREE_VIA_VIRTUAL (b) || b == rtti_binfo) + if (BINFO_VIRTUAL_P (b) || b == rtti_binfo) break; } /* If we run out of primary links, keep looking down our inheritance chain; we might be an indirect primary. */ if (b == NULL_TREE) for (b = last; b; b = BINFO_INHERITANCE_CHAIN (b)) - if (TREE_VIA_VIRTUAL (b) || b == rtti_binfo) + if (BINFO_VIRTUAL_P (b) || b == rtti_binfo) break; /* If we found RTTI_BINFO, this is case 1. If we found a virtual @@ -7297,7 +7297,7 @@ dfs_accumulate_vtbl_inits (tree binfo, So, we make a TREE_LIST. Later, dfs_fixup_binfo_vtbls will straighten this out. */ BINFO_VTABLE (binfo) = tree_cons (rtti_binfo, vtbl, BINFO_VTABLE (binfo)); - else if (BINFO_PRIMARY_P (binfo) && TREE_VIA_VIRTUAL (binfo)) + else if (BINFO_PRIMARY_P (binfo) && BINFO_VIRTUAL_P (binfo)) inits = NULL_TREE; else /* For an ordinary vtable, set BINFO_VTABLE. */ @@ -7551,7 +7551,7 @@ build_vbase_offset_vtbl_entries (tree binfo, vtbl_init_data* vid) base (possibly multi-level) of vid->binfo, or we wouldn't have called build_vcall_and_vbase_vtbl_entries for it. But it might be a lost primary, so just skip down to vid->binfo. */ - if (TREE_VIA_VIRTUAL (non_primary_binfo)) + if (BINFO_VIRTUAL_P (non_primary_binfo)) { non_primary_binfo = vid->binfo; break; @@ -7571,7 +7571,7 @@ build_vbase_offset_vtbl_entries (tree binfo, vtbl_init_data* vid) tree b; tree delta; - if (!TREE_VIA_VIRTUAL (vbase)) + if (!BINFO_VIRTUAL_P (vbase)) continue; /* Find the instance of this virtual base in the complete @@ -7629,7 +7629,7 @@ build_vcall_offset_vtbl_entries (tree binfo, vtbl_init_data* vid) /* We only need these entries if this base is a virtual base. We compute the indices -- but do not add to the vtable -- when building the main vtable for a class. */ - if (TREE_VIA_VIRTUAL (binfo) || binfo == TYPE_BINFO (vid->derived)) + if (BINFO_VIRTUAL_P (binfo) || binfo == TYPE_BINFO (vid->derived)) { /* We need a vcall offset for each of the virtual functions in this vtable. For example: @@ -7652,7 +7652,7 @@ build_vcall_offset_vtbl_entries (tree binfo, vtbl_init_data* vid) vid->vbase = binfo; /* If we are just computing the vcall indices -- but do not need the actual entries -- not that. */ - if (!TREE_VIA_VIRTUAL (binfo)) + if (!BINFO_VIRTUAL_P (binfo)) vid->generate_vcall_entries = false; /* Now, walk through the non-virtual bases, adding vcall offsets. */ add_vcall_offset_vtbl_entries_r (binfo, vid); @@ -7671,7 +7671,7 @@ add_vcall_offset_vtbl_entries_r (tree binfo, vtbl_init_data* vid) virtual base for which we are building vcall offsets. Any primary virtual base will have already had its offsets generated through the recursion in build_vcall_and_vbase_vtbl_entries. */ - if (TREE_VIA_VIRTUAL (binfo) && vid->vbase != binfo) + if (BINFO_VIRTUAL_P (binfo) && vid->vbase != binfo) return; /* If BINFO has a primary base, process it first. */ @@ -7734,7 +7734,7 @@ add_vcall_offset_vtbl_entries_1 (tree binfo, vtbl_init_data* vid) base (possibly multi-level) of vid->binfo, or we wouldn't have called build_vcall_and_vbase_vtbl_entries for it. But it might be a lost primary, so just skip down to vid->binfo. */ - if (TREE_VIA_VIRTUAL (non_primary_binfo)) + if (BINFO_VIRTUAL_P (non_primary_binfo)) { if (non_primary_binfo != vid->vbase) abort (); diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 4ae4f449663..e1e89c882b4 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -31,12 +31,10 @@ Boston, MA 02111-1307, USA. */ #include "varray.h" #include "c-common.h" #include "name-lookup.h" - struct diagnostic_context; /* Usage of TREE_LANG_FLAG_?: - 0: BINFO_MARKED (BINFO nodes). - IDENTIFIER_MARKED (IDENTIFIER_NODEs) + 0: IDENTIFIER_MARKED (IDENTIFIER_NODEs) NEW_EXPR_USE_GLOBAL (in NEW_EXPR). DELETE_EXPR_USE_GLOBAL (in DELETE_EXPR). COMPOUND_EXPR_OVERLOADED (in COMPOUND_EXPR). @@ -57,24 +55,19 @@ struct diagnostic_context; (TREE_CALLS_NEW) (in _EXPR or _REF) (commented-out). TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P (in _TYPE). ICS_ELLIPSIS_FLAG (in _CONV) - BINFO_DEPENDENT_BASE_P (in BINFO) DECL_INITIALIZED_P (in VAR_DECL) 2: IDENTIFIER_OPNAME_P. TYPE_POLYMORPHIC_P (in _TYPE) ICS_THIS_FLAG (in _CONV) - BINFO_LOST_PRIMARY_P (in BINFO) DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (in VAR_DECL) STATEMENT_LIST_TRY_BLOCK (in STATEMENT_LIST) 3: TYPE_USES_VIRTUAL_BASECLASSES (in a class TYPE). - BINFO_VTABLE_PATH_MARKED. - BINFO_PUSHDECLS_MARKED. (TREE_REFERENCE_EXPR) (in NON_LVALUE_EXPR) (commented-out). ICS_BAD_FLAG (in _CONV) FN_TRY_BLOCK_P (in TRY_BLOCK) IDENTIFIER_CTOR_OR_DTOR_P (in IDENTIFIER_NODE) BIND_EXPR_BODY_BLOCK (in BIND_EXPR) - 4: BINFO_NEW_VTABLE_MARKED. - TREE_HAS_CONSTRUCTOR (in INDIRECT_REF, SAVE_EXPR, CONSTRUCTOR, + 4: TREE_HAS_CONSTRUCTOR (in INDIRECT_REF, SAVE_EXPR, CONSTRUCTOR, or FIELD_DECL). IDENTIFIER_TYPENAME_P (in IDENTIFIER_NODE) 5: C_IS_RESERVED_WORD (in IDENTIFIER_NODE) @@ -111,9 +104,6 @@ struct diagnostic_context; Usage of language-independent fields in a language-dependent manner: - TREE_USED - This field is BINFO_INDIRECT_PRIMARY_P in a BINFO. - TYPE_ALIAS_SET This field is used by TYPENAME_TYPEs, TEMPLATE_TYPE_PARMs, and so forth as a substitute for the mark bits provided in `lang_type'. @@ -1401,15 +1391,12 @@ struct lang_type GTY(()) tree.h, this pointer is described as pointing in other direction. The binfos of virtual bases are shared. */ -/* Nonzero means marked by DFS or BFS search. */ -#define BINFO_MARKED(NODE) TREE_LANG_FLAG_0 (NODE) - /* Nonzero means that this class is on a path leading to a new vtable. */ -#define BINFO_VTABLE_PATH_MARKED(NODE) TREE_LANG_FLAG_3 (NODE) +#define BINFO_VTABLE_PATH_MARKED(NODE) BINFO_FLAG_1 (NODE) /* Nonzero means B (a BINFO) has its own vtable. Any copies will not have this flag set. */ -#define BINFO_NEW_VTABLE_MARKED(B) (TREE_LANG_FLAG_4 (B)) +#define BINFO_NEW_VTABLE_MARKED(B) (BINFO_FLAG_2 (B)) /* Any subobject that needs a new vtable must have a vptr and must not be a non-virtual primary base (since it would then use the vtable from a @@ -1417,16 +1404,14 @@ struct lang_type GTY(()) #define SET_BINFO_NEW_VTABLE_MARKED(B) \ (BINFO_NEW_VTABLE_MARKED (B) = 1, \ my_friendly_assert (!BINFO_PRIMARY_P (B) \ - || TREE_VIA_VIRTUAL (B), 20000517), \ + || BINFO_VIRTUAL_P (B), 20000517), \ my_friendly_assert (CLASSTYPE_VFIELDS (BINFO_TYPE (B)) != NULL_TREE, \ 20000517)) /* Nonzero means this class has done dfs_pushdecls. */ #define BINFO_PUSHDECLS_MARKED(NODE) BINFO_VTABLE_PATH_MARKED (NODE) -/* Nonzero if this BINFO is a primary base class. Note, this can be - set for non-canonical virtual bases. For a virtual primary base - you might also need to check whether it is canonical. */ +/* Nonzero if this BINFO is a primary base class. */ #define BINFO_PRIMARY_P(NODE) \ (BINFO_PRIMARY_BASE_OF (NODE) != NULL_TREE) @@ -1451,17 +1436,17 @@ struct lang_type GTY(()) /* Nonzero if this binfo is for a dependent base - one that should not be searched. */ -#define BINFO_DEPENDENT_BASE_P(NODE) TREE_LANG_FLAG_1 (NODE) +#define BINFO_DEPENDENT_BASE_P(NODE) BINFO_FLAG_3 (NODE) /* Nonzero if this binfo has lost its primary base binfo (because that is a nearly-empty virtual base that has been taken by some other base in the complete hierarchy. */ -#define BINFO_LOST_PRIMARY_P(NODE) TREE_LANG_FLAG_2 (NODE) +#define BINFO_LOST_PRIMARY_P(NODE) BINFO_FLAG_4 (NODE) /* Nonzero if this binfo is an indirect primary base, i.e. a virtual base that is a primary base of some of other class in the hierarchy. */ -#define BINFO_INDIRECT_PRIMARY_P(NODE) TREE_USED (NODE) +#define BINFO_INDIRECT_PRIMARY_P(NODE) BINFO_FLAG_5 (NODE) /* Used by various search routines. */ #define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fbc7dd72890..2e4e1afd46b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -9033,9 +9033,9 @@ xref_tag_from_type (tree old, tree id, int globalize) /* REF is a type (named NAME), for which we have just seen some baseclasses. BASE_LIST is a list of those baseclasses; the TREE_PURPOSE is an access_* node, and the TREE_VALUE is the type of - the base-class. TREE_VIA_VIRTUAL indicates virtual - inheritance. CODE_TYPE_NODE indicates whether REF is a class, - struct, or union. */ + the base-class. Non-NULL TREE_TYPE indicates virtual inheritance. + CODE_TYPE_NODE indicates whether REF is a class, struct, or + union. */ void xref_basetypes (tree ref, tree base_list) @@ -9088,7 +9088,7 @@ xref_basetypes (tree ref, tree base_list) for (i = 0; base_list; base_list = TREE_CHAIN (base_list)) { tree access = TREE_PURPOSE (base_list); - int via_virtual = TREE_VIA_VIRTUAL (base_list); + int via_virtual = TREE_TYPE (base_list) != NULL_TREE; tree basetype = TREE_VALUE (base_list); tree base_binfo; @@ -9141,7 +9141,7 @@ xref_basetypes (tree ref, tree base_list) TREE_VEC_ELT (accesses, i) = access; /* This flag will be in the binfo of the base type, we must clear it after copying the base binfos. */ - TREE_VIA_VIRTUAL (base_binfo) = via_virtual; + BINFO_VIRTUAL_P (base_binfo) = via_virtual; SET_CLASSTYPE_MARKED (basetype); @@ -9211,7 +9211,7 @@ xref_basetypes (tree ref, tree base_list) CLEAR_CLASSTYPE_MARKED (basetype); if (CLASS_TYPE_P (basetype)) { - TREE_VIA_VIRTUAL (TYPE_BINFO (basetype)) = 0; + BINFO_VIRTUAL_P (TYPE_BINFO (basetype)) = 0; BINFO_DEPENDENT_BASE_P (TYPE_BINFO (basetype)) = 0; } } diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c index f765c32a6fb..f5cc1dde4ce 100644 --- a/gcc/cp/dump.c +++ b/gcc/cp/dump.c @@ -272,7 +272,7 @@ cp_dump_tree (void* dump_info, tree t) { tree base_binfo = BINFO_BASETYPE (TYPE_BINFO (t), i); dump_child ("base", BINFO_TYPE (base_binfo)); - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) dump_string (di, "virtual"); dump_access (di, base_binfo); } diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 1be01180426..19e51cdaaa2 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -101,7 +101,7 @@ finish_init_stmts (bool is_global, tree stmt_expr, tree compound_stmt) static tree dfs_initialize_vtbl_ptrs (tree binfo, void *data) { - if ((!BINFO_PRIMARY_P (binfo) || TREE_VIA_VIRTUAL (binfo)) + if ((!BINFO_PRIMARY_P (binfo) || BINFO_VIRTUAL_P (binfo)) && CLASSTYPE_VFIELDS (BINFO_TYPE (binfo))) { tree base_ptr = TREE_VALUE ((tree) data); @@ -478,7 +478,7 @@ sort_mem_initializers (tree t, tree mem_inits) for (i = 0; i < CLASSTYPE_N_BASECLASSES (t); ++i) { base = BINFO_BASETYPE (TYPE_BINFO (t), i); - if (!TREE_VIA_VIRTUAL (base)) + if (!BINFO_VIRTUAL_P (base)) sorted_inits = tree_cons (base, NULL_TREE, sorted_inits); } /* Process the non-static data members. */ @@ -677,7 +677,7 @@ emit_mem_initializers (tree mem_inits) arguments = NULL_TREE; /* Initialize the base. */ - if (TREE_VIA_VIRTUAL (subobject)) + if (BINFO_VIRTUAL_P (subobject)) construct_virtual_base (subobject, arguments); else { @@ -717,7 +717,7 @@ build_vtbl_address (tree binfo) tree binfo_for = binfo; tree vtbl; - if (BINFO_VPTR_INDEX (binfo) && TREE_VIA_VIRTUAL (binfo) + if (BINFO_VPTR_INDEX (binfo) && BINFO_VIRTUAL_P (binfo) && BINFO_PRIMARY_P (binfo)) /* If this is a virtual primary base, then the vtable we want to store is that for the base this is being used as the primary base of. We @@ -990,7 +990,7 @@ expand_member_init (tree name) } /* Look for a virtual base -- unless the direct base is itself virtual. */ - if (!direct_binfo || !TREE_VIA_VIRTUAL (direct_binfo)) + if (!direct_binfo || !BINFO_VIRTUAL_P (direct_binfo)) virtual_binfo = binfo_for_vbase (basetype, current_class_type); /* [class.base.init] @@ -2918,7 +2918,7 @@ push_base_cleanups (void) { tree base_binfo = TREE_VEC_ELT (binfos, i); if (TYPE_HAS_TRIVIAL_DESTRUCTOR (BINFO_TYPE (base_binfo)) - || TREE_VIA_VIRTUAL (base_binfo)) + || BINFO_VIRTUAL_P (base_binfo)) continue; expr = build_special_member_call (current_class_ref, diff --git a/gcc/cp/method.c b/gcc/cp/method.c index b7abe969b6c..436359b558c 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -542,7 +542,7 @@ do_build_copy_constructor (tree fndecl) for (i = 0; i < n_bases; ++i) { tree binfo = TREE_VEC_ELT (binfos, i); - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) continue; member_init_list diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 5a644b421a8..9ecec9878de 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5443,7 +5443,8 @@ instantiate_class_template (tree type) continue; base_list = tree_cons (access, base, base_list); - TREE_VIA_VIRTUAL (base_list) = TREE_VIA_VIRTUAL (pbase); + if (BINFO_VIRTUAL_P (pbase)) + TREE_TYPE (base_list) = integer_type_node; } /* The list is now in reverse order; correct that. */ @@ -9408,7 +9409,7 @@ get_template_base_recursive (tree tparms, continue; this_virtual = - (flags & GTB_VIA_VIRTUAL) || TREE_VIA_VIRTUAL (base_binfo); + (flags & GTB_VIA_VIRTUAL) || BINFO_VIRTUAL_P (base_binfo); /* When searching for a non-virtual, we cannot mark virtually found binfos. */ diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index b57de9d3973..559d594e48f 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -909,7 +909,7 @@ dfs_class_hint_mark (tree binfo, void *data) tree basetype = BINFO_TYPE (binfo); int *hint = (int *) data; - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) { if (CLASSTYPE_MARKED (basetype)) *hint |= 1; @@ -1062,7 +1062,7 @@ get_pseudo_ti_init (tree type, tree var_desc, bool *non_public_p) if (TREE_VEC_ELT (base_accesses, ix) == access_public_node) flags |= 2; tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo)); - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) { /* We store the vtable offset at which the virtual base offset can be found. */ @@ -1200,7 +1200,7 @@ get_pseudo_ti_desc (tree type) if (num_bases == 1 && TREE_VEC_ELT (base_accesses, 0) == access_public_node - && !TREE_VIA_VIRTUAL (base_binfo) + && !BINFO_VIRTUAL_P (base_binfo) && integer_zerop (BINFO_OFFSET (base_binfo))) /* single non-virtual public. */ return si_class_desc_type_node; diff --git a/gcc/cp/search.c b/gcc/cp/search.c index b28d7a22922..a3ab7c8173a 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -197,7 +197,7 @@ lookup_base_r (tree binfo, tree base, base_access access, bk = lookup_base_r (base_binfo, base, access, - is_virtual || TREE_VIA_VIRTUAL (base_binfo), + is_virtual || BINFO_VIRTUAL_P (base_binfo), binfo_ptr); switch (bk) @@ -376,7 +376,7 @@ dynamic_cast_base_recurse (tree subtype, tree binfo, bool is_via_virtual, continue; rval = dynamic_cast_base_recurse (subtype, base_binfo, - is_via_virtual || TREE_VIA_VIRTUAL (base_binfo), offset_ptr); + is_via_virtual || BINFO_VIRTUAL_P (base_binfo), offset_ptr); if (worst == -2) worst = rval; else if (rval >= 0) @@ -2493,7 +2493,7 @@ binfo_from_vbase (tree binfo) { for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo)) { - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) return binfo; } return NULL_TREE; @@ -2509,7 +2509,7 @@ binfo_via_virtual (tree binfo, tree limit) for (; binfo && (!limit || !same_type_p (BINFO_TYPE (binfo), limit)); binfo = BINFO_INHERITANCE_CHAIN (binfo)) { - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) return binfo; } return NULL_TREE; @@ -2524,7 +2524,7 @@ copied_binfo (tree binfo, tree here) { tree result = NULL_TREE; - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) { tree t; @@ -2588,7 +2588,7 @@ original_binfo (tree binfo, tree here) if (BINFO_TYPE (binfo) == BINFO_TYPE (here)) result = here; - else if (TREE_VIA_VIRTUAL (binfo)) + else if (BINFO_VIRTUAL_P (binfo)) result = (CLASSTYPE_VBASECLASSES (BINFO_TYPE (here)) ? binfo_for_vbase (BINFO_TYPE (binfo), BINFO_TYPE (here)) : NULL_TREE); diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 15cd946aa20..e7502260e4d 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2232,7 +2232,8 @@ finish_template_type (tree name, tree args, int entering_scope) Return a TREE_LIST containing the ACCESS_SPECIFIER and the BASE_CLASS, or NULL_TREE if an error occurred. The ACCESS_SPECIFIER is one of - access_{default,public,protected_private}[_virtual]_node.*/ + access_{default,public,protected_private}_node. For a virtual base + we set TREE_TYPE. */ tree finish_base_specifier (tree base, tree access, bool virtual_p) @@ -2254,7 +2255,8 @@ finish_base_specifier (tree base, tree access, bool virtual_p) base = TYPE_MAIN_VARIANT (base); } result = build_tree_list (access, base); - TREE_VIA_VIRTUAL (result) = virtual_p; + if (virtual_p) + TREE_TYPE (result) = integer_type_node; } return result; diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index c91164db75b..0863e29191d 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -612,7 +612,7 @@ copy_base_binfos (tree binfo, tree t, tree prev) BINFO_INHERITANCE_CHAIN (new_binfo) = binfo; BINFO_DEPENDENT_BASE_P (new_binfo) = 1; } - else if (TREE_VIA_VIRTUAL (base_binfo)) + else if (BINFO_VIRTUAL_P (base_binfo)) new_binfo = binfo_for_vbase (BINFO_TYPE (base_binfo), t); if (!new_binfo) @@ -621,10 +621,10 @@ copy_base_binfos (tree binfo, tree t, tree prev) base_binfo, NULL_TREE, BINFO_VIRTUALS (base_binfo)); prev = copy_base_binfos (new_binfo, t, prev); - if (TREE_VIA_VIRTUAL (base_binfo)) + if (BINFO_VIRTUAL_P (base_binfo)) { VEC_quick_push (tree, CLASSTYPE_VBASECLASSES (t), new_binfo); - TREE_VIA_VIRTUAL (new_binfo) = 1; + BINFO_VIRTUAL_P (new_binfo) = 1; BINFO_INHERITANCE_CHAIN (new_binfo) = TYPE_BINFO (t); } else diff --git a/gcc/dbxout.c b/gcc/dbxout.c index d0d9dda44a7..a8b47bad876 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1704,12 +1704,12 @@ dbxout_type (tree type, int full) if (use_gnu_debug_info_extensions) { have_used_extensions = 1; - putc (TREE_VIA_VIRTUAL (child) ? '1' : '0', asmfile); + putc (BINFO_VIRTUAL_P (child) ? '1' : '0', asmfile); putc (access == access_public_node ? '2' : (access == access_protected_node ? '1' :'0'), asmfile); CHARS (2); - if (TREE_VIA_VIRTUAL (child) + if (BINFO_VIRTUAL_P (child) && strcmp (lang_hooks.name, "GNU C++") == 0) /* For a virtual base, print the (negative) offset within the vtable where we must look to find the necessary diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi index 92e87aa4157..f25c8fb006a 100644 --- a/gcc/doc/c-tree.texi +++ b/gcc/doc/c-tree.texi @@ -747,6 +747,8 @@ list. Implicitly declared functions (including default constructors, copy constructors, assignment operators, and destructors) will appear on this list as well. +@c under reconstruction 2004-07-01, FIXME:Nathan Sidwell +[Binfos are being redesigned, this information is in a state of flux.] Every class has an associated @dfn{binfo}, which can be obtained with @code{TYPE_BINFO}. Binfos are used to represent base-classes. The binfo given by @code{TYPE_BINFO} is the degenerate case, whereby every diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f954b828e41..e1c8b75ea84 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -9471,7 +9471,7 @@ add_data_member_location_attribute (dw_die_ref die, tree decl) if (TREE_CODE (decl) == TREE_BINFO) { /* We're working on the TAG_inheritance for a base class. */ - if (TREE_VIA_VIRTUAL (decl) && is_cxx ()) + if (BINFO_VIRTUAL_P (decl) && is_cxx ()) { /* For C++ virtual bases we can't just use BINFO_OFFSET, as they aren't at a fixed offset from all (sub)objects of the same @@ -11860,7 +11860,7 @@ gen_inheritance_die (tree binfo, tree access, dw_die_ref context_die) add_type_attribute (die, BINFO_TYPE (binfo), 0, 0, context_die); add_data_member_location_attribute (die, binfo); - if (TREE_VIA_VIRTUAL (binfo)) + if (BINFO_VIRTUAL_P (binfo)) add_AT_unsigned (die, DW_AT_virtuality, DW_VIRTUALITY_virtual); if (access == access_public_node) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 671c865650f..bfe435d1aa1 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2004-07-06 Nathan Sidwell + + * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1. + * class.c (add_interface_do): Use BINFO_VIRTUAL_P. + 2004-07-05 Nathan Sidwell * class.c (make_class): Use make_tree_binfo. @@ -8167,7 +8172,7 @@ properly initialize `finished_label'. Don't emit gotos for empty try statements. -2000-03-19 Martin v. Löwis +2000-03-19 Martin v. Löwis * except.c (emit_handlers): Clear catch_clauses_last. diff --git a/gcc/java/class.c b/gcc/java/class.c index 1083efb1792..be4b3fdc920 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -616,7 +616,7 @@ add_interface_do (tree basetype_vec, tree interface_class, int i) BINFO_TYPE (interface_binfo) = interface_class; BINFO_OFFSET (interface_binfo) = integer_zero_node; BINFO_VPTR_FIELD (interface_binfo) = integer_zero_node; - TREE_VIA_VIRTUAL (interface_binfo) = 1; + BINFO_VIRTUAL_P (interface_binfo) = 1; TREE_VEC_ELT (basetype_vec, i) = interface_binfo; } diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index 792f2acceab..04a8f1f3e0f 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -48,8 +48,7 @@ struct JCF; SUPPRESS_UNREACHABLE_ERROR (for other _EXPR nodes) ANONYMOUS_CLASS_P (in RECORD_TYPE) ARG_FINAL_P (in TREE_LIST) - 1: CLASS_HAS_SUPER_FLAG (in TREE_BINFO). - IS_A_CLASSFILE_NAME (in IDENTIFIER_NODE) + 1: IS_A_CLASSFILE_NAME (in IDENTIFIER_NODE) COMPOUND_ASSIGN_P (in EXPR (binop_*)) LOCAL_CLASS_P (in RECORD_TYPE) BLOCK_IS_IMPLICIT (in BLOCK) @@ -122,7 +121,7 @@ struct JCF; /* True if the class whose TYPE_BINFO this is has a superclass. (True of all classes except Object.) */ -#define CLASS_HAS_SUPER_FLAG(BINFO) TREE_LANG_FLAG_1 (TREE_BINFO_CHECK (BINFO)) +#define CLASS_HAS_SUPER_FLAG(BINFO) BINFO_FLAG_1 (BINFO) #define CLASS_HAS_SUPER(TYPE) CLASS_HAS_SUPER_FLAG (TYPE_BINFO (TYPE)) /* Return the supertype of class TYPE, or NULL_TREE is it has none. */ diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index 2e945e46143..8ee8f4b5031 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -257,7 +257,7 @@ dequeue_and_dump (dump_info_p di) dump_child ("type", BINFO_TYPE (t)); - if (TREE_VIA_VIRTUAL (t)) + if (BINFO_VIRTUAL_P (t)) dump_string (di, "virt"); dump_int (di, "bases", n_bases); diff --git a/gcc/tree.h b/gcc/tree.h index d8fed6c61ed..51fc2ad66e5 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -203,7 +203,7 @@ struct tree_common GTY(()) TREE_STATIC in VAR_DECL, FUNCTION_DECL, CONSTRUCTOR, ADDR_EXPR TREE_VIA_VIRTUAL in - TREE_LIST or TREE_BINFO + TREE_BINFO TREE_CONSTANT_OVERFLOW in INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST TREE_SYMBOL_REFERENCED in @@ -738,11 +738,6 @@ extern void tree_operand_check_failed (int, enum tree_code, implicitly and should not lead to any sort of warning. */ #define TREE_NO_WARNING(NODE) ((NODE)->common.nowarning_flag) -/* Nonzero for a TREE_LIST or TREE_BINFO node means that the derivation - chain is via a `virtual' declaration. */ -#define TREE_VIA_VIRTUAL(NODE) \ - (TREE_CHECK2 (NODE, TREE_LIST, TREE_BINFO)->common.static_flag) - /* In an INTEGER_CST, REAL_CST, COMPLEX_CST, or VECTOR_CST this means there was an overflow in folding. This is distinct from TREE_OVERFLOW because ANSI C requires a diagnostic when overflows @@ -1597,6 +1592,20 @@ struct tree_type GTY(()) Thus, given a pointer to class C, one can get a pointer to the binfo of D acting as a basetype for C by looking at C's binfo's basetypes. */ +/* BINFO specific flags. */ + +/* Nonzero means that the derivation chain is via a `virtual' declaration. */ +#define BINFO_VIRTUAL_P(NODE) (TREE_BINFO_CHECK (NODE)->common.static_flag) + +/* Flags for language dependent use. */ +#define BINFO_MARKED(NODE) TREE_LANG_FLAG_0(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_1(NODE) TREE_LANG_FLAG_1(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_2(NODE) TREE_LANG_FLAG_2(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_3(NODE) TREE_LANG_FLAG_3(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_4(NODE) TREE_LANG_FLAG_4(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_5(NODE) TREE_LANG_FLAG_5(TREE_BINFO_CHECK(NODE)) +#define BINFO_FLAG_6(NODE) TREE_LANG_FLAG_6(TREE_BINFO_CHECK(NODE)) + /* The actual data type node being inherited in this basetype. */ #define BINFO_TYPE(NODE) TREE_TYPE (TREE_BINFO_CHECK(NODE))