Commit bc095846 by Ziemowit Laski Committed by Ziemowit Laski

c-common.h (lookup_interface): Remove prototype.

[gcc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* c-common.h (lookup_interface): Remove prototype.
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.
	(get_current_scope): Rename to objc_get_current_scope.
	* c-decl.c (get_current_scope): Rename to objc_get_current_scope.
	* c-parse.in (parmlist_or_identifiers_1): Get rid of unused variable.
	(yylexname): Call objc_is_class_name() instead of is_class_name().
	* c-typeck.c (build_external_ref): Call objc_lookup_ivar()
	instead of lookup_objc_ivar().
	* stub-objc.c (lookup_interface): Remove stub.
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.

[gcc/objc/ChangeLog]
2004-09-01  Ziemowit Laski  <zlaski@apple.com>

	* objc-act.c (lookup_interface): Make function 'static' and add a
	local prototype.
	(objc_check_decl, get_class_reference, objc_declare_alias,
	objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
	instead of is_class_name().
	(get_super_receiver, objc_clear_super_receiver): Call
	objc_get_current_scope() instead of get_current_scope().
	(is_class_name): Rename to objc_is_class_name.
	(lookup_objc_ivar): Rename to objc_lookup_ivar.

From-SVN: r86879
parent 45f366ab
2004-09-01 Ziemowit Laski <zlaski@apple.com>
* c-common.h (lookup_interface): Remove prototype.
(is_class_name): Rename to objc_is_class_name.
(lookup_objc_ivar): Rename to objc_lookup_ivar.
(get_current_scope): Rename to objc_get_current_scope.
* c-decl.c (get_current_scope): Rename to objc_get_current_scope.
* c-parse.in (parmlist_or_identifiers_1): Get rid of unused variable.
(yylexname): Call objc_is_class_name() instead of is_class_name().
* c-typeck.c (build_external_ref): Call objc_lookup_ivar()
instead of lookup_objc_ivar().
* stub-objc.c (lookup_interface): Remove stub.
(is_class_name): Rename to objc_is_class_name.
(lookup_objc_ivar): Rename to objc_lookup_ivar.
2004-08-31 Mark Mitchell <mark@codesourcery.com> 2004-08-31 Mark Mitchell <mark@codesourcery.com>
* config.gcc (arm*-*-symbianelf*): Do not include t-bpabi. * config.gcc (arm*-*-symbianelf*): Do not include t-bpabi.
......
...@@ -897,20 +897,19 @@ extern void c_parse_error (const char *, enum cpp_ttype, tree); ...@@ -897,20 +897,19 @@ extern void c_parse_error (const char *, enum cpp_ttype, tree);
/* The following ObjC/ObjC++ functions are called by the C and/or C++ /* The following ObjC/ObjC++ functions are called by the C and/or C++
front-ends; they all must have corresponding stubs in stub-objc.c. */ front-ends; they all must have corresponding stubs in stub-objc.c. */
extern tree lookup_interface (tree); extern tree objc_is_class_name (tree);
extern tree is_class_name (tree);
extern tree objc_is_object_ptr (tree); extern tree objc_is_object_ptr (tree);
extern void objc_check_decl (tree); extern void objc_check_decl (tree);
extern int objc_is_reserved_word (tree); extern int objc_is_reserved_word (tree);
extern int objc_comptypes (tree, tree, int); extern int objc_comptypes (tree, tree, int);
extern tree objc_message_selector (void); extern tree objc_message_selector (void);
extern tree lookup_objc_ivar (tree); extern tree objc_lookup_ivar (tree);
extern void objc_clear_super_receiver (void); extern void objc_clear_super_receiver (void);
extern int objc_is_public (tree, tree); extern int objc_is_public (tree, tree);
/* The following are provided by the C and C++ front-ends, and called by /* The following are provided by the C and C++ front-ends, and called by
ObjC/ObjC++. */ ObjC/ObjC++. */
extern void *get_current_scope (void); extern void *objc_get_current_scope (void);
extern void objc_mark_locals_volatile (void *); extern void objc_mark_locals_volatile (void *);
/* In c-ppoutput.c */ /* In c-ppoutput.c */
......
...@@ -533,7 +533,7 @@ c_finish_incomplete_decl (tree decl) ...@@ -533,7 +533,7 @@ c_finish_incomplete_decl (tree decl)
/* The Objective-C front-end often needs to determine the current scope. */ /* The Objective-C front-end often needs to determine the current scope. */
void * void *
get_current_scope (void) objc_get_current_scope (void)
{ {
return current_scope; return current_scope;
} }
......
...@@ -2601,8 +2601,7 @@ parmlist_or_identifiers: ...@@ -2601,8 +2601,7 @@ parmlist_or_identifiers:
parmlist_or_identifiers_1: parmlist_or_identifiers_1:
parmlist_1 parmlist_1
| identifiers ')' | identifiers ')'
{ tree t; { $$ = tree_cons (NULL_TREE, NULL_TREE, $1);
$$ = tree_cons (NULL_TREE, NULL_TREE, $1);
/* Make sure we have a parmlist after attributes. */ /* Make sure we have a parmlist after attributes. */
if ($<ttype>-1 != 0) if ($<ttype>-1 != 0)
...@@ -3516,7 +3515,7 @@ yylexname (void) ...@@ -3516,7 +3515,7 @@ yylexname (void)
@@ifobjc @@ifobjc
else else
{ {
tree objc_interface_decl = is_class_name (yylval.ttype); tree objc_interface_decl = objc_is_class_name (yylval.ttype);
/* ObjC class names are in the same namespace as variables and /* ObjC class names are in the same namespace as variables and
typedefs, and hence are shadowed by local declarations. */ typedefs, and hence are shadowed by local declarations. */
if (objc_interface_decl if (objc_interface_decl
......
...@@ -1715,7 +1715,7 @@ build_external_ref (tree id, int fun) ...@@ -1715,7 +1715,7 @@ build_external_ref (tree id, int fun)
{ {
tree ref; tree ref;
tree decl = lookup_name (id); tree decl = lookup_name (id);
tree objc_ivar = lookup_objc_ivar (id); tree objc_ivar = objc_lookup_ivar (id);
if (decl && decl != error_mark_node) if (decl && decl != error_mark_node)
{ {
......
2004-09-01 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (lookup_interface): Make function 'static' and add a
local prototype.
(objc_check_decl, get_class_reference, objc_declare_alias,
objc_declare_class, objc_is_object_ptr): Call objc_is_class_name()
instead of is_class_name().
(get_super_receiver, objc_clear_super_receiver): Call
objc_get_current_scope() instead of get_current_scope().
(is_class_name): Rename to objc_is_class_name.
(lookup_objc_ivar): Rename to objc_lookup_ivar.
2004-08-28 Ziemowit Laski <zlaski@apple.com> 2004-08-28 Ziemowit Laski <zlaski@apple.com>
* objc-act.c (objc_is_reserved_word): New function. * objc-act.c (objc_is_reserved_word): New function.
......
...@@ -132,7 +132,7 @@ static tree build_objc_method_call (int, tree, tree, tree, tree); ...@@ -132,7 +132,7 @@ static tree build_objc_method_call (int, tree, tree, tree, tree);
static void generate_strings (void); static void generate_strings (void);
static tree get_proto_encoding (tree); static tree get_proto_encoding (tree);
static void build_selector_translation_table (void); static void build_selector_translation_table (void);
static tree lookup_interface (tree);
static tree objc_add_static_instance (tree, tree); static tree objc_add_static_instance (tree, tree);
static void build_objc_exception_stuff (void); static void build_objc_exception_stuff (void);
...@@ -961,7 +961,7 @@ objc_check_decl (tree decl) ...@@ -961,7 +961,7 @@ objc_check_decl (tree decl)
if (TREE_CODE (type) != RECORD_TYPE) if (TREE_CODE (type) != RECORD_TYPE)
return; return;
if (TYPE_NAME (type) && (type = is_class_name (TYPE_NAME (type)))) if (TYPE_NAME (type) && (type = objc_is_class_name (TYPE_NAME (type))))
error ("statically allocated instance of Objective-C class `%s'", error ("statically allocated instance of Objective-C class `%s'",
IDENTIFIER_POINTER (type)); IDENTIFIER_POINTER (type));
} }
...@@ -2351,7 +2351,7 @@ get_class_reference (tree ident) ...@@ -2351,7 +2351,7 @@ get_class_reference (tree ident)
#endif #endif
orig_ident = ident; orig_ident = ident;
if (!(ident = is_class_name (ident))) if (!(ident = objc_is_class_name (ident)))
{ {
error ("`%s' is not an Objective-C class name or alias", error ("`%s' is not an Objective-C class name or alias",
IDENTIFIER_POINTER (orig_ident)); IDENTIFIER_POINTER (orig_ident));
...@@ -2468,9 +2468,9 @@ objc_declare_alias (tree alias_ident, tree class_ident) ...@@ -2468,9 +2468,9 @@ objc_declare_alias (tree alias_ident, tree class_ident)
} }
#endif /* OBJCPLUS */ #endif /* OBJCPLUS */
if (!(underlying_class = is_class_name (class_ident))) if (!(underlying_class = objc_is_class_name (class_ident)))
warning ("cannot find class `%s'", IDENTIFIER_POINTER (class_ident)); warning ("cannot find class `%s'", IDENTIFIER_POINTER (class_ident));
else if (is_class_name (alias_ident)) else if (objc_is_class_name (alias_ident))
warning ("class `%s' already exists", IDENTIFIER_POINTER (alias_ident)); warning ("class `%s' already exists", IDENTIFIER_POINTER (alias_ident));
else else
alias_chain = tree_cons (underlying_class, alias_ident, alias_chain); alias_chain = tree_cons (underlying_class, alias_ident, alias_chain);
...@@ -2490,7 +2490,7 @@ objc_declare_class (tree ident_list) ...@@ -2490,7 +2490,7 @@ objc_declare_class (tree ident_list)
{ {
tree ident = TREE_VALUE (list); tree ident = TREE_VALUE (list);
if (! is_class_name (ident)) if (! objc_is_class_name (ident))
{ {
tree record = lookup_name (ident); tree record = lookup_name (ident);
...@@ -2510,7 +2510,7 @@ objc_declare_class (tree ident_list) ...@@ -2510,7 +2510,7 @@ objc_declare_class (tree ident_list)
} }
tree tree
is_class_name (tree ident) objc_is_class_name (tree ident)
{ {
tree chain; tree chain;
...@@ -2563,10 +2563,10 @@ objc_is_object_ptr (tree type) ...@@ -2563,10 +2563,10 @@ objc_is_object_ptr (tree type)
&& (IS_ID (type) && (IS_ID (type)
|| TREE_TYPE (type) == TREE_TYPE (objc_class_type))) || TREE_TYPE (type) == TREE_TYPE (objc_class_type)))
return type; return type;
return is_class_name (OBJC_TYPE_NAME (TREE_TYPE (type))); return objc_is_class_name (OBJC_TYPE_NAME (TREE_TYPE (type)));
} }
tree static tree
lookup_interface (tree ident) lookup_interface (tree ident)
{ {
tree chain; tree chain;
...@@ -6766,7 +6766,7 @@ start_class (enum tree_code code, tree class_name, tree super_name, ...@@ -6766,7 +6766,7 @@ start_class (enum tree_code code, tree class_name, tree super_name,
CLASS_SUPER_NAME (class) = super_name; CLASS_SUPER_NAME (class) = super_name;
CLASS_CLS_METHODS (class) = NULL_TREE; CLASS_CLS_METHODS (class) = NULL_TREE;
if (! is_class_name (class_name) if (! objc_is_class_name (class_name)
&& (decl = lookup_name (class_name))) && (decl = lookup_name (class_name)))
{ {
error ("`%s' redeclared as different kind of symbol", error ("`%s' redeclared as different kind of symbol",
...@@ -7853,7 +7853,7 @@ get_super_receiver (void) ...@@ -7853,7 +7853,7 @@ get_super_receiver (void)
TREE_USED (UOBJC_SUPER_decl) = 1; TREE_USED (UOBJC_SUPER_decl) = 1;
DECL_ARTIFICIAL (UOBJC_SUPER_decl) = 1; DECL_ARTIFICIAL (UOBJC_SUPER_decl) = 1;
UOBJC_SUPER_scope = get_current_scope (); UOBJC_SUPER_scope = objc_get_current_scope ();
} }
/* Set receiver to self. */ /* Set receiver to self. */
...@@ -7951,7 +7951,7 @@ void ...@@ -7951,7 +7951,7 @@ void
objc_clear_super_receiver (void) objc_clear_super_receiver (void)
{ {
if (objc_method_context if (objc_method_context
&& UOBJC_SUPER_scope == get_current_scope ()) { && UOBJC_SUPER_scope == objc_get_current_scope ()) {
UOBJC_SUPER_decl = 0; UOBJC_SUPER_decl = 0;
UOBJC_SUPER_scope = 0; UOBJC_SUPER_scope = 0;
} }
...@@ -9053,7 +9053,7 @@ generate_objc_image_info (void) ...@@ -9053,7 +9053,7 @@ generate_objc_image_info (void)
/* Look up ID as an instance variable. */ /* Look up ID as an instance variable. */
tree tree
lookup_objc_ivar (tree id) objc_lookup_ivar (tree id)
{ {
tree decl; tree decl;
......
...@@ -28,13 +28,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -28,13 +28,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "c-common.h" #include "c-common.h"
tree tree
lookup_interface (tree ARG_UNUSED (arg)) objc_is_class_name (tree ARG_UNUSED (arg))
{
return 0;
}
tree
is_class_name (tree ARG_UNUSED (arg))
{ {
return 0; return 0;
} }
...@@ -46,7 +40,7 @@ objc_is_object_ptr (tree ARG_UNUSED (arg)) ...@@ -46,7 +40,7 @@ objc_is_object_ptr (tree ARG_UNUSED (arg))
} }
tree tree
lookup_objc_ivar (tree ARG_UNUSED (arg)) objc_lookup_ivar (tree ARG_UNUSED (arg))
{ {
return 0; return 0;
} }
......
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