static const char *TAG_MSGSENDSUPER;
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];
int objc_receiver_context;
/* Tells "encode_pointer/encode_aggregate" whether we are generating
type descriptors for instance variables (as opposed to methods).
Type descriptors for instance variables contain more information
- than methods (for static typing and embedded structures). This
- was added to support features being planned for dbkit2. */
+ than methods (for static typing and embedded structures). */
static int generating_instance_variables = 0;
-/* Tells the compiler that this is a special run. Do not perform
- any compiling, instead we are to test some platform dependent
- features and output a C header file with appropriate definitions. */
+/* Tells the compiler that this is a special run. Do not perform any
+ compiling, instead we are to test some platform dependent features
+ and output a C header file with appropriate definitions. */
static int print_struct_values = 0;
-/* Some platforms pass small structures through registers versus through
- an invisible pointer. Determine at what size structure is the
- transition point between the two possibilities. */
+/* Some platforms pass small structures through registers versus
+ through an invisible pointer. Determine at what size structure is
+ the transition point between the two possibilities. */
static void
generate_struct_by_value_array ()
int aggregate_in_mem[32];
int found = 0;
- /* Presumably no platform passes 32 byte structures in a register. */
+ /* Presumably no platform passes 32 byte structures in a register. */
for (i = 1; i < 32; i++)
{
char buffer[5];
}
/* We found some structures that are returned in registers instead of memory
- so output the necessary data. */
+ so output the necessary data. */
if (found)
{
for (i = 31; i >= 0; i--)
static tree
lookup_protocol_in_reflist (rproto_list, lproto)
- tree rproto_list;
- tree lproto;
+ tree rproto_list;
+ tree lproto;
{
- tree rproto, p;
+ tree rproto, p;
- /* Make sure the protocol is supported by the object on the rhs. */
- if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE)
- {
- tree fnd = 0;
- for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto))
- {
- p = TREE_VALUE (rproto);
+ /* Make sure the protocol is supported by the object on the rhs. */
+ if (TREE_CODE (lproto) == PROTOCOL_INTERFACE_TYPE)
+ {
+ tree fnd = 0;
+ for (rproto = rproto_list; rproto; rproto = TREE_CHAIN (rproto))
+ {
+ p = TREE_VALUE (rproto);
- if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE)
- {
- if (lproto == p)
- fnd = lproto;
+ if (TREE_CODE (p) == PROTOCOL_INTERFACE_TYPE)
+ {
+ if (lproto == p)
+ fnd = lproto;
- else if (PROTOCOL_LIST (p))
- fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto);
- }
+ else if (PROTOCOL_LIST (p))
+ fnd = lookup_protocol_in_reflist (PROTOCOL_LIST (p), lproto);
+ }
- if (fnd)
- return fnd;
- }
- }
- else
- {
- ; /* An identifier...if we could not find a protocol. */
- }
+ if (fnd)
+ return fnd;
+ }
+ }
+ else
+ {
+ ; /* An identifier...if we could not find a protocol. */
+ }
- return 0;
+ return 0;
}
/* Return 1 if LHS and RHS are compatible types for assignment
return build_constructor (type, nreverse (initlist));
}
-/* Push forward-declarations of all the categories
- so that init_def_list can use them in a CONSTRUCTOR. */
+/* Push forward-declarations of all the categories so that
+ init_def_list can use them in a CONSTRUCTOR. */
static void
forward_declare_categories ()
tree
get_class_reference (ident)
- tree ident;
+ tree ident;
{
if (flag_next_runtime)
{
}
static void
-generate_method_descriptors (protocol) /* generate_dispatch_tables */
- tree protocol;
+generate_method_descriptors (protocol)
+ tree protocol;
{
tree initlist, chain, method_list_template;
tree cast, variable_length_type;
int size;
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,
get_identifier (UTAG_METHOD_PROTOTYPE_LIST))),
ivar);
obstack_free (&util_obstack, util_firstobj);
- /* Set offset. */
+ /* Set offset. */
ivar = tree_cons (NULL_TREE, byte_position (field_decl), ivar);
initlist = tree_cons (NULL_TREE,
build_constructor (type, nreverse (ivar)),
tree selector, self_object, retval;
int statically_typed = 0, statically_allocated = 0;
- /* Determine receiver type. */
+ /* Determine receiver type. */
tree rtype = TREE_TYPE (receiver);
int super = IS_SUPER (rtype);
if (statically_allocated)
receiver = build_unary_op (ADDR_EXPR, receiver, 0);
- /* Don't evaluate the receiver twice. */
+ /* Don't evaluate the receiver twice. */
receiver = save_expr (receiver);
self_object = receiver;
}
chain = TREE_CHAIN (chain); /* next method... */
}
- return first;
+ return first;
}
/* Check whether the current interface (accessible via
tree subs = PROTOCOL_LIST (p);
tree super_class =
lookup_interface (CLASS_SUPER_NAME (implementation_template));
+
while (subs)
{
tree sub = TREE_VALUE (subs);
tree chain;
for (chain = protocol_chain; chain; chain = TREE_CHAIN (chain))
- {
- if (ident == PROTOCOL_NAME (chain))
- return chain;
- }
+ if (ident == PROTOCOL_NAME (chain))
+ return chain;
return NULL_TREE;
}
void
finish_protocol (protocol)
- tree protocol ATTRIBUTE_UNUSED;
+ tree protocol ATTRIBUTE_UNUSED;
{
}
{
tree name = TYPE_NAME (type);
- /* we have a reference; this is a NeXT extension. */
+ /* we have a reference; this is a NeXT extension. */
if (obstack_object_size (&util_obstack) - curtype == 1
&& format == OBJC_ENCODE_INLINE_DEFS)
{
- /* Output format of struct for first level only. */
+ /* Output format of struct for first level only. */
tree fields = TYPE_FIELDS (type);
if (name && TREE_CODE (name) == IDENTIFIER_NODE)
else
{
- /* We have an untagged structure or a typedef. */
+ /* We have an untagged structure or a typedef. */
obstack_1grow (&util_obstack, left);
obstack_1grow (&util_obstack, '?');
obstack_1grow (&util_obstack, right);
IDENTIFIER_POINTER (name),
strlen (IDENTIFIER_POINTER (name)));
else
- /* We have an untagged structure or a typedef. */
+ /* We have an untagged structure or a typedef. */
obstack_1grow (&util_obstack, '?');
obstack_1grow (&util_obstack, right);
tree super_name = CLASS_SUPER_NAME (implementation_template);
tree super_class;
- /* Barf if super used in a category of Object. */
+ /* Barf if super used in a category of Object. */
if (!super_name)
{
error ("no super class declared in interface for `%s'",
FILE *fp;
tree chain;
{
- char *buf = (char *)xmalloc (256);
+ char *buf = (char *) xmalloc (256);
const char *my_name = IDENTIFIER_POINTER (CLASS_NAME (chain));
tree ivar_decls = CLASS_RAW_IVARS (chain);
tree nst_methods = CLASS_NST_METHODS (chain);
gcc_obstack_init (&util_obstack);
util_firstobj = (char *) obstack_finish (&util_obstack);
- errbuf = (char *)xmalloc (BUFSIZE);
+ errbuf = (char *) xmalloc (BUFSIZE);
hash_init ();
synth_module_prologue ();
}
#endif
/* Process the static instances here because initialization of objc_symtab
- depends on them. */
+ depends on them. */
if (objc_static_instances)
generate_static_references ();
if (objc_implementation_context || class_names_chain || objc_static_instances
|| 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 ();
if (init_sym && targetm.have_ctors_dtors)
(* targetm.asm_out.constructor) (init_sym, DEFAULT_INIT_PRIORITY);
static void
generate_classref_translation_entry (chain)
- tree chain;
+ tree chain;
{
tree expr, name, decl_specs, decl, sc_spec;
tree type;
/* Do the same for categories. Even though no references to
these symbols are generated automatically by the compiler, it
- gives you a handle to pull them into an archive by hand. */
+ gives you a handle to pull them into an archive by hand. */
sprintf (string, "*%sobjc_category_name_%s_%s",
(flag_next_runtime ? "." : "__"), class_name, class_super_name);
}
\f
static void
ggc_mark_imp_list (arg)
- void *arg;
+ void *arg;
{
struct imp_entry *impent;
static void
ggc_mark_hash_table (arg)
- void *arg;
+ void *arg;
{
hash *hash_table = *(hash **)arg;
hash hst;