From: Ziemowit Laski Date: Thu, 2 Sep 2004 00:36:18 +0000 (+0000) Subject: c-parse.in (primary): Call objc_build_message_expr()... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57a6af27ed66c67241c101ba79b3f3b0c44a4867;p=gcc.git c-parse.in (primary): Call objc_build_message_expr()... [gcc/ChangeLog] 2004-09-01 Ziemowit Laski * c-parse.in (primary): Call objc_build_message_expr(), objc_build_selector_expr(), objc_build_protocol_expr(), objc_build_encode_expr() and objc_build_string_object() instead of build_message_expr(), build_selector_expr(), build_protocol_expr(), build_encode_expr() and build_objc_string_object(), respectively. (component_decl_list2): Call objc_get_class_ivars() instead of get_class_ivars_from_name(). (keyworddecl): Call objc_build_keyword_decl() instead of build_keyword_decl(). (receiver): Call objc_get_class_reference() instead of get_class_reference(). (reswords): Add blank line before @@ifobjc section, for clarity. [gcc/objc/ChangeLog] 2004-09-01 Ziemowit Laski * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of TYPE_NAME. (build_objc_string_object): Rename to objc_build_string_object(). (get_class_reference): Rename to objc_get_class_reference(). (get_class_ivars_from_name): Rename to objc_get_class_ivars(). (next_sjlj_build_catch_list, get_super_receiver): Call objc_get_class_reference() instead of get_class_reference(). (build_keyword_decl): Rename to objc_build_keyword_decl(). (build_message_expr): Rename to objc_build_message_expr(). (build_protocol_expr): Rename to objc_build_protocol_expr(). (build_selector_expr): Rename to objc_build_selector_expr(). (build_encode_expr): Rename to objc_build_encode_expr(). * objc-act.h (get_class_ivars_from_name): Rename prototype to objc_get_class_ivars(). (get_class_reference): Rename prototype to objc_get_class_reference(). (build_message_expr): Rename prototype to objc_build_message_expr(). (build_selector_expr): Rename prototype to objc_build_selector_expr(). (build_keyword_decl): Rename prototype to objc_build_keyword_decl(). (build_protocol_expr): Rename prototype to objc_build_prototype_expr(). (build_objc_string_object): Rename prototype to objc_build_string_object(). From-SVN: r86950 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79cf1bfb9b7..6ecbd2fb93c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2004-09-01 Ziemowit Laski + + * c-parse.in (primary): Call objc_build_message_expr(), + objc_build_selector_expr(), objc_build_protocol_expr(), + objc_build_encode_expr() and objc_build_string_object() instead of + build_message_expr(), build_selector_expr(), build_protocol_expr(), + build_encode_expr() and build_objc_string_object(), respectively. + (component_decl_list2): Call objc_get_class_ivars() instead of + get_class_ivars_from_name(). + (keyworddecl): Call objc_build_keyword_decl() instead of + build_keyword_decl(). + (receiver): Call objc_get_class_reference() instead of + get_class_reference(). + (reswords): Add blank line before @@ifobjc section, for clarity. + 2002-09-01 Fariborz Jahanian * config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Restrict alignment diff --git a/gcc/c-parse.in b/gcc/c-parse.in index f4d7a04b434..d45ff5e1371 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -744,19 +744,19 @@ primary: $$.original_code = ERROR_MARK; } @@ifobjc | objcmessageexpr - { $$.value = build_message_expr ($1); + { $$.value = objc_build_message_expr ($1); $$.original_code = ERROR_MARK; } | objcselectorexpr - { $$.value = build_selector_expr ($1); + { $$.value = objc_build_selector_expr ($1); $$.original_code = ERROR_MARK; } | objcprotocolexpr - { $$.value = build_protocol_expr ($1); + { $$.value = objc_build_protocol_expr ($1); $$.original_code = ERROR_MARK; } | objcencodeexpr - { $$.value = build_encode_expr ($1); + { $$.value = objc_build_encode_expr ($1); $$.original_code = ERROR_MARK; } | OBJC_STRING - { $$.value = build_objc_string_object ($1); + { $$.value = objc_build_string_object ($1); $$.original_code = ERROR_MARK; } @@end_ifobjc ; @@ -1808,7 +1808,7 @@ component_decl_list2: /* empty */ @@ifobjc /* foo(sizeof(struct{ @defs(ClassName)})); */ | AT_DEFS '(' CLASSNAME ')' - { $$ = nreverse (get_class_ivars_from_name ($3)); } + { $$ = nreverse (objc_get_class_ivars ($3)); } @@end_ifobjc ; @@ -3047,22 +3047,22 @@ reservedwords: keyworddecl: selector ':' '(' typename ')' identifier { - $$ = build_keyword_decl ($1, $4, $6); + $$ = objc_build_keyword_decl ($1, $4, $6); } | selector ':' identifier { - $$ = build_keyword_decl ($1, NULL_TREE, $3); + $$ = objc_build_keyword_decl ($1, NULL_TREE, $3); } | ':' '(' typename ')' identifier { - $$ = build_keyword_decl (NULL_TREE, $3, $5); + $$ = objc_build_keyword_decl (NULL_TREE, $3, $5); } | ':' identifier { - $$ = build_keyword_decl (NULL_TREE, NULL_TREE, $2); + $$ = objc_build_keyword_decl (NULL_TREE, NULL_TREE, $2); } ; @@ -3108,11 +3108,11 @@ receiver: { $$ = $1.value; } | CLASSNAME { - $$ = get_class_reference ($1); + $$ = objc_get_class_reference ($1); } | TYPENAME { - $$ = get_class_reference ($1); + $$ = objc_get_class_reference ($1); } ; @@ -3271,6 +3271,7 @@ static const struct resword reswords[] = { "void", RID_VOID, 0 }, { "volatile", RID_VOLATILE, 0 }, { "while", RID_WHILE, 0 }, + @@ifobjc { "id", RID_ID, D_OBJC }, diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 9c66aab3bb1..d6354d2cf54 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,27 @@ +2004-09-01 Ziemowit Laski + + * objc-act.c (objc_check_decl): Use OBJC_TYPE_NAME macro instead of + TYPE_NAME. + (build_objc_string_object): Rename to objc_build_string_object(). + (get_class_reference): Rename to objc_get_class_reference(). + (get_class_ivars_from_name): Rename to objc_get_class_ivars(). + (next_sjlj_build_catch_list, get_super_receiver): Call + objc_get_class_reference() instead of get_class_reference(). + (build_keyword_decl): Rename to objc_build_keyword_decl(). + (build_message_expr): Rename to objc_build_message_expr(). + (build_protocol_expr): Rename to objc_build_protocol_expr(). + (build_selector_expr): Rename to objc_build_selector_expr(). + (build_encode_expr): Rename to objc_build_encode_expr(). + * objc-act.h (get_class_ivars_from_name): Rename prototype to + objc_get_class_ivars(). + (get_class_reference): Rename prototype to objc_get_class_reference(). + (build_message_expr): Rename prototype to objc_build_message_expr(). + (build_selector_expr): Rename prototype to objc_build_selector_expr(). + (build_keyword_decl): Rename prototype to objc_build_keyword_decl(). + (build_protocol_expr): Rename prototype to objc_build_prototype_expr(). + (build_objc_string_object): Rename prototype to + objc_build_string_object(). + 2004-09-01 Ziemowit Laski * objc-act.c (lookup_interface): Make function 'static' and add a diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 798a0bd37b1..aefb4fb8198 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -961,7 +961,7 @@ objc_check_decl (tree decl) if (TREE_CODE (type) != RECORD_TYPE) return; - if (TYPE_NAME (type) && (type = objc_is_class_name (TYPE_NAME (type)))) + if (OBJC_TYPE_NAME (type) && (type = objc_is_class_name (OBJC_TYPE_NAME (type)))) error ("statically allocated instance of Objective-C class `%s'", IDENTIFIER_POINTER (type)); } @@ -1366,7 +1366,7 @@ my_build_string (int len, const char *str) NXConstantString class object. */ tree -build_objc_string_object (tree string) +objc_build_string_object (tree string) { tree initlist, constructor, constant_string_class; int length; @@ -2338,7 +2338,7 @@ add_class_reference (tree ident) reference variable. */ tree -get_class_reference (tree ident) +objc_get_class_reference (tree ident) { tree orig_ident; @@ -2586,7 +2586,7 @@ lookup_interface (tree ident) /* Implement @defs () within struct bodies. */ tree -get_class_ivars_from_name (tree class_name) +objc_get_class_ivars (tree class_name) { tree interface = lookup_interface (class_name); tree field, fields = NULL_TREE; @@ -2884,7 +2884,7 @@ next_sjlj_build_catch_list (void) else { args = tree_cons (NULL, cur_try_context->caught_decl, NULL); - t = get_class_reference (OBJC_TYPE_NAME (TREE_TYPE (type))); + t = objc_get_class_reference (OBJC_TYPE_NAME (TREE_TYPE (type))); args = tree_cons (NULL, t, args); t = build_function_call (objc_exception_match_decl, args); cond = lang_hooks.truthvalue_conversion (t); @@ -5309,7 +5309,7 @@ adjust_type_for_id_default (tree type) Out: an instance of "keyword_decl". */ tree -build_keyword_decl (tree key_name, tree arg_type, tree arg_name) +objc_build_keyword_decl (tree key_name, tree arg_type, tree arg_name) { tree keyword_decl; @@ -5503,7 +5503,7 @@ check_duplicates (hash hsh, int methods, int is_class) } /* If RECEIVER is a class reference, return the identifier node for - the referenced class. RECEIVER is created by get_class_reference, + the referenced class. RECEIVER is created by objc_get_class_reference, so we check the exact form created depending on which runtimes are used. */ @@ -5579,7 +5579,7 @@ objc_message_selector (void) (*((*)())_msgSuper)(receiver, selTransTbl[n], ...); */ tree -build_message_expr (tree mess) +objc_build_message_expr (tree mess) { tree receiver = TREE_PURPOSE (mess); tree sel_name; @@ -5656,7 +5656,7 @@ lookup_method_in_hash_lists (tree sel_name, int is_class) } /* The 'finish_message_expr' routine is called from within - 'build_message_expr' for non-template functions. In the case of + 'objc_build_message_expr' for non-template functions. In the case of C++ template functions, it is called from 'build_expr_from_tree' (in decl2.c) after RECEIVER and METHOD_PARAMS have been expanded. */ @@ -5950,7 +5950,7 @@ build_protocol_reference (tree p) /* This function is called by the parser when (and only when) a @protocol() expression is found, in order to compile it. */ tree -build_protocol_expr (tree protoname) +objc_build_protocol_expr (tree protoname) { tree expr; tree p = lookup_protocol (protoname); @@ -6022,7 +6022,7 @@ build_protocol_expr (tree protoname) is found, in order to compile it. It is only called by the parser and only to compile a @selector(). */ tree -build_selector_expr (tree selnamelist) +objc_build_selector_expr (tree selnamelist) { tree selname; @@ -6068,7 +6068,7 @@ build_selector_expr (tree selnamelist) } tree -build_encode_expr (tree type) +objc_build_encode_expr (tree type) { tree result; const char *string; @@ -7898,7 +7898,7 @@ get_super_receiver (void) if (flag_next_runtime && !flag_zero_link) { - super_class = get_class_reference (super_name); + super_class = objc_get_class_reference (super_name); if (TREE_CODE (objc_method_context) == CLASS_METHOD_DECL) /* If we are in a class method, we must retrieve the _metaclass_ for the current class, pointed at by diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 75507aef7af..d5d63141e93 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -54,18 +54,18 @@ tree add_instance_variable (tree, int, tree, tree, tree); tree objc_add_method (tree, tree, int); tree get_super_receiver (void); void objc_clear_super_receiver (void); -tree get_class_ivars_from_name (tree); -tree get_class_reference (tree); +tree objc_get_class_ivars (tree); +tree objc_get_class_reference (tree); tree get_static_reference (tree, tree); tree get_protocol_reference (tree); -tree build_message_expr (tree); +tree objc_build_message_expr (tree); tree finish_message_expr (tree, tree, tree); -tree build_selector_expr (tree); +tree objc_build_selector_expr (tree); tree build_ivar_reference (tree); -tree build_keyword_decl (tree, tree, tree); +tree objc_build_keyword_decl (tree, tree, tree); tree build_method_decl (enum tree_code, tree, tree, tree); -tree build_protocol_expr (tree); -tree build_objc_string_object (tree); +tree objc_build_protocol_expr (tree); +tree objc_build_string_object (tree); void objc_declare_alias (tree, tree); void objc_declare_class (tree); @@ -78,7 +78,7 @@ void objc_check_decl (tree); /* NeXT extensions */ -tree build_encode_expr (tree); +tree objc_build_encode_expr (tree); /* Objective-C structures */