+2004-09-01 Ziemowit Laski <zlaski@apple.com>
+
+ * 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 <fjahanian@apple.com>
* config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Restrict alignment
$$.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
;
@@ifobjc
/* foo(sizeof(struct{ @defs(ClassName)})); */
| AT_DEFS '(' CLASSNAME ')'
- { $$ = nreverse (get_class_ivars_from_name ($3)); }
+ { $$ = nreverse (objc_get_class_ivars ($3)); }
@@end_ifobjc
;
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);
}
;
{ $$ = $1.value; }
| CLASSNAME
{
- $$ = get_class_reference ($1);
+ $$ = objc_get_class_reference ($1);
}
| TYPENAME
{
- $$ = get_class_reference ($1);
+ $$ = objc_get_class_reference ($1);
}
;
{ "void", RID_VOID, 0 },
{ "volatile", RID_VOLATILE, 0 },
{ "while", RID_WHILE, 0 },
+
@@ifobjc
{ "id", RID_ID, D_OBJC },
+2004-09-01 Ziemowit Laski <zlaski@apple.com>
+
+ * 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 <zlaski@apple.com>
* objc-act.c (lookup_interface): Make function 'static' and add a
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));
}
NXConstantString class object. */
tree
-build_objc_string_object (tree string)
+objc_build_string_object (tree string)
{
tree initlist, constructor, constant_string_class;
int length;
reference variable. */
tree
-get_class_reference (tree ident)
+objc_get_class_reference (tree ident)
{
tree orig_ident;
/* Implement @defs (<classname>) 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;
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);
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;
}
/* 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. */
(*(<abstract_decl>(*)())_msgSuper)(receiver, selTransTbl[n], ...); */
tree
-build_message_expr (tree mess)
+objc_build_message_expr (tree mess)
{
tree receiver = TREE_PURPOSE (mess);
tree sel_name;
}
/* 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. */
/* 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);
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;
}
tree
-build_encode_expr (tree type)
+objc_build_encode_expr (tree type)
{
tree result;
const char *string;
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
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);
/* NeXT extensions */
-tree build_encode_expr (tree);
+tree objc_build_encode_expr (tree);
/* Objective-C structures */