Commit 9105f671 by Neil Booth Committed by Neil Booth

objc-act.c (lang_init, [...]): Remove redundant code, assuming doing_objc_thang is true.

        * objc/objc-act.c (lang_init, finish_file, maybe_objc_comptypes,
        maybe_objc_check_decl, build_objc_string_object,
        objc_declare_alias, objc_declare_class, build_message_expr,
        build_protocol_expr, build_selector_expr, build_encode_expr,
        get_class_ivars, start_class, start_protocol): Remove
        redundant code, assuming doing_objc_thang is true.

From-SVN: r37866
parent 1f80ea95
2000-11-30 Neil Booth <neilb@earthling.net>
* objc/objc-act.c (lang_init, finish_file, maybe_objc_comptypes,
maybe_objc_check_decl, build_objc_string_object,
objc_declare_alias, objc_declare_class, build_message_expr,
build_protocol_expr, build_selector_expr, build_encode_expr,
get_class_ivars, start_class, start_protocol): Remove
redundant code, assuming doing_objc_thang is true.
2000-11-29 John David Anglin <dave@hiauly1.hia.nrc.ca> 2000-11-29 John David Anglin <dave@hiauly1.hia.nrc.ca>
* pa.c (restore_unscaled_index_insn_codes): Delete procedure. * pa.c (restore_unscaled_index_insn_codes): Delete procedure.
......
...@@ -736,8 +736,7 @@ lang_init () ...@@ -736,8 +736,7 @@ lang_init ()
objc_ellipsis_node = make_node (ERROR_MARK); objc_ellipsis_node = make_node (ERROR_MARK);
if (doing_objc_thang) init_objc ();
init_objc ();
if (print_struct_values) if (print_struct_values)
generate_struct_by_value_array (); generate_struct_by_value_array ();
...@@ -755,8 +754,7 @@ objc_fatal () ...@@ -755,8 +754,7 @@ objc_fatal ()
void void
finish_file () finish_file ()
{ {
if (doing_objc_thang) finish_objc (); /* Objective-C finalization */
finish_objc (); /* Objective-C finalization */
if (gen_declaration_file) if (gen_declaration_file)
fclose (gen_declaration_file); fclose (gen_declaration_file);
...@@ -851,9 +849,7 @@ maybe_objc_comptypes (lhs, rhs, reflexive) ...@@ -851,9 +849,7 @@ maybe_objc_comptypes (lhs, rhs, reflexive)
tree lhs, rhs; tree lhs, rhs;
int reflexive; int reflexive;
{ {
if (doing_objc_thang) return objc_comptypes (lhs, rhs, reflexive);
return objc_comptypes (lhs, rhs, reflexive);
return -1;
} }
static tree static tree
...@@ -1095,8 +1091,7 @@ void ...@@ -1095,8 +1091,7 @@ void
maybe_objc_check_decl (decl) maybe_objc_check_decl (decl)
tree decl; tree decl;
{ {
if (doing_objc_thang) objc_check_decl (decl);
objc_check_decl (decl);
} }
/* Implement static typing. At this point, we know we have an interface. */ /* Implement static typing. At this point, we know we have an interface. */
...@@ -1415,9 +1410,6 @@ build_objc_string_object (strings) ...@@ -1415,9 +1410,6 @@ build_objc_string_object (strings)
tree string, initlist, constructor; tree string, initlist, constructor;
int length; int length;
if (!doing_objc_thang)
objc_fatal ();
if (lookup_interface (constant_string_id) == NULL_TREE) if (lookup_interface (constant_string_id) == NULL_TREE)
{ {
error ("Cannot find interface declaration for `%s'", error ("Cannot find interface declaration for `%s'",
...@@ -2452,9 +2444,6 @@ objc_declare_alias (alias_ident, class_ident) ...@@ -2452,9 +2444,6 @@ objc_declare_alias (alias_ident, class_ident)
tree alias_ident; tree alias_ident;
tree class_ident; tree class_ident;
{ {
if (!doing_objc_thang)
objc_fatal ();
if (is_class_name (class_ident) != class_ident) if (is_class_name (class_ident) != class_ident)
warning ("Cannot find class `%s'", IDENTIFIER_POINTER (class_ident)); warning ("Cannot find class `%s'", IDENTIFIER_POINTER (class_ident));
else if (is_class_name (alias_ident)) else if (is_class_name (alias_ident))
...@@ -2469,9 +2458,6 @@ objc_declare_class (ident_list) ...@@ -2469,9 +2458,6 @@ objc_declare_class (ident_list)
{ {
tree list; tree list;
if (!doing_objc_thang)
objc_fatal ();
for (list = ident_list; list; list = TREE_CHAIN (list)) for (list = ident_list; list; list = TREE_CHAIN (list))
{ {
tree ident = TREE_VALUE (list); tree ident = TREE_VALUE (list);
...@@ -4942,9 +4928,6 @@ build_message_expr (mess) ...@@ -4942,9 +4928,6 @@ build_message_expr (mess)
/* 1 if this is sending to the superclass. */ /* 1 if this is sending to the superclass. */
int super; int super;
if (!doing_objc_thang)
objc_fatal ();
if (TREE_CODE (receiver) == ERROR_MARK) if (TREE_CODE (receiver) == ERROR_MARK)
return error_mark_node; return error_mark_node;
...@@ -5355,12 +5338,7 @@ build_protocol_expr (protoname) ...@@ -5355,12 +5338,7 @@ build_protocol_expr (protoname)
tree protoname; tree protoname;
{ {
tree expr; tree expr;
tree p; tree p = lookup_protocol (protoname);
if (!doing_objc_thang)
objc_fatal ();
p = lookup_protocol (protoname);
if (!p) if (!p)
{ {
...@@ -5385,9 +5363,6 @@ build_selector_expr (selnamelist) ...@@ -5385,9 +5363,6 @@ build_selector_expr (selnamelist)
{ {
tree selname; tree selname;
if (!doing_objc_thang)
objc_fatal ();
/* Obtain the full selector name. */ /* Obtain the full selector name. */
if (TREE_CODE (selnamelist) == IDENTIFIER_NODE) if (TREE_CODE (selnamelist) == IDENTIFIER_NODE)
/* A unary selector. */ /* A unary selector. */
...@@ -5410,9 +5385,6 @@ build_encode_expr (type) ...@@ -5410,9 +5385,6 @@ build_encode_expr (type)
tree result; tree result;
const char *string; const char *string;
if (!doing_objc_thang)
objc_fatal ();
encode_type (type, obstack_object_size (&util_obstack), encode_type (type, obstack_object_size (&util_obstack),
OBJC_ENCODE_INLINE_DEFS); OBJC_ENCODE_INLINE_DEFS);
obstack_1grow (&util_obstack, 0); /* null terminate string */ obstack_1grow (&util_obstack, 0); /* null terminate string */
...@@ -5935,9 +5907,6 @@ tree ...@@ -5935,9 +5907,6 @@ tree
get_class_ivars (interface) get_class_ivars (interface)
tree interface; tree interface;
{ {
if (!doing_objc_thang)
objc_fatal ();
return build_ivar_chain (interface, 1); return build_ivar_chain (interface, 1);
} }
...@@ -6138,9 +6107,6 @@ start_class (code, class_name, super_name, protocol_list) ...@@ -6138,9 +6107,6 @@ start_class (code, class_name, super_name, protocol_list)
{ {
tree class, decl; tree class, decl;
if (!doing_objc_thang)
objc_fatal ();
class = make_node (code); class = make_node (code);
TYPE_BINFO (class) = make_tree_vec (5); TYPE_BINFO (class) = make_tree_vec (5);
...@@ -6450,9 +6416,6 @@ start_protocol (code, name, list) ...@@ -6450,9 +6416,6 @@ start_protocol (code, name, list)
{ {
tree protocol; tree protocol;
if (!doing_objc_thang)
objc_fatal ();
/* This is as good a place as any. Need to invoke push_tag_toplevel. */ /* This is as good a place as any. Need to invoke push_tag_toplevel. */
if (!objc_protocol_template) if (!objc_protocol_template)
objc_protocol_template = build_protocol_template (); objc_protocol_template = build_protocol_template ();
......
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