Commit c6595ab5 authored by geoffk's avatar geoffk
Browse files

* objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking.

	(TYPE_PROTOCOL_LIST): Share use of type.context with C frontend.
	(SET_TYPE_PROTOCOL_LIST): New.
	* objc/objc-act.c (get_static_reference): Use SET_TYPE_PROTOCOL_LIST.
	(get_object_reference): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69364 138bc75d-0d04-0410-961f-82ee72b054a4
parent 59b4cc29
2003-07-14 Geoffrey Keating <geoffk@apple.com>
* objc/objc-act.h (CLASS_SUPER_NAME): Add a little typechecking.
(TYPE_PROTOCOL_LIST): Share use of type.context with C frontend.
(SET_TYPE_PROTOCOL_LIST): New.
* objc/objc-act.c (get_static_reference): Use SET_TYPE_PROTOCOL_LIST.
(get_object_reference): Likewise.
Mon Jul 14 23:14:28 CEST 2003 Jan Hubicka <jh@suse.cz>
 
* cfglayout.c (locator_file): Break out from ....
......
......@@ -939,7 +939,7 @@ get_static_reference (interface, protocols)
/* Look up protocols and install in lang specific list. Note
that the protocol list can have a different lifetime than T! */
TYPE_PROTOCOL_LIST (t) = lookup_and_install_protocols (protocols);
SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols));
/* This forces a new pointer type to be created later
(in build_pointer_type)...so that the new template
......@@ -988,7 +988,7 @@ get_object_reference (protocols)
TYPE_NEXT_VARIANT (m) = t;
/* Look up protocols...and install in lang specific list */
TYPE_PROTOCOL_LIST (t) = lookup_and_install_protocols (protocols);
SET_TYPE_PROTOCOL_LIST (t, lookup_and_install_protocols (protocols));
/* This forces a new pointer type to be created later
(in build_pointer_type)...so that the new template
......
......@@ -90,7 +90,7 @@ tree build_encode_expr PARAMS ((tree));
CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE,
PROTOCOL_INTERFACE_TYPE */
#define CLASS_NAME(CLASS) ((CLASS)->type.name)
#define CLASS_SUPER_NAME(CLASS) ((CLASS)->type.context)
#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_NST_METHODS(CLASS) ((CLASS)->type.minval)
......@@ -105,7 +105,11 @@ tree build_encode_expr PARAMS ((tree));
#define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1)
#define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS)
#define TYPE_PROTOCOL_LIST(TYPE) ((TYPE)->type.context)
#define TYPE_PROTOCOL_LIST(TYPE) \
((!TYPE_CHECK (TYPE)->type.context \
|| TREE_CODE ((TYPE)->type.context) == TRANSLATION_UNIT_DECL) \
? NULL_TREE : (TYPE)->type.context)
#define SET_TYPE_PROTOCOL_LIST(TYPE, P) (TYPE_CHECK (TYPE)->type.context = (P))
/* Set by `continue_class' and checked by `is_public'. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment