diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-05 09:35:44 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-05 09:35:44 +0000 |
commit | 3cb98335f5a6d00604531c7874c897d91ac8a4d6 (patch) | |
tree | 345ee905cf45afd981c579fc9648f137846a592f /gcc/objc | |
parent | c55c343961e0eafc9ad8cac1e117c22d290eb6fa (diff) | |
download | ppe42-gcc-3cb98335f5a6d00604531c7874c897d91ac8a4d6.tar.gz ppe42-gcc-3cb98335f5a6d00604531c7874c897d91ac8a4d6.zip |
* c-tree.h (TYPE_ACTUAL_ARG_TYPES): Use TYPE_LANG_SLOT_1.
* dwarf2out.c (add_data_member_location_attribute): Check for
TREE_BINFO.
* tree.c (tree_node_kinds): Add "binfos".
(binfo_lang_slots): New.
(make_node_stat): Add TREE_BINFO.
(make_tree_binfo_stat): New.
(tree_node_structure): Add TREE_BINFO.
* tree.def (TREE_BINFO): New.
* tree.h (REC_OR_UNION_CHECK): Rename to ...
(RECORD_OR_UNION_CHECK): ... here.
(NOT_RECORD_OR_UNION_CHECK): New.
(TRE_VIA_VIRTUAL): Allow TREE_LIST or TREE_BINFO.
(TYPE_FIELDS, TYPE_METHODS, TYPE_VFIELD): Adjust for
RECORD_OR_UNION_CHECK.
(TYPE_BINFO): Use RECORD_OR_UNION_CHECK.
(TYPE_LANG_SLOT_1): New.
(BINFO_TYPE, BINFO_OFFSET, BINFO_VTABLE, BINFO_VIRTUALS,
BINFO_BASETYPES, TYPE_BINFO_BASETYPES, BINFO_VPTR_FIELD,
BINFO_BASEACCESSES, BINFO_INHERITANCE_CHAIN): Adjust.
(BINFO_ELTS): Remove.
(BINFO_LANG_SLOT): New.
(struct tree_binfo): New.
(binfo_lang_slots): Declare.
(enum tree_node_structure_enum): Add TS_BINFO.
(union tree_node): Add binfo.
(make_tree_binfo_stat): Declare.
(make_tree_binfo): New.
(enum tree_node_kind): Add binfo_kind.
* cp/call.c (enforce_access): Expect TREE_BINFO.
* cp/class.c (binfo_ctor_vtable): Check TREE_BINFO.
* cp/cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
(BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
Adjust.
(BINFO_LANG_ELTS): Remove.
(BINFO_LANG_SLOTS): New.
(TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
(CLASSTYPE_TEMPLATE_INFO): Adjust.
* cp/pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
* cp/search.c (lookup_member): Check TREE_BINFO.
* cp/semantics.c (perform_or_defer_access_check): Likewise.
(check_accessibility_of_qualified_id): Check
deferred_access_no_check.
* cp/tree.c (make_binfo): Use make_tree_binfo.
* java/class.c (make_class): Use make_tree_binfo.
(set_super_info, add_interface_do): Likewise.
* java/java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
* objc/objc-act.c (start_class, objc_declare_protocols,
start_protocols): Use TYPE_LANG_SLOT_1.
* objc/objc-act.h (CLASS_BINFO_ELTS, PROTOCOL_BINFO_ELTS): Rename
to ...
(CLASS_LANG_SLOT_ELTS, PROTOCOL_LANG_SLOT_ELTS): ... here.
(CLASS_IVARS, CLASS_RAW_IVARS, CLASS_STATIC_TEMPLATE,
CLASS_CATEGORY_LIST, CLASS_PROTOCOL_LIST, CLASS_OWN_IVARS,
PROTOCOL_LIST, PROTOCOL_FORWARD_DECL): Use TYPE_LANG_SLOT_1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 7 | ||||
-rw-r--r-- | gcc/objc/objc-act.h | 20 |
2 files changed, 14 insertions, 13 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 2ecd03000f4..4526e1845ce 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -6761,7 +6761,7 @@ start_class (enum tree_code code, tree class_name, tree super_name, } class = make_node (code); - TYPE_BINFO (class) = make_tree_vec (CLASS_BINFO_ELTS); + TYPE_LANG_SLOT_1 (class) = make_tree_vec (CLASS_LANG_SLOT_ELTS); CLASS_NAME (class) = class_name; CLASS_SUPER_NAME (class) = super_name; @@ -7050,7 +7050,8 @@ objc_declare_protocols (tree names) { tree protocol = make_node (PROTOCOL_INTERFACE_TYPE); - TYPE_BINFO (protocol) = make_tree_vec (2); + TYPE_LANG_SLOT_1 (protocol) + = make_tree_vec (PROTOCOL_LANG_SLOT_ELTS); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = NULL_TREE; add_protocol (protocol); @@ -7081,7 +7082,7 @@ start_protocol (enum tree_code code, tree name, tree list) if (!protocol) { protocol = make_node (code); - TYPE_BINFO (protocol) = make_tree_vec (2); + TYPE_LANG_SLOT_1 (protocol) = make_tree_vec (PROTOCOL_LANG_SLOT_ELTS); PROTOCOL_NAME (protocol) = name; PROTOCOL_LIST (protocol) = lookup_and_install_protocols (list); diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 2472bfe711f..dab0950c3f1 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -82,8 +82,8 @@ tree build_encode_expr (tree); /* Objective-C structures */ -#define CLASS_BINFO_ELTS 6 -#define PROTOCOL_BINFO_ELTS 2 +#define CLASS_LANG_SLOT_ELTS 6 +#define PROTOCOL_LANG_SLOT_ELTS 2 /* KEYWORD_DECL */ #define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name) @@ -101,19 +101,19 @@ tree build_encode_expr (tree); PROTOCOL_INTERFACE_TYPE */ #define CLASS_NAME(CLASS) ((CLASS)->type.name) #define CLASS_SUPER_NAME(CLASS) (TYPE_CHECK (CLASS)->type.context) -#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) -#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) +#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) +#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval) #define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval) -#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 2) -#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 3) -#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 4) -#define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 5) +#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2) +#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 3) +#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 4) +#define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 5) #define PROTOCOL_NAME(CLASS) ((CLASS)->type.name) -#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) +#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) #define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval) #define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval) -#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) +#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS) /* We need to distinguish TYPE_PROTOCOL_LISTs from TYPE_CONTEXTs, both of which are stored in the same accessor slot. */ |