/* void *defs[cls_def_cnt + cat_def_cnt]; */
- index = build_index_type (build_int_2 (imp_count + cat_count - 1, 0));
+ index = build_index_type (build_int_2 (imp_count + cat_count - 1,
+ imp_count == 0 && cat_count == 0
+ ? -1 : 0));
field_decl = create_builtin_decl (FIELD_DECL,
build_array_type (ptr_type_node, index),
"defs");
{
method_params = tree_cons (NULLT, lookup_object,
tree_cons (NULLT, selector, method_params));
+ assemble_external (sender);
return build_function_call (sender, method_params);
}
else
This will do type checking using the arg types for this method. */
method_params = tree_cons (NULLT, lookup_object,
tree_cons (NULLT, selector, method_params));
+ assemble_external (sender);
retval = build_function_call (sender, method_params);
/* Restore SENDER's return/argument types. */
object = save_expr (object);
selector = save_expr (selector);
+ assemble_external (sender);
method
= build_function_call (sender,
tree_cons (NULLT, lookup_object,
= build_pointer_type (build_function_type (ptr_type_node, NULLT));
}
/* Pass the object to the method. */
+ assemble_external (method);
return build_function_call (method,
tree_cons (NULLT, object,
tree_cons (NULLT, selector,
my_build_string (IDENTIFIER_LENGTH (CLASS_NAME (interface)) + 1,
IDENTIFIER_POINTER (CLASS_NAME (interface))));
+ assemble_external (objc_getClass_decl);
return build_function_call (objc_getClass_decl, params);
}
\f
IDENTIFIER_POINTER (super_name)));
if (TREE_CODE (method_context) == INSTANCE_METHOD_DECL)
- funcCall = build_function_call (objc_getClass_decl, params);
+ {
+ assemble_external (objc_getClass_decl);
+ funcCall = build_function_call (objc_getClass_decl, params);
+ }
else
- funcCall = build_function_call (objc_getMetaClass_decl, params);
+ {
+ assemble_external (objc_getMetaClass_decl);
+ funcCall = build_function_call (objc_getMetaClass_decl, params);
+ }
/* cast! */
TREE_TYPE (funcCall) = TREE_TYPE (_clsSuper_ref);
rest_of_decl_compilation (decl, 0, 0, 0);
/* Make following constant read-only (why not)? */
- text_section ();
+ readonly_data_section ();
/* Inform the assembler about this new external thing. */
assemble_external (decl);