Commit ad074d60 by Stan Shebs Committed by Stan Shebs

* objc/objc-act.c: Apply various cosmetic and formatting changes.

From-SVN: r48365
parent 7f3ad6b6
2001-12-29 Stan Shebs <shebs@apple.com>
* objc/objc-act.c: Apply various cosmetic and formatting changes.
2001-12-29 Kazu Hirata <kazu@hxi.com> 2001-12-29 Kazu Hirata <kazu@hxi.com>
* config/rs6000/darwin-tramp.asm: Fix comment formatting. * config/rs6000/darwin-tramp.asm: Fix comment formatting.
......
...@@ -382,7 +382,7 @@ static const char *TAG_MSGSEND; ...@@ -382,7 +382,7 @@ static const char *TAG_MSGSEND;
static const char *TAG_MSGSENDSUPER; static const char *TAG_MSGSENDSUPER;
static const char *TAG_EXECCLASS; static const char *TAG_EXECCLASS;
/* The OCTI_... enumeration itself in in objc/objc-act.h. */ /* The OCTI_... enumeration itself is in objc/objc-act.h. */
tree objc_global_trees[OCTI_MAX]; tree objc_global_trees[OCTI_MAX];
int objc_receiver_context; int objc_receiver_context;
...@@ -437,20 +437,19 @@ int flag_warn_protocol = 1; ...@@ -437,20 +437,19 @@ int flag_warn_protocol = 1;
/* Tells "encode_pointer/encode_aggregate" whether we are generating /* Tells "encode_pointer/encode_aggregate" whether we are generating
type descriptors for instance variables (as opposed to methods). type descriptors for instance variables (as opposed to methods).
Type descriptors for instance variables contain more information Type descriptors for instance variables contain more information
than methods (for static typing and embedded structures). This than methods (for static typing and embedded structures). */
was added to support features being planned for dbkit2. */
static int generating_instance_variables = 0; static int generating_instance_variables = 0;
/* Tells the compiler that this is a special run. Do not perform /* Tells the compiler that this is a special run. Do not perform any
any compiling, instead we are to test some platform dependent compiling, instead we are to test some platform dependent features
features and output a C header file with appropriate definitions. */ and output a C header file with appropriate definitions. */
static int print_struct_values = 0; static int print_struct_values = 0;
/* Some platforms pass small structures through registers versus through /* Some platforms pass small structures through registers versus
an invisible pointer. Determine at what size structure is the through an invisible pointer. Determine at what size structure is
transition point between the two possibilities. */ the transition point between the two possibilities. */
static void static void
generate_struct_by_value_array () generate_struct_by_value_array ()
...@@ -1563,8 +1562,8 @@ init_objc_symtab (type) ...@@ -1563,8 +1562,8 @@ init_objc_symtab (type)
return build_constructor (type, nreverse (initlist)); return build_constructor (type, nreverse (initlist));
} }
/* Push forward-declarations of all the categories /* Push forward-declarations of all the categories so that
so that init_def_list can use them in a CONSTRUCTOR. */ init_def_list can use them in a CONSTRUCTOR. */
static void static void
forward_declare_categories () forward_declare_categories ()
...@@ -2829,7 +2828,7 @@ generate_descriptor_table (type, name, size, list, proto) ...@@ -2829,7 +2828,7 @@ generate_descriptor_table (type, name, size, list, proto)
} }
static void static void
generate_method_descriptors (protocol) /* generate_dispatch_tables */ generate_method_descriptors (protocol)
tree protocol; tree protocol;
{ {
tree initlist, chain, method_list_template; tree initlist, chain, method_list_template;
...@@ -2837,9 +2836,7 @@ generate_method_descriptors (protocol) /* generate_dispatch_tables */ ...@@ -2837,9 +2836,7 @@ generate_method_descriptors (protocol) /* generate_dispatch_tables */
int size; int size;
if (!objc_method_prototype_template) if (!objc_method_prototype_template)
{
objc_method_prototype_template = build_method_prototype_template (); objc_method_prototype_template = build_method_prototype_template ();
}
cast = build_tree_list (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE, cast = build_tree_list (build_tree_list (NULL_TREE, xref_tag (RECORD_TYPE,
get_identifier (UTAG_METHOD_PROTOTYPE_LIST))), get_identifier (UTAG_METHOD_PROTOTYPE_LIST))),
...@@ -5971,6 +5968,7 @@ check_protocol (p, type, name) ...@@ -5971,6 +5968,7 @@ check_protocol (p, type, name)
tree subs = PROTOCOL_LIST (p); tree subs = PROTOCOL_LIST (p);
tree super_class = tree super_class =
lookup_interface (CLASS_SUPER_NAME (implementation_template)); lookup_interface (CLASS_SUPER_NAME (implementation_template));
while (subs) while (subs)
{ {
tree sub = TREE_VALUE (subs); tree sub = TREE_VALUE (subs);
...@@ -6315,10 +6313,8 @@ lookup_protocol (ident) ...@@ -6315,10 +6313,8 @@ lookup_protocol (ident)
tree chain; tree chain;
for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain)) for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain))
{
if (ident == PROTOCOL_NAME (chain)) if (ident == PROTOCOL_NAME (chain))
return chain; return chain;
}
return NULL_TREE; return NULL_TREE;
} }
...@@ -7970,7 +7966,7 @@ dump_interface (fp, chain) ...@@ -7970,7 +7966,7 @@ dump_interface (fp, chain)
FILE *fp; FILE *fp;
tree chain; tree chain;
{ {
char *buf = (char *)xmalloc (256); char *buf = (char *) xmalloc (256);
const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain)); const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain));
tree ivar_decls = CLASS_RAW_IVARS (chain); tree ivar_decls = CLASS_RAW_IVARS (chain);
tree nst_methods = CLASS_NST_METHODS (chain); tree nst_methods = CLASS_NST_METHODS (chain);
...@@ -8099,7 +8095,7 @@ init_objc () ...@@ -8099,7 +8095,7 @@ init_objc ()
gcc_obstack_init (&util_obstack); gcc_obstack_init (&util_obstack);
util_firstobj = (char *) obstack_finish (&util_obstack); util_firstobj = (char *) obstack_finish (&util_obstack);
errbuf = (char *)xmalloc (BUFSIZE); errbuf = (char *) xmalloc (BUFSIZE);
hash_init (); hash_init ();
synth_module_prologue (); synth_module_prologue ();
} }
...@@ -8171,7 +8167,7 @@ finish_objc () ...@@ -8171,7 +8167,7 @@ finish_objc ()
if (objc_implementation_context || class_names_chain || objc_static_instances if (objc_implementation_context || class_names_chain || objc_static_instances
|| meth_var_names_chain || meth_var_types_chain || sel_ref_chain) || meth_var_names_chain || meth_var_types_chain || sel_ref_chain)
{ {
/* Arrange for Objc data structures to be initialized at run time. */ /* Arrange for ObjC data structures to be initialized at run time. */
rtx init_sym = build_module_descriptor (); rtx init_sym = build_module_descriptor ();
if (init_sym && targetm.have_ctors_dtors) if (init_sym && targetm.have_ctors_dtors)
(* targetm.asm_out.constructor) (init_sym, DEFAULT_INIT_PRIORITY); (* targetm.asm_out.constructor) (init_sym, DEFAULT_INIT_PRIORITY);
......
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