Commit Graph

78 Commits

Author SHA1 Message Date
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
890edadebf Update FSF address.
From-SVN: r9962
1995-06-15 07:54:32 -04:00
Richard Kenner
f7ca2fe71e (hack_method_prototype): Set DECL_CONTEXT of parms.
From-SVN: r9953
1995-06-14 17:32:36 -04:00
Richard Kenner
0763f3ab57 (build_module_descriptor, really_start_method): Pass extra parm to
start_function.

From-SVN: r9945
1995-06-14 08:08:06 -04:00
Richard Kenner
51900510d2 Numerous formatting changes.
(NULLT): Deleted; all uses changed to NULL_TREE.
(get_{static,object}_reference, objc_add_static_instance):
Use push_obstacks instead of saving obstacks manually.
(build_{selector,class}_reference_decl): Likewise.
(build_objc_string_decl, build_protocol_reference): Likewise.
(comp_{method,proto}_with_proto): Likewise.
(create_builtin_decl, synth_module_prologue): Set DECL_ARTIFICIAL for internal
objects.
(build_{selector,class}_reference_decl, add_objc_decls): Likewise.
(generate_objc_symtab_decl, build_module_descriptor): Likewise.
(build_protocol_reference): Likewise.
(build_objc_string_decl, synch_forward_declarations): Likewise.
Delete call to end_temporary_allocation.
(generate_static_references, generate_strings): Likewise.
(build_selector_translation_table, generate_category): Likewise.
(generate_{ivars,protocol}_list, build_protocol_reference): Likewise.
(build_objc_string_object): If next_runtime, put everything in
permanent obstack.
(objc_add_static_instance): Use build_decl instead of start_decl
and finish_decl_top_level.
(build_{class_reference,objc_string}_decl): Clear DECL_CONTEXT.
(start_class): Exit with FATAL_EXIT_CODE, not 1.
(add_objc_decls): Don't set DECL_IN_SYSTEM_HEADER.

From-SVN: r9764
1995-05-22 17:02:40 -04:00
Richard Kenner
9faa82d8c0 Fix typos in comments.
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Richard Kenner
0ad228e654 (start_method_def): Mark _self as possibly unused.
From-SVN: r9683
1995-05-14 11:38:31 -04:00
Richard Kenner
fc55cc66b2 (unused_list): New variable.
(build_tmp_function_decl): Call push_parm_decl with new format.
(start_class): Initialize unused_list.
(start_method_def): Call push_parm_decl with new format and mark _cmp as
possibly unused.

From-SVN: r9658
1995-05-12 15:54:00 -04:00
Doug Evans
f4f2475387 (*): Update calls to start_decl, finish_struct (pass NULLs for attributes).
From-SVN: r9528
1995-04-28 05:07:47 +00:00
Richard Kenner
4cb8c14b60 (OBJC_VERSION): Version 7.
(build_objc_string_object): Build a full declaration if not using the next
runtime.
(objc_add_static_instance): New function.
(init_module_descriptor): Add reference to static instances table.
(build_module_descriptor): Add field for static instances table.
(get_objc_string_decl): New function.
(generate_static_references): New function.
(finish_objc): Call generate_static_references if needed.

From-SVN: r9500
1995-04-26 19:18:37 -04:00
Richard Kenner
d8d27748c5 (build_module_descriptor, really_start_method): Pass new parm to
start_function.

From-SVN: r9150
1995-03-09 21:32:43 -05:00
Jason Merrill
2c5f4139a9 __attribute__ ((constructor))
From-SVN: r8747
1995-01-14 01:09:01 +00:00
Ian Lance Taylor
f76b9db287 Check target endianness at run time, not compile time
From-SVN: r8470
1994-11-16 21:10:09 +00:00
Richard Kenner
a2991183af (init_objc): Add missing casts to args of bcopy.
From-SVN: r8407
1994-11-10 15:07:16 -05:00
Richard Kenner
bab5e7d550 (lang_init): Ensure line number is 0, not -1.
From-SVN: r8406
1994-11-10 15:04:44 -05:00
Richard Kenner
627c097fdc (warn_with_method): Make arg int, not char.
From-SVN: r8148
1994-09-27 18:31:04 -04:00
Kresten Krab Thorup
4d4d7c0e7f (build_selector_translation_table): Reset current_function_decl after hack_function_prototype build it.
(build_selector_translation_table): Reset
current_function_decl after hack_function_prototype build it.
(build_module_descriptor): Return constructor name from functions
decl_rtl.

From-SVN: r7944
1994-08-19 15:36:22 +00:00
Jim Wilson
b1cf6cee09 (build_module_descriptor): Don't set DECL_EXTERNAL on
current_function_decl.

From-SVN: r7789
1994-07-21 15:13:24 -07:00
Kresten Krab Thorup
42cfe4cf3e incremented objc_version iff using gnu runtime.
From-SVN: r7623
1994-06-30 16:22:23 +00:00
Kresten Krab Thorup
5d0f30f711 objc-act.c (get_proto_encoding, [...]): New fucnctions.
* objc-act.c (get_proto_encoding, build_typed_selector_reference):
        New fucnctions. (UTAG_PROTOCOL): New define.
        (objc_selector_template, flag_typed_selectors): New variables.
        (objc_init): set flag_typed_selectors if -fgnu-runtime.
        (synth_module_prologue): Change declaration of
        _OBJC_SELECTOR_TABLE when flag_typed_selectors is non-null.
        (build_module_descriptor): Make sure the generated constructor
        function is declared public.
        (build_selector): Only cast to SEL when not doing typed selectors.
        (build_selector_translation_table): Rewrite initialization.
        (build_tmp_function_decl): Make up new name when called, since it
        may now be called multiple times.
        (hack_method_prototype): Use init_function_start to reinit args
        machinery.  Also set current_function_decl before calling
        assign_parms.
        (generate_protocols):  Don't generate encoding twice.
        (build_selector_template): New function.
        (build_method_list_template): Generate (void*)0 as first element,
        not (int)0.
        (build_message_expr): move the call to build_selector_reference
        towards the end, where we have determined the function prototype.

From-SVN: r7620
1994-06-30 16:17:36 +00:00
Richard Kenner
415f766a65 (check_methods_accessible): Fix bug in -Wno-protocol.
(check_methods_accessible): Fix bug in -Wno-protocol.  Reset chain to
bottom class for each search.

From-SVN: r5927
1993-10-28 21:33:07 -04:00
Kresten Krab Thorup
30c0e2df8c (offset_is_register): New variable
(offset_is_register): New variable
        (forwarding_offset): Use apply_args_register_offset to get
        register offset.
        (encode_method_def, encode_method_prototype): Prepend argument
        offset by '+' if passed in register.
        (apply_args_register_offset): Added declaration.
(generate_method_descriptors, generate_ivar_lists,
        generate_dispatch_tables): Reorganized use of constructors.
        (build_descriptor_table_initializer, build_ivar_list_initializer,
        build_dispatch_table_initializer): Removed argument `int *size'.

From-SVN: r5199
1993-08-24 09:56:48 +00:00
Per Bothner
6b3cf8c6c4 (build_module_descriptor): Use new function get_file_function_name.
From-SVN: r5137
1993-08-11 19:45:47 -07:00
Richard Stallman
89ef104634 Call default_conversion for NAME.
(build_shared_structure_initializer):
Call default_conversion for NAME.
(add_objc_string): Make an ADDR_EXPR to return.
(init_objc_symtab): Make ADDR_EXPR for UOBJC_SELECTOR_TABLE_decl.

Build all CONSTRUCTORs with types.
(build_constructor): New function.  All CONSTRUCTOR builds changed.
(init_def_list, init_objc_symtab): New arg TYPE.
(init_module_descriptor): Likewise.
(init_objc_symtab): Pass TYPE arg to init_def_list.
(generate_objc_symtab_decl): Pass TYPE arg to init_objc_symtab.
(build_module_descriptor): Pass TYPE arg to init_module_descriptor.
(build_descriptor_table_initializer): New arg TYPE.
(generate_method_descriptors): Pass TYPE arg to
build_descriptor_table_initializer.
(generate_protocols): Pass TYPE arg to build_protocol_initializer.
(uild_protocol_initializer): New arg TYPE.
(build_ivar_list_initializer): New arg TYPE.
(generate_ivar_lists): Pass TYPE arg to build_ivar_list_initializer.
(build_dispatch_table_initializer): New arg TYPE.
(generate_dispatch_tables): Pass TYPE arg to
build_dispatch_table_initializer.
(build_category_initializer): New arg TYPE.
(build_shared_structure_initializer): New arg TYPE.
(generate_category): Pass TYPE arg to build_category_initializer.
(generate_shared_structures): Pass TYPE arg to
build_shared_structure_initializer.

From-SVN: r5049
1993-08-01 05:53:52 +00:00
Richard Stallman
081be30bbf (synth_module_prologue): Call layout_type for the array
type used for _OBJC_SELECTOR_TABLE.

From-SVN: r4932
1993-07-18 05:29:38 +00:00
Richard Stallman
2a73b0b200 (encode_type_qualifiers): Add casts to enums in indices.
From-SVN: r4844
1993-07-05 21:16:10 +00:00
Richard Stallman
e287a52ca0 (encode_type): Add cases for DImode, encoded as 'q' and 'Q' respectively.
From-SVN: r4643
1993-06-06 22:55:40 +00:00
Richard Stallman
b0bdbfb34f *** empty log message ***
From-SVN: r4511
1993-05-20 03:13:00 +00:00
Richard Stallman
4f52d29057 (handle_class_ref): Call assemble_constant_align before output_constant.
From-SVN: r4510
1993-05-20 03:11:40 +00:00
Richard Stallman
6b7e6ce457 (string_section): Delete comma before close-brace.
From-SVN: r4392
1993-05-09 04:52:03 +00:00
Richard Stallman
b54b3fb023 (OBJC_GEN_METHOD_LABEL): Do use CAT_NAME.
From-SVN: r4364
1993-05-06 17:39:52 +00:00
Richard Stallman
266dd51787 (check_methods_accessible): Handle interface types.
From-SVN: r4357
1993-05-06 15:59:25 +00:00
Tom Wood
a878dab7ef (build_ivar_reference): Warn when a class method
refers to an instance variable.

From-SVN: r4294
1993-05-01 10:48:31 +00:00
Richard Kenner
963342adbf (HASHFUNCTION): Cast pointers to widest int type.
From-SVN: r4205
1993-04-24 11:14:44 -04:00
Tom Wood
392202b07d *** empty log message ***
From-SVN: r4192
1993-04-22 11:48:29 +00:00
Tom Wood
59ce3fc81a (IS_ID, IS_PROTOCOL_QUALIFIED_ID, IS_SUPER): New type checking macros.
(IS_ID, IS_PROTOCOL_QUALIFIED_ID, IS_SUPER): New type
        checking macros.
        (objc_comptypes, build_message_expr, gen_declspecs): Use them.
(IS_ID, IS_PROTOCOL_QUALIFIED_ID, IS_SUPER): New type
        checking macros.
        (objc_comptypes, build_message_expr, gen_declspecs): Use them.
(gen_declarator): Don't use strcpy's return value.
(build_message_expr): Allow any type that matches
        objc_class_type.
(get_class_reference): We already have a name.
(build_objc_string): Use TREE_SET_CODE instead of
        assigning to TREE_CODE.
        (build_objc_string_object): Ditto.

From-SVN: r4158
1993-04-15 17:27:29 +00:00
Tom Wood
81e4c08f9f (maybe_objc_comptypes): Return 0 (incompatible) rather than 2 (similar enough) as the default.
(maybe_objc_comptypes): Return 0
        (incompatible) rather than 2 (similar enough) as the default.
        This was an inadvertent change in the Objective-C merge.

From-SVN: r4153
1993-04-14 17:32:18 +00:00
Tom Wood
7651f8f787 (get_class_reference): Call add_class_reference for
the GNU runtimes.

From-SVN: r4151
1993-04-14 16:08:43 +00:00
Kresten Krab Thorup
143dc6466f (-Wprotocol): added
(-Wprotocol): added
(flag_warn_protocol): New variable
(check_methods_accessible): New function
(check_protocol): Use check_methods or check_methods_accessible
depending on flag_warn_protocol to check protocol conformance.

(start_class): For class implementations Assign
SUPER_CLASS_NAME from interface specification if not present.

From-SVN: r4121
1993-04-13 12:57:23 +00:00
Tom Wood
ba2e27865b *** empty log message ***
From-SVN: r4112
1993-04-13 01:58:32 +00:00
Tom Wood
5fa63f2ada (get_static_reference, get_objcect_reference,
start_protocol): Make a tree vector for new protocol types.
	(start_class): The tree vector for class types is longer.

From-SVN: r4109
1993-04-12 23:52:10 +00:00
Tom Wood
e31c7eec77 *** empty log message ***
From-SVN: r4068
1993-04-09 23:12:37 +00:00
Mike Stump
d0d4af87cc Added front-end taggint to object files.
From-SVN: r3874
1993-03-25 08:51:26 +00:00
Richard Kenner
f005288757 (build_objc_method_call, get_class_reference):
Call assemble_external on anything we are about to generate a call to.
(get_super_receiver): Likewise.
(handle_class_ref): Put constant in readonly-data section, not text.
(build_objc_symtab_template): Correctly build index type for 0-length array.

From-SVN: r3734
1993-03-14 17:21:33 -05:00
Richard Stallman
7bbc643254 (OBJC_GEN_METHOD_LABEL): Convert colons to _'s.
Don't use the category name or the number.

From-SVN: r3691
1993-03-10 07:19:29 +00:00
Michael Meissner
c3c03e50c0 Close #ifdef NEXT_OBJC_RUNTIME properly.
From-SVN: r3687
1993-03-09 16:32:42 +00:00
Richard Stallman
187e4b0f22 (really_start_method): Always use OBJC_GEN_METHOD_LABEL.
Pass method_slot as additional arg.
(OBJC_GEN_METHOD_LABEL): Add default definition.

From-SVN: r3677
1993-03-08 21:17:33 +00:00
Richard Stallman
d33edda78e (handle_class_ref): Call assemble_external.
From-SVN: r3649
1993-03-04 21:20:14 +00:00
Richard Stallman
b16f586d98 (HASHFUNCTION): Insure nonnegative hash even if addresses are negative.
From-SVN: r3473
1993-02-15 07:18:09 +00:00
Richard Stallman
f79322f009 (init_objc): Use xrealoc, not realloc.
From-SVN: r3419
1993-02-03 23:23:22 +00:00