Commit 4898423c by Ziemowit Laski Committed by Ziemowit Laski

c-parse.in (methoddef, [...]): Call objc_add_method() instead of add_method().

2003-10-14  Ziemowit Laski  <zlaski@apple.com>

        * c-parse.in (methoddef, methodproto): Call objc_add_method()
        instead of add_method().
        * objc/objc-act.c (objc_check_decl): Do not check for
        constant_string_type.
        (add_method): Rename to objc_add_method().
        (really_start_method): Call objc_add_method() instead of
        add_method().
        * objc/objc-act.h (add_method): Rename to objc_add_method().

From-SVN: r72506
parent e69166de
2003-10-14 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (methoddef, methodproto): Call objc_add_method()
instead of add_method().
* objc/objc-act.c (objc_check_decl): Do not check for
constant_string_type.
(add_method): Rename to objc_add_method().
(really_start_method): Call objc_add_method() instead of
add_method().
* objc/objc-act.h (add_method): Rename to objc_add_method().
2003-10-14 Ulrich Weigand <uweigand@de.ibm.com> 2003-10-14 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390-protos.h (s390_alc_comparison): Add prototype. * config/s390/s390-protos.h (s390_alc_comparison): Add prototype.
......
...@@ -2931,7 +2931,9 @@ methoddef: ...@@ -2931,7 +2931,9 @@ methoddef:
methoddecl methoddecl
{ {
objc_pq_context = 0; objc_pq_context = 0;
add_method (objc_implementation_context, $3, objc_inherit_code == CLASS_METHOD_DECL); objc_add_method (objc_implementation_context,
$3,
objc_inherit_code == CLASS_METHOD_DECL);
start_method_def ($3); start_method_def ($3);
} }
optarglist optarglist
...@@ -2969,7 +2971,9 @@ methodproto: ...@@ -2969,7 +2971,9 @@ methodproto:
{ {
/* Forget protocol qualifiers here. */ /* Forget protocol qualifiers here. */
objc_pq_context = 0; objc_pq_context = 0;
add_method (objc_interface_context, $3, objc_inherit_code == CLASS_METHOD_DECL); objc_add_method (objc_interface_context,
$3,
objc_inherit_code == CLASS_METHOD_DECL);
} }
semi_or_error semi_or_error
; ;
......
...@@ -947,10 +947,9 @@ objc_check_decl (tree decl) ...@@ -947,10 +947,9 @@ 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 = is_class_name (TYPE_NAME (type))))
&& type != constant_string_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));
} }
/* Implement static typing. At this point, we know we have an interface. */ /* Implement static typing. At this point, we know we have an interface. */
...@@ -6300,7 +6299,7 @@ add_method_to_hash_list (hash *hash_list, tree method) ...@@ -6300,7 +6299,7 @@ add_method_to_hash_list (hash *hash_list, tree method)
} }
tree tree
add_method (tree class, tree method, int is_class) objc_add_method (tree class, tree method, int is_class)
{ {
tree mth; tree mth;
...@@ -7815,8 +7814,8 @@ really_start_method (tree method, tree parmlist) ...@@ -7815,8 +7814,8 @@ really_start_method (tree method, tree parmlist)
CLASS_SUPER_NAME (objc_implementation_context)); CLASS_SUPER_NAME (objc_implementation_context));
if (interface) if (interface)
add_method (interface, copy_node (method), objc_add_method (interface, copy_node (method),
TREE_CODE (method) == CLASS_METHOD_DECL); TREE_CODE (method) == CLASS_METHOD_DECL);
} }
} }
} }
......
...@@ -54,7 +54,7 @@ tree is_ivar (tree, tree); ...@@ -54,7 +54,7 @@ tree is_ivar (tree, tree);
int is_private (tree); int is_private (tree);
int is_public (tree, tree); int is_public (tree, tree);
tree add_instance_variable (tree, int, tree, tree, tree); tree add_instance_variable (tree, int, tree, tree, tree);
tree add_method (tree, tree, int); tree objc_add_method (tree, tree, int);
tree get_super_receiver (void); tree get_super_receiver (void);
void objc_clear_super_receiver (void); void objc_clear_super_receiver (void);
tree get_class_ivars_from_name (tree); tree get_class_ivars_from_name (tree);
......
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