Commit Graph

603 Commits

Author SHA1 Message Date
Jeffrey A Law
dc544d2c5e objc-act.c (encode_aggregate_within): Avoid GNU extensions in prototype and definition.
* objc/objc-act.c (encode_aggregate_within): Avoid GNU extensions
        in prototype and definition.

From-SVN: r19016
1998-04-05 19:05:12 -06:00
Jeff Law
e5e809f419 * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details.

        * haifa-sched.c: Mirror recent changes from gcc2.

From-SVN: r18984
1998-04-04 06:32:39 -07:00
Mike Stump
7cc348893e gthr.h: Support systems that don't have weak, but have threads.
* gthr.h: Support systems that don't have weak, but have threads.
        * configure.in (*wrs-vxworks*): Use VxWorks threads by default.
        * gthr-vxworks.h: New file.
        * objc/thr-vxworks.h: Dummy file from thr-single.c for now.

From-SVN: r18971
1998-04-02 16:15:06 -07:00
Jeffrey A Law
3ac2735b19 sendmsg.c (__objc_block_forward): Add braces for return value if INVISIBLE_STRUCT_RETURN.
* objc/sendmsg.c (__objc_block_forward): Add braces for return
        value if INVISIBLE_STRUCT_RETURN.

From-SVN: r18886
1998-03-28 16:47:41 -07:00
Martin v. Löwis
bc28965932 c-lang.c (lang_print_xnode): New function.
* c-lang.c (lang_print_xnode): New function.
	* objc/objc-act.c (lang_print_xnode): Likewise.
	* print-tree.c (print_node): Call it
	* com.c (lang_print_xnode): New function.

From-SVN: r18789
1998-03-23 16:04:47 -07:00
H.J. Lu
990ac8d730 c-parse.in: Recognize protocol qualifiers in class definitions for objc.
* c-parse.in: Recognize protocol qualifiers in class
        definitions for objc.
        Include "output.h".
        (yyerror): Remove redundant decl.
        (yyprint): Fix prototype.

From-SVN: r18788
1998-03-23 15:59:18 -07:00
Nick Clifton
35d541d4a8 Makefile.in: Various fixes for building cygwin32 native toolchains.
* objc/Makefile.in: Various fixes for building cygwin32 native toolchains.
        * objc/Make-lang.in: Likewise.

Co-Authored-By: Geoff Noer <noer@cygnus.com>

From-SVN: r18744
1998-03-21 16:49:21 -07:00
Kaveh R. Ghazi
5172371191 Fix warious warnings:
* c-aux-info.c: Include string.h/strings.h.
	* pa.c: Include stdlib.h.
	(pa_combine_instructions): Prototype the function.
	(pa_can_combine_p, forward_branch_p, shadd_constant_p): Likewise.
	(reloc_needed): Add default case for enumeration switch.
	(remove_useless_addtr_insns): Remove unused variable `all'.
	(hppa_expand_prologue): Add explicit braces to avoid
	ambiguous `else'.
	(output_function_epilogue): Remove unused variable `i'.
	(output_millicode_call): Remove unused variable `link'.
	(shadd_constant_p, forward_branch_p): Make the function static.
	(following_call): Explicitly declare to return int.
	(pa_reorg): Declare as void.
	(pa_combine_instructions): Declare as static void.  Add
	parentheses around && within ||.
	* pa.h: Add prototypes for pa_reorg, symbolic_operand,
	following_call, function_label_operand, lhs_lshift_cint_operand
	and zdepi_cint_p.
	* pa.md: Add parentheses around && within ||.
	* cppalloc.c: Include stdlib.h.
	* cpperror.c (cpp_print_containing_files): Remove unused variable
	`i'.  Fix format specifier in fprintf.
	* cse.c (cse_around_loop): Add explicit braces to avoid
	ambiguous `else'.
	(delete_dead_from_cse): Wrap variable `tem' in macro HAVE_cc0.
	* expr.c (expand_expr): Add parentheses around && within ||.
	* final.c (app_enable): Replace fprintf with fputs where there are
	no format specifiers and no trailing argument after the string.
	Eg, when printing ASM_APP_ON/ASM_APP_OFF.
	(app_disable): Likewise.
	(final_end_function): Likewise.
	(final_scan_insn): Likewise.  Remove unused variable `set'.
	(profile_function): Wrap empty if-statement body in {} brackets.
	* function.c: Include stdlib.h.
	(pad_below): Wrap prototype and definition in ARGS_GROW_DOWNWARD.
	(reposition_prologue_and_epilogue_notes): Add parentheses
	around assignment used as truth value.
	* integrate.c (expand_inline_function): Wrap variable
	`cc0_insn' in macro HAVE_cc0.
	* jump.c (jump_optimize): Wrap variable `q' in macro
	HAVE_cc0.  Remove unused variable `prev1'.
	* libgcc2.c (__bb_exit_trace_func): Add parentheses around &&
	within ||.  Fix format specifier in fprintf.
	(__bb_init_prg): Add parentheses around assignment used as
	truth value.
	* local-alloc.c: Include stdlib.h.
	(requires_inout): Add parentheses around assignment used
	as truth value.
	* loop.c (analyze_loop_iterations): Wrap prototype and definition
	in macro HAVE_decrement_and_branch_on_count.
	(insert_bct, instrument_loop_bct): Likewise.
	(move_movables): Add parentheses around assignment used as
	truth value.
	(consec_sets_invariant_p): Likewise.
	(maybe_eliminate_biv_1): Wrap variable `new' in macro HAVE_cc0.
	* objc/objc-act.c: Include stdlib.h.
	(lookup_method_in_protocol_list): Wrap empty else-statement body
	in braces.
	(lookup_protocol_in_reflist): Likewise.
	(objc_add_static_instance): Remove unused variables `decl_expr'
	and `decl_spec'.
	(get_objc_string_decl): Remove unused variable `decl'.
	(generate_static_references): Remove unused variables `idecl' and
	`instance'.
	(check_protocols): Wrap empty else-statement body in braces.
	* protoize.c: Include stdlib.h.
	(substr): Add parentheses around assignment used as truth value.
	(abspath): Likewise.
	(shortpath): Likewise.
	* regmove.c (fixup_match_1): Add parentheses around assignment
	used as truth value.
	* reload.c (push_secondary_reload): Remove unused variable `i'.
	(find_reloads): Add parentheses around assignment used as truth
	value.
	* reload1.c: Include stdlib.h.
	* rtl.h: Correct typo in prototype of offsettable_memref_p.
	* stmt.c (add_case_node): Add parentheses around assignment used
	as truth value.
	(case_tree2list): Likewise.
	* tree.c (valid_machine_attribute): Wrap variable `decl_attr_list'
	in macro VALID_MACHINE_DECL_ATTRIBUTE.  Wrap variable
	`type_attr_list' in macro VALID_MACHINE_TYPE_ATTRIBUTE.
	(merge_attributes): Add explicit braces to avoid ambiguous
	`else'.
	* unroll.c (copy_loop_body): Wrap variable `cc0_insn' in
	macro HAVE_cc0.
	* varasm.c: Include stdlib.h.

From-SVN: r18290
1998-02-28 07:06:53 +00:00
Richard Henderson
9c37957a85 * objc/Object.m (-error): Call objc_verror with our va_list.
From-SVN: r18167
1998-02-22 07:33:39 -08:00
Kaveh R. Ghazi
963f4057da Make-lang.in (objc.stage1): Depend on stage1-start.
* objc/Make-lang.in (objc.stage1): Depend on stage1-start.
        (objc.stage2, objc.stage3, objc.stage4): Likewise.

From-SVN: r17473
1998-01-25 04:29:50 -07:00
Jeff Law
406b9925fa Fix typo in yesterday's change.
From-SVN: r17438
1998-01-20 23:48:07 -07:00
Jeffrey A Law
27766f0efa Remove more bytecode stuff.
From-SVN: r17436
1998-01-20 10:02:10 -07:00
Jeff Law
2d608f3084 Rebuilt.
From-SVN: r17428
1998-01-20 00:22:47 -07:00
David T. McWherter
1e7b997ad1 * objc-parse.c: Recognize protocol qualifiers in class definitions.
From-SVN: r17389
1998-01-17 13:23:59 -07:00
Teemu Torma
f24af81bca Makefile.in (GTHREAD_FLAGS): New var.
* Makefile.in (GTHREAD_FLAGS): New var.
	(LIBGCC2_CFLAGS): Added $(GTHREAD_FLAGS).
	(distclean): Remove gthr-default.h.
	* configure.in: Accept dce as a thread package.
	Check for thread.h and pthread.h.
	Link gthr-default.h to appropriate thread file and set
	gthread_flags.
	(hppa1.1-*-hpux10*): If --enable-threads, use dce threads and
	include multilib definitions from pa/t-dce-thr.
	(sparc-*-solaris2*): Enable threads by default, if thread.h or
	pthread.h is found, preferring posix threads over solaris ones.
	* config/pa/t-dce-thr: New file.
	* config/pa/t-pa: Removed multilibs.
	* config/sparc/t-sol2: Ditto.
	* gthr.h: New file.
	* gthr-single.h: New file.
	* gthr-posix.h: New file.
	* gthr-solaris.h: New file.
	* gthr-dce.h: New file.
	* libgcc-thr.h: Removed.
	* objc/thr-dce.c: New file copied from thr-decosf1.c.
	* frame.c: Include gthr.h instead of libgcc-thr.h.
	* libgcc2.c: Include gthr.h instead of libgcc-thr.h.
	(eh_context_initialize): If __gthread_once fails, use static eh
	context.
	(eh_context_free): Call __gthread_key_dtor.

From-SVN: r17235
1997-12-24 16:56:08 -07:00
Kaveh R. Ghazi
9e04c65a52 cse.c (rtx_cost): Add default case in enumeration switch.
* cse.c (rtx_cost): Add default case in enumeration switch.
        * fix-header.c (recognized_macro): Likewise.
        (recognized_extern): Likewise.
        (write_rbrac): Likewise.
        * objc/objc-act.c (encode_aggregate): Likewise.
        (gen_declarator): Likewise.
        (gen_declspecs): Likewise.

From-SVN: r17186
1997-12-22 02:31:41 -07:00
Andreas Schwab
dbf3231e2f Make-lang.in: Create runtime-info.h and libobjc_entry.o in the build directory.
* objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in
	the build directory.
	(libobjc.a): Update dependency list.
	(libobjc.dll): Likewise.  Use libobjc_entry.o from the build
	directory.
	(objc/sendmsg.o): Add -Iobjc to find runtime-info.h.
	(objc.mostlyclean): Remove runtime-info.h.

From-SVN: r17143
1997-12-18 16:27:58 -07:00
Jeff Law
73cea257d4 Rebuild after recent changes.
From-SVN: r17074
1997-12-12 08:58:02 -07:00
John F. Carr
0a6969ad7c tree.c, tree.h: Change tree_code_type, tree_code_length, and tree_code_name from pointers to arrays.
* tree.c, tree.h: Change tree_code_type, tree_code_length, and
        tree_code_name from pointers to arrays.
        * tree.c: Remove standard_tree_code_* variables, no longer used.
        * print-tree.c: Remove declaration of tree_code_name.

        * cp/lex.c (init_lex): Update for tree_code_* changes.
        * objc/objc-act.c (init_objc): Likewise.

        * tree.def, cp/cp-tree.def, objc/objc-tree.def: Update for tree_code
        changes.

From-SVN: r17061
1997-12-11 23:49:29 -07:00
H.J. Lu
7cc273ade8 objc-act.c (lang_report_error_function): Disable.
* objc/objc-act.c (lang_report_error_function): Disable.
        * objc/objc-parse.y: Include "output.h".
        (yyerror): Remove redundant decl.
        (yyprint): Fix prototype.
        (apply_args_register_offset): Remove redundant decl.
        (get_file_function_name): Likewise.

From-SVN: r17057
1997-12-11 23:20:41 -07:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jeff Law
c3bcf315fa This commit was generated by cvs2svn to compensate for changes in r16274,
which included commits to RCS files with non-trunk default branches.

From-SVN: r16275
1997-11-02 01:46:26 -07:00
Jim Wilson
10549cbd85 H.J. Lu's SMP patch.
From-SVN: r14924
1997-08-25 23:36:27 -07:00
Jeff Law
861bb6c1b0 Initial revision
From-SVN: r14764
1997-08-11 09:56:58 -06:00
Per Bothner
a0c94d6d68 * objc/Make-lang.in (OBJC_CCOMMON): Removed.
From-SVN: r14632
1997-08-02 14:06:25 -07:00
Per Bothner
dbbade7444 * objc/objc-act.c (lang_init): Don't check_newline #if USE_CPPLIB.
From-SVN: r14601
1997-08-01 14:17:44 -07:00
Paul Eggert
416c259ae6 Comment out lines containing just formfeeds.
From-SVN: r14514
1997-07-21 23:17:44 +00:00
Richard Kenner
4f286636c9 (copy-headers): Use $(srcdir) from this makefile, not the parent's.
From-SVN: r14477
1997-07-18 06:44:21 -04:00
Richard Kenner
799f426536 (objc-headers): Fix command for the new build directory layout, don't
pass srcdir variable.

From-SVN: r14476
1997-07-18 06:44:07 -04:00
Richard Kenner
56f21a2634 Remove unapproved change.
From-SVN: r14433
1997-07-14 07:56:23 -04:00
Jim Meyering
694226b657 ($(OBJC_O)): Also depend on $(GCC_PASSES).
From-SVN: r14395
1997-07-07 04:01:33 +00:00
Richard Kenner
26ef0fc85a ($(srcdir)/objc/objc-parse.c): Fix command to use the right file names.
From-SVN: r14383
1997-07-02 07:51:10 -04:00
Richard Kenner
0bb8b20bbb Initial revision
From-SVN: r14359
1997-06-27 19:36:32 -04:00
Richard Kenner
a0effa2858 (libobjc_entry.o, libobjc_s.a, libobjc.dll): New targets.
(objc.install-normal): Install Objective-C runtime as a DLL.
(objc.mostlyclean): Clean up files used to build DLL.

From-SVN: r14358
1997-06-27 19:36:18 -04:00
Richard Kenner
255e0babcb (search_for_method_in_list): No longer static.
From-SVN: r14356
1997-06-27 19:30:41 -04:00
Richard Kenner
d2fdae0bf1 Print message about ObjC thread file.
From-SVN: r14351
1997-06-27 18:49:49 -04:00
Richard Kenner
6131ad9d4d (OBJC_THREAD_FILE): New definition.
From-SVN: r14350
1997-06-27 18:49:33 -04:00
Doug Evans
24e22c117c Make-lang.in (OBJC_CCOMMON): Object files don't go in srcdir.
* objc/Make-lang.in (OBJC_CCOMMON): Object files don't go in srcdir.
	(OBJC_OBJS): Likewise.
	(OBJC_O): Likewise.
	(objc-parse.o, objc-act.o): Fix rules.
	(objc/libobjc files): Fix rules.

From-SVN: r14347
1997-06-27 22:34:54 +00:00
Richard Kenner
a9d308bf5f (__objc_thread_yield): Use sched_yield instead.
From-SVN: r14327
1997-06-27 10:47:07 -04:00
Richard Kenner
8440cf1b3a (objc-runtime): Add objc-headers.
From-SVN: r14320
1997-06-25 16:56:03 -04:00
Richard Kenner
f1a997418e Define front-end/back-end interface functions and structures.
From-SVN: r14311
1997-06-25 16:25:39 -04:00
Richard Kenner
2024f9e4dc Completely rework according to new interface.
From-SVN: r14310
1997-06-25 16:25:24 -04:00
Richard Kenner
f15e9e7ef2 Reorganize thread implementation to make a clearly defined
front-end/back-end interface.

From-SVN: r14309
1997-06-25 16:23:17 -04:00
Richard Kenner
61f77e446b (__objc_register_instance_methods_to_class): New function.
Add missing function prototypes.

From-SVN: r14308
1997-06-25 16:14:08 -04:00
Richard Kenner
73845be11e (__objc_register_instance_methods_to_class): New function.
From-SVN: r14307
1997-06-25 16:13:42 -04:00
Richard Kenner
38692f1f94 (OBJC_ERR_BAD_STATE): New error code.
On NeXT redefine object_copy and object_dispose to avoid
a conflict with those defined in system library.

From-SVN: r14306
1997-06-25 16:13:21 -04:00
Richard Kenner
c3fb89daf5 (method_get_sizeof_arguments): Fix typo.
From-SVN: r14305
1997-06-25 16:12:49 -04:00
Richard Kenner
506b0f9eaf (objc_send_load): New function.
(objc_class_tree): New structure.
(create_tree_of_subclasses_inherited_from): New function.
(__objc_tree_insert_class): New function.
(objc_tree_insert_class): New function.
(objc_preorder_traverse): New function.
(objc_postorder_traverse): New function.
(__objc_tree_print): New function.
(__objc_destroy_class_tree_node): New function.
(class_is_subclass_of_class): New function.
(__objc_exec_class): Allocate class tree list and load hash table.
(__objc_send_message_in_list): Rewrite using hash table.
(__objc_send_load): Remove calls to _objc_load_callback.
(objc_send_load): Make static.  Create Tree of classes resembling
class hierarchy for all modules.  Call __objc_send_load on all of
the modules in __objc_module_list.
(__objc_create_classes_tree): New function.

From-SVN: r14304
1997-06-25 16:12:28 -04:00
Richard Kenner
8458d268d2 Add special exception to copyright notice.
From-SVN: r14285
1997-06-22 06:13:57 -04:00
Richard Kenner
c15648f7aa Changes to support ObjC as a front-end language.
From-SVN: r14284
1997-06-21 20:56:18 -04:00
Richard Kenner
14bb9bd890 Initial revision
From-SVN: r14283
1997-06-21 20:55:08 -04:00
Richard Kenner
d5d0a377e6 Initial revision
From-SVN: r14282
1997-06-21 20:42:06 -04:00
Richard Kenner
14499ba4f3 (__objc_block_return): Remove function.
(__objc_word_return, __objc_double_return): Remove functions.
(__objc_get_forward_imp): New function.
(__objc_init_dispatch_tables): Install zero instead of
__objc_init_install_dtable.
(__objc_init_install_dtable): No longer call the method but
allow objc_msg_lookup return it for normal execution.
(obj_msg_lookup): Differentiate between when a method isn't
implemented and when the dispatch table needs to be installed.
Return the IMP when the dispatch table is installed versus
having __objc_init_install_dtable call it.
(get_imp): Install dispatch table if needed and return IMP
from the newly installed dispatch table.
(__objc_responds_to): Install dispatch table if needed before
checking if method is implemented.

From-SVN: r13723
1997-03-17 17:00:10 -05:00
Richard Kenner
c8163b58ed Correct include path.
From-SVN: r13716
1997-03-16 08:41:08 -05:00
Richard Kenner
8235e418bc (__objc_block_return): New function.
(__objc_word_return, __objc_double_return): New functions.
(__objc_init_install_dtable): Call appropriate return function
based upon method type.

From-SVN: r13715
1997-03-16 08:40:47 -05:00
Richard Kenner
12d94bff7e (objc_module): Eliminate statics variable.
From-SVN: r13713
1997-03-15 07:57:55 -05:00
Richard Kenner
d3d71914cb (OBJC_O): Add linking.m.
From-SVN: r13712
1997-03-15 07:57:36 -05:00
Richard Kenner
7084b319a3 (class_add_method_list): Check for the +load method when adding a methods list to a class.
(class_add_method_list): Check for the +load method when adding a
methods list to a class.
(__objc_install_methods_in_dtable): New function.
(class_add_method_list): Don't check anymore for duplicate methods.

From-SVN: r13711
1997-03-15 07:57:06 -05:00
Richard Kenner
e29e95701b Initial revision
From-SVN: r13710
1997-03-15 07:56:24 -05:00
Richard Kenner
f0a5229172 (OBJC_VERSION): Increment version.
(objc_send_load, __objc_send_load): New functions.
(__objc_send_message_in_list): New function.
(__objc_force_linking): New function.
(__objc_exec_class): Don't call _objc_load_callback here.
(__objc_exec_class): Access statics from their new place in the defs variable.

From-SVN: r13709
1997-03-15 07:56:13 -05:00
Richard Kenner
e335b3ee7e (OBJC_VERSION): Increment version as recent changes have made old compiled code incompatible with current ObjC runtime.
(OBJC_VERSION): Increment version as recent changes have made old
compiled code incompatible with current ObjC runtime.
(build_objc_symtab_template): Make sure defs in objc_symtab is a NULL
terminated array.
(init_def_list): Attach statics to end of def list.
(init_objc_symtab): Take statics list into account.
(init_module_descriptor, build_module_descriptor): Don't add statics.
(generate_static_references): Indicate that statics are used.
(finish_objc): Process statics in the beginning.

From-SVN: r13708
1997-03-15 07:53:30 -05:00
Richard Kenner
f19911e44a Update documentation.
From-SVN: r13606
1997-02-04 06:14:25 -05:00
Richard Kenner
5ff0385cdb (__sel_register_typed_name): Eliminate compiler warnings with explicit cast.
From-SVN: r13599
1997-02-02 20:15:14 -05:00
Richard Kenner
e0d0c8a162 (__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13598
1997-02-02 19:57:44 -05:00
Richard Kenner
47a84c97bf Prototypes for new functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13597
1997-02-02 19:54:47 -05:00
Richard Kenner
e64f9262e6 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore
from name of objc mutex and thread structures.

From-SVN: r13596
1997-02-02 19:53:23 -05:00
Richard Kenner
f4d01e7962 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc mutex
and thread structures.

From-SVN: r13595
1997-02-02 19:52:38 -05:00
Richard Kenner
3136f75db4 (objc_condition_{,de}allocate): New functions.
(objc_condition_{wait,broadcast,signal}): New functions.
(__objc_runtime_mutex): Eliminate leading underscore from name of objc
mutex and thread structures.

From-SVN: r13594
1997-02-02 19:51:58 -05:00
Richard Kenner
3cec07d501 (hash_delete): Step through the hash nodes versus using hash_next to
increase efficiency.

From-SVN: r13593
1997-02-02 19:42:48 -05:00
Richard Kenner
eb0bc1e9b4 (__objc_forward): Replace call to abort function with call to
objc_error function.

From-SVN: r13592
1997-02-02 19:42:25 -05:00
Richard Kenner
efa7c88e59 Remove error handling declarations.
From-SVN: r13591
1997-02-02 19:42:01 -05:00
Richard Kenner
d2c60b5c23 Declare error handling functions and typedef for user specified error handler function.
Declare error handling functions and typedef for user specified error
handler function.  Define error codes used by the runtime library.

From-SVN: r13590
1997-02-02 19:41:41 -05:00
Richard Kenner
7e46250027 (objc_verror): New function.
(objc_fatal): Remove function.
(objc_set_error_handler): New function.
(_objc_error_handler): New global variable.
(__alpha__): Remove unneeded code.
(objc_error): Allow user specified error handler function to trap and
handle the objc error.  Added an error code parameter which indicates
the specific error that occured.
(objc_malloc, objc_atomic_malloc): Replace call to objc_fatal function
with call to objc_error function.
(objc_valloc, objc_realloc, objc_calloc): Likewise.

From-SVN: r13589
1997-02-02 19:41:03 -05:00
Richard Kenner
241365d3cc (init_check_module_version): Replace call to abort function with call
to objc_error function.

From-SVN: r13588
1997-02-02 19:40:12 -05:00
Richard Kenner
b2948281c3 (objc_sizeof_type, objc_alignof_type): Replace call to abort function with call to objc_error function.
(objc_sizeof_type, objc_alignof_type): Replace call to abort function
with call to objc_error function.
(objc_skip_typespec): Likewise.

From-SVN: r13587
1997-02-02 19:39:52 -05:00
Richard Kenner
86eb7fef04 (objc_get_class): Replace call to abort function with call to
objc_error function.

From-SVN: r13586
1997-02-02 19:39:22 -05:00
Richard Kenner
72c6da8a74 Replace call to abort or __objc_fatal functions with call to objc_error function throughout the complete file.
Replace call to abort or __objc_fatal functions with call to
objc_error function throughout the complete file.
(__objc_finish_read_root_object): Use hash table instead of list.

From-SVN: r13585
1997-02-02 19:39:00 -05:00
Richard Kenner
5b9b7438f3 (-error:): Call objc_error function instead of using function pointer.
From-SVN: r13584
1997-02-02 19:38:23 -05:00
Richard Kenner
71ccd1fc55 (encode_aggregate_within): New function.
(encode_aggregate): Generates encodings for unions similar to those for
structs except surrounded by parenthesis instead of braces.

From-SVN: r13583
1997-02-02 08:24:57 -05:00
Richard Kenner
6fceaa5f5b (stdlib.h): Define __USE_FIXED_PROTOTYPES__ before including stdlib.h.
From-SVN: r13250
1996-12-07 18:58:28 -05:00
Richard Kenner
1ebf4f3910 (BOOL): Define BOOL as int for VxWorks.
From-SVN: r12827
1996-09-23 22:45:12 -04:00
Richard Kenner
039f5fb1a8 Replace use of __objc_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12768
1996-09-22 10:49:59 -04:00
Richard Kenner
df7fbc8cd8 Replace use of __objc_xcalloc, __objc_xrealloc, and __objc_xmalloc
with objc_calloc, objc_realloc, and objc_malloc.

From-SVN: r12767
1996-09-22 10:41:58 -04:00
Richard Kenner
2dac9ca60b (__objc_xmalloc, __objc_xrealloc): Delete.
From-SVN: r12766
1996-09-22 10:39:18 -04:00
Richard Kenner
a1feef752b Replace use of __obj_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12765
1996-09-22 10:36:59 -04:00
Richard Kenner
d2ca2ea6e8 (_objc_malloc): New function pointer.
(_objc_atomic_malloc, _objc_valloc): Likewise.
(_objc_realloc, _objc_calloc, _objc_free): Likewise

From-SVN: r12764
1996-09-22 10:36:08 -04:00
Richard Kenner
79236a0da5 (objc_malloc): Renamed from __objc_xmalloc.
(objc_realloc): Renamed from __objc_realloc.
(objc_atomic_malloc): New function.
(objc_valloc): New function.
(objc_calloc): Renamed from __objc_calloc.
(objc_free): New function.

From-SVN: r12763
1996-09-22 10:35:45 -04:00
Richard Kenner
9d46282b6c Replace use of free with objc_free.
From-SVN: r12762
1996-09-22 10:35:09 -04:00
Richard Kenner
6f18718f3f Replace use of __objc_xcalloc and free with objc_calloc and objc_free.
From-SVN: r12761
1996-09-22 10:34:13 -04:00
Richard Kenner
ed40285ff6 Replace use of __objc_xmalloc and free with objc_malloc and objc_free.
From-SVN: r12760
1996-09-22 10:33:49 -04:00
Richard Kenner
6a305f32b2 Formatting changes.
From-SVN: r12617
1996-08-11 22:27:09 -04:00
Richard Kenner
2a7c93ee56 Formattign changes.
From-SVN: r12616
1996-08-11 22:26:19 -04:00
Richard Kenner
ca4da59718 Formtting changes.
From-SVN: r12615
1996-08-11 22:25:33 -04:00
Richard Kenner
f92076037c (hash_is_key_in_hash): Function somehow got lost.
From-SVN: r12614
1996-08-11 22:25:20 -04:00
Mike Stump
1ef08c6373 install EH code
From-SVN: r12550
1996-07-23 20:09:26 +00:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Richard Kenner
d5d5fa1824 (objc_thread_id): Use pthread_getunique_np to obtain a thread ID value.
(objc_mutex_allocate): Cast mutex->owner to _objc_thread_t.
(objc_mutex_deallocate): Likewise.
(objc_mutex_unlock): Likewise.
(objc_mutex_trylock):  Declare thread_id as _objc_thread_t.
(objc_mutex_lock): Likewise.
(objc_mutex_unlock): Likewise.

From-SVN: r12375
1996-06-28 18:50:43 -04:00
Richard Kenner
b05a8d8a6b (ifdef __alpha__): Don't declare `free'.
From-SVN: r12374
1996-06-28 18:50:18 -04:00
Richard Kenner
ad24823466 (__objc_block_forward): New function.
(get_imp, objc_msg_lookup): Use different forwarding function
when the returning a floating point value.

From-SVN: r12371
1996-06-28 16:48:18 -04:00
Richard Kenner
018086d1d0 (__sel_register_typed_name): Additional parameter that indicates
whether name and type parameters are constant or not.

From-SVN: r12262
1996-06-10 11:59:30 -04:00
Richard Kenner
1717ec5915 (__objc_thread_detach_function): Clear thread storage.
Call the thread hook function when first becoming multi-threaded.
(objc_set_thread_callback): New function.

From-SVN: r12261
1996-06-10 11:58:41 -04:00
Richard Kenner
f2433f89b4 (objc_set_thread_callback): New function.
(objc_thread_callback): Typedef for the hook function.

From-SVN: r12260
1996-06-10 11:58:20 -04:00
Richard Kenner
8c3f352664 (libobjc.a): Don't delete the library.
From-SVN: r12259
1996-06-10 11:58:05 -04:00
Richard Kenner
8c55cd7870 (__objc_init_protocols): Need to unlock mutex.
From-SVN: r12258
1996-06-10 11:49:49 -04:00
Richard Kenner
2361ec2a84 Initial revision
From-SVN: r12220
1996-06-07 19:22:01 -04:00
Richard Kenner
7cc5b18f7b (__objc_thread_exit_status): Declare global variable.
From-SVN: r12219
1996-06-07 19:21:30 -04:00
Richard Kenner
8341df325a Remove inclusion of source files.
From-SVN: r12218
1996-06-07 19:21:17 -04:00
Richard Kenner
cc782a7e9e Now compiles as a separate source file, so include appropriate
Objective-C headers.

From-SVN: r12217
1996-06-07 19:21:00 -04:00
Richard Kenner
7228791ecf (OBJC_THREAD_FILE): Add target and dependency.
From-SVN: r12216
1996-06-07 19:16:50 -04:00
Richard Kenner
673a261e4f (objc_get_uninstalled_dtable): New declaration.
From-SVN: r12020
1996-05-17 19:53:18 -04:00
Richard Kenner
7136f13204 (objc_get_uninstalled_dtable): New function.
From-SVN: r12019
1996-05-17 19:52:54 -04:00
Richard Kenner
fc94a55b92 Initial revision
From-SVN: r11985
1996-05-17 08:28:54 -04:00
Richard Kenner
b8abf72abb entered into RCS
From-SVN: r11984
1996-05-17 08:27:31 -04:00
Richard Kenner
a3381c2a7d Initial revision
From-SVN: r11983
1996-05-17 08:17:48 -04:00
Richard Kenner
b2c6b6c6ac (OBJC_O): Add dependency for nil_method.c.
From-SVN: r11982
1996-05-17 08:17:07 -04:00
Richard Kenner
44ffc80b50 (nil_method): Deleted from here.
From-SVN: r11981
1996-05-17 08:16:46 -04:00
Richard Kenner
cc06bcdb37 Include objc/objc.h here instead of in objc/hash.c to get BOOL typedef.
From-SVN: r11980
1996-05-17 08:12:32 -04:00
Richard Kenner
168887fa2c (hash_is_key_in_hash): New function.
From-SVN: r11979
1996-05-17 08:12:15 -04:00
Richard Kenner
1139608504 (hash_value_for_key): Prevent endless loop when 0 was stored in a
hashtable.

From-SVN: r11926
1996-05-05 13:13:21 -04:00
Richard Kenner
8b7bf67189 (_objc_thread_id): Correct return type from int to _objc_thread_id.
From-SVN: r11821
1996-04-16 16:31:17 -04:00
Richard Kenner
f061780b03 (objc_skip_typespec): Don't abort for _C_UNDEF.
From-SVN: r11761
1996-04-14 07:52:23 -04:00
Richard Kenner
489c81a38f Inlcude thr.h, not thread.h.
From-SVN: r11666
1996-04-04 12:35:55 -05:00
Richard Kenner
5f79ec0ec0 Include thr.h, not thread.h.
From-SVN: r11665
1996-04-04 12:35:00 -05:00
Richard Kenner
7fb04be124 Rename thread-* to thr-*.
From-SVN: r11664
1996-04-04 12:26:03 -05:00
Richard Kenner
cd9255f6d3 Rename thread* to thr*.
From-SVN: r11663
1996-04-04 12:24:18 -05:00
Richard Kenner
06f5c9df49 (objc_mutex_unlock): Properly declare thread_id.
From-SVN: r11612
1996-03-25 08:09:26 -05:00
Richard Kenner
8d95e9ad11 Initial revision
From-SVN: r11453
1996-03-05 09:22:13 -05:00
Richard Kenner
ca10c449d6 Delete reference to thread-test directory.
From-SVN: r11452
1996-03-05 09:14:02 -05:00
Richard Kenner
10c6702fa3 Initial revision
From-SVN: r11451
1996-03-05 09:13:36 -05:00
Richard Kenner
749815a2e8 Delete reference to thread-test.
From-SVN: r11450
1996-03-05 09:13:24 -05:00
Richard Kenner
271809f768 Initial revision
From-SVN: r11449
1996-03-05 09:13:02 -05:00
Richard Kenner
d50e6b7b37 (get_imp, __objc_responds_to): Surround sarray access with mutex lock/unlock.
(__objc_init_install_dtable): Likewise.
(__objc_update_dispatch_table_for_class): Likewise.
(__objc_print_dtable_stats): Likewise.

From-SVN: r11448
1996-03-05 09:12:47 -05:00
Richard Kenner
2dae9809ee (sel_get_typed_uid, sel_get_any_typed_uid): Likewise.
(sel_get_any_uid, sel_get_name, sel_register_name): Likewise.
(sel_register_typed_name): Likewise.

From-SVN: r11447
1996-03-05 09:12:08 -05:00
Richard Kenner
9f26926521 (union sversion): New.
(struct sarray): Maintain multiple versions.
(sarray_remove_garbage): Add prototype.

From-SVN: r11446
1996-03-05 09:11:25 -05:00
Richard Kenner
1ebb5fcc64 (sarray_{remove,free}_garbage): New functions.
(sarray_at_put, sarray_new, sarray_lazy_copy):
Modify/copy sarray structure/data in a thread-safe manner
(sarray_{realloc,free}): Reallocate/free sarray structure/data in a
thread-safe manner.

From-SVN: r11445
1996-03-05 09:10:50 -05:00
Richard Kenner
54d643f6f2 Include objc/thread.h.
From-SVN: r11444
1996-03-05 09:10:10 -05:00
Richard Kenner
691466c0b5 Update comments.
From-SVN: r11443
1996-03-05 09:09:10 -05:00
Richard Kenner
aef85e6a98 (__objc_runtime_mutux, __objc_runtime_thread_alive): New variables.
(objc_init_statics, __objc_init_protocols): Surround sarray access
with mutex lock/unlock
(__objc_exec_class): Likewise.
Initialization for thread-safe global variables.
Declarations for thread-safe functions and global variables

From-SVN: r11442
1996-03-05 09:07:56 -05:00
Richard Kenner
53cc7066b8 (__objc_init_class_tables): Surround sarray access with mutex lock/unlock.
(__objc_add_class_to_hash, objc_lookup_class): Likewise.
(objc_get_class, objc_get_next_class): Likweise.
(__objc_resolve_class_links, class_pose_as) Likewise.

From-SVN: r11441
1996-03-05 09:06:45 -05:00
Richard Kenner
625fc99df2 Changes to compile new files and name renaming.
From-SVN: r11440
1996-03-05 09:06:02 -05:00
Richard Kenner
605bf7304d (objc_{write,read}_type, case _C_STRUCT_B): Fix typo.
From-SVN: r10990
1996-01-15 12:31:49 -05:00
Richard Kenner
3ea4ff2e26 (objc_alignof_type): Handle _C_PTR case.
From-SVN: r10807
1995-12-18 19:31:18 -05:00
Richard Kenner
fb3ba99d63 (objc_alignof_type): Handle _C_PTR case.
From-SVN: r10723
1995-12-14 18:13:16 -05:00
Richard Kenner
c0cacfd5a5 Changed archive command for libobjc.a to use $? for objects.
From-SVN: r10332
1995-09-12 17:40:04 -04:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
682d017157 objc-api.h (sel_get_any_typed_uid): Declare new function.
From-SVN: r10234
1995-08-13 21:47:53 -04:00
Richard Kenner
8b4d4a9da8 (sel_get_any_typed_uid): New function.
From-SVN: r10233
1995-08-13 21:47:34 -04:00
Richard Kenner
66759bfbb7 Change FSF address.
From-SVN: r9990
1995-06-15 17:07:30 -04:00
Richard Kenner
ed2ecfcbc9 Update header.
From-SVN: r9989
1995-06-15 17:07:13 -04:00
Richard Kenner
de18aff348 Change FSF address.
From-SVN: r9988
1995-06-15 17:06:59 -04:00
Richard Kenner
0af195cf99 Update FSF address.
From-SVN: r9972
1995-06-15 08:55:05 -04:00
Richard Kenner
4c38e45bc6 Update header.
From-SVN: r9971
1995-06-15 08:44:50 -04:00
Richard Kenner
84c09f78a1 Update FSF address.
From-SVN: r9970
1995-06-15 08:44:04 -04:00
Richard Kenner
701a1e6342 Update header.
From-SVN: r9969
1995-06-15 08:37:49 -04:00
Richard Kenner
6bc06b8f99 Update FSF address.
From-SVN: r9968
1995-06-15 08:37:21 -04:00
Richard Kenner
7f3ebb7ba9 Update header.
From-SVN: r9963
1995-06-15 07:54:51 -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
2d2af5169d (PRECOMPUTE_SELECTORS, struct soffset): Use #ifdef __sparc__, not
sparc.

From-SVN: r9821
1995-05-25 17:27:36 -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
bbcffef3ad (struct sarray): Make capacity size_t.
From-SVN: r9722
1995-05-16 17:46:53 -04:00
Richard Kenner
2b61d00a8b (sarray_realloc): Make array index variables size_t.
From-SVN: r9721
1995-05-16 17:46:42 -04:00
Richard Kenner
2c89fb2e66 (__objc_write_class): Write class version.
(__objc_write_selector, objc_{write,read}_selector): Handle null selector.

From-SVN: r9720
1995-05-16 17:46:23 -04:00
Richard Kenner
9faa82d8c0 Fix typos in comments.
From-SVN: r9712
1995-05-16 08:39:54 -04:00
Richard Kenner
8e3dc5f661 (__objc_init_install_dtable): Fix misspelling in name of local label
`already_initialized'.

From-SVN: r9708
1995-05-16 07:09:02 -04:00
Richard Kenner
73bddf80d5 entered into RCS
From-SVN: r9700
1995-05-15 23:12:15 -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
Richard Kenner
df27f225b7 (objc_init_statics): Fix missing part of last change.
From-SVN: r9604
1995-05-09 19:11:43 -04:00
Richard Kenner
a142e7ccfe (__objc_send_initialize): Call superclass if object does not implement
+initialize.

From-SVN: r9597
1995-05-09 11:44:43 -04:00
Richard Kenner
a4137a04de (_objc_load_callback): Add declaration.
From-SVN: r9593
1995-05-08 18:13:53 -04:00
Richard Kenner
d8a55d0960 (_objc_load_callback): Add declaration.
(__objc_exec_class): Call _objc_load_callback after every Class or Category
is added.

From-SVN: r9592
1995-05-08 18:13:33 -04:00
Richard Kenner
3ce88d8f5c (SHELL): Now /bin/sh.
From-SVN: r9582
1995-05-05 16:54:10 -04:00
Doug Evans
5a1f85b4f3 NXConstantString.h renamed to NXConstStr.h.
From-SVN: r9579
1995-05-05 17:32:07 +00:00
Richard Kenner
48b2b6676f NXConstantString renamed to NXConstStr.
From-SVN: r9575
1995-05-04 18:01:21 -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
0994488a6b Changed Class * to Class in order to match NEXTSTEP and OpenStep
runtime.

From-SVN: r9497
1995-04-26 19:16:05 -04:00
Richard Kenner
bc1f3f7791 (OBJC_O): Added bare-bones implementation of NXConstantString.
From-SVN: r9496
1995-04-26 19:08:38 -04:00
Richard Kenner
f76bab0219 Initial revision
From-SVN: r9495
1995-04-26 19:08:15 -04:00
Richard Kenner
4426bf3fe6 Changed Class * to Class in order to match NEXTSTEP and OpenStep runtime.
Changed Class * to Class in order to match NEXTSTEP and OpenStep
runtime.
(OBJC_VERSION): Version 7.
(objc_init_statics): New function.
(__objc_exec_class): Invoke objc_init_statics if needed.

From-SVN: r9494
1995-04-26 19:07:00 -04:00
Richard Kenner
e35ec8520b Changed Class * to Class in order to match NEXTSTEP and OpenStep runtime.
Changed Class * to Class in order to match NEXTSTEP and OpenStep
runtime.
(objc_static_instances): New struct to record static instances of a certain
class.
(objc_module): New tag STATICS to point to the table of objc_statics_instances.

From-SVN: r9493
1995-04-26 19:05:45 -04:00
Richard Kenner
2a50a79275 (SHELL): New definition.
From-SVN: r9288
1995-04-01 09:46:59 -05:00
Richard Kenner
ac6b994fe0 Put Alpha-specific decls before #include of runtime.h.
From-SVN: r9212
1995-03-20 08:03:42 -05: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
Richard Kenner
8c4caa3de9 Added {} around file variable.
From-SVN: r9023
1995-02-21 19:02:59 -05:00
Jason Merrill
2c5f4139a9 __attribute__ ((constructor))
From-SVN: r8747
1995-01-14 01:09:01 +00:00
Richard Kenner
d5e4fa5e17 (class_create_instance): Replace memchr with memset.
From-SVN: r8515
1994-11-18 19:10:21 -05: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
8be3ef7d1d (__objc_xcalloc): Use calloc instead malloc/bzero.
From-SVN: r8357
1994-10-28 19:13:10 -04:00
Doug Evans
8184390eea archive.c (__objc_free): New function.
* objc/archive.c (__objc_free): New function.
(__objc_finish_read_root_object): Use it.

From-SVN: r8243
1994-10-08 15:16:09 +00:00
Kresten Krab Thorup
ffa8bd9bcb (BOOL): Changed from char to unsigned char.
From-SVN: r8230
1994-10-06 16:24:03 +00:00
Kresten Krab Thorup
b962cd0b23 Delay eeing when unarchiving.
From-SVN: r8229
1994-10-06 16:17:38 +00:00
Richard Kenner
627c097fdc (warn_with_method): Make arg int, not char.
From-SVN: r8148
1994-09-27 18:31:04 -04:00
Michael Meissner
b840bfb0a2 Respin DI support to be combine friendly; Allow push of SF without temp reg; Fix broken i386 untyped_call
From-SVN: r8098
1994-09-20 18:36:51 +00:00
Kresten Krab Thorup
2acb03882a (__objc_init_protocols): Remove assertion
,

From-SVN: r8031
1994-09-07 15:30:01 +00:00
Kresten Krab Thorup
ad4f2e420b (conformsTo:): Change implementati to allways use class to do lookup.
From-SVN: r8030
1994-09-07 15:28:04 +00:00
Kresten Krab Thorup
f6df50cfd6 (objc_get_meta_class): New function.
From-SVN: r7997
1994-08-29 15:43:01 +00:00
Kresten Krab Thorup
2691a6224f (get_imp): don't inline on i386.
From-SVN: r7996
1994-08-29 15:42:11 +00: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
Kresten Krab Thorup
f4e12fadd1 (objc_sizeof_type): Assign from ROUND,
don't increment.  Remove ; after while to fix infinite loop.
        Add float and double cases.
        (objc_alignof_type):  Add float and double cases.

From-SVN: r7929
1994-08-15 16:03:36 +00:00
Kresten Krab Thorup
121b312b90 encoding.c (objc_sizeof_type): Should assign from ROUND, not increment.
* objc/encoding.c (objc_sizeof_type): Should assign from ROUND,
	not increment.  Remove ; after while to fix infinite loop.
	Add support for floats and doubles.
	(objc_alignof_type):  Add support for floats and doubles.
	* objc/selector.c (): Use __objc_selector_names, not
	__objc_selector_array.
	(sel_types_match): New function.
	(sel_get_typed_uid): Modified to use sel_types_match, so that we
	can get typed selectors in an architecture-independent way.  Fixed
	strcmp that should have been !strcmp.

From-SVN: r7928
1994-08-15 15:51:03 +00:00
Kresten Krab Thorup
15408e26c2 removed declaration of bzero
From-SVN: r7805
1994-07-28 16:56:52 +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
Richard Kenner
ccccb52764 Include stdarg.h before stdio.h.
From-SVN: r7757
1994-07-13 06:47:59 -04:00
Kresten Krab Thorup
50b07e5b2a *** empty log message ***
From-SVN: r7705
1994-07-11 18:00:49 +00: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
a39d31bc0c This patch makes selectors in the Objective-C language be pointers to a struct { void *sel_id...
This patch makes selectors in the Objective-C language be pointers
        to a struct { void *sel_id, char *sel_types }, where the sel_types
        element is the type encoding of the method arguments.

From-SVN: r7622
1994-06-30 16:18:55 +00:00
Kresten Krab Thorup
7a1dd32325 (read:, write:, streamVersion:):
Un-disable for alpha.  (forward::, performv::): Declare and fix to
        return retval_t. .

From-SVN: r7621
1994-06-30 16:18:55 +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
3d89634a51 (OBJC_O): Add encoding.o.
From-SVN: r7049
1994-04-16 16:51:12 -04:00
Jim Wilson
d2a1b32f57 Delete use of IN_GCC to control stddef.h/gstddef.h include.
From-SVN: r6948
1994-03-31 21:50:23 -08:00
Jim Wilson
c2ab36e655 Change "gstddef.h" to <stddef.h>. Change "gstdarg.h" to <stdarg.h>.
From-SVN: r6945
1994-03-31 21:33:24 -08:00
Jim Wilson
cb55fc67b7 Change "gstdarg.h" to <stdarg.h>.
From-SVN: r6944
1994-03-31 21:31:21 -08:00
Doug Evans
5366ab1d32 (*.o): Add explicit dependencies for Sun's VPATH.
From-SVN: r6788
1994-03-14 20:15:59 +00:00
Richard Kenner
82812e560c (SUBDIR_INCLUDES): Add -I for include directory.
From-SVN: r6465
1994-02-02 14:21:50 -05:00
Doug Evans
ff942a9829 #ifdef out uses of TypedStream for the alpha, not supported yet.
From-SVN: r6426
1994-01-24 23:28:33 +00:00
Richard Kenner
2663b06b38 Initial revision
From-SVN: r6214
1993-12-12 06:13:42 -05:00
Richard Kenner
cb778d408a Include ctype.h.
From-SVN: r6190
1993-12-06 07:40:22 -05:00
Richard Stallman
c3c1218645 Include "tconfig.h" before "runtime.h".
From-SVN: r6112
1993-11-18 08:08:17 +00:00
Richard Stallman
6c8747b19a (compare_strings): Check for null pointers.
From-SVN: r6014
1993-11-05 20:32:06 +00:00
Richard Stallman
c35a847ec5 (objc_read_string): Allocate string properly.
From-SVN: r6013
1993-11-05 20:31:48 +00:00
Richard Stallman
83a4b97f7d Include tconfig.h.
From-SVN: r5971
1993-11-02 07:53:45 +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
3ac2f5d2ae (objc_read_object): Added declaration.
From-SVN: r5488
1993-09-27 21:28:23 +00:00
Kresten Krab Thorup
214a36e850 (-compare:, -shouldNotImplement:): Added.
From-SVN: r5399
1993-09-22 18:00:23 +00:00
Kresten Krab Thorup
d4b130122f (objc_write_type, objc_write_types): Take take char** args for writing strings in stead of char* to match NeXT.
(objc_write_type, objc_write_types): Take
       take char** args for writing strings in stead of char* to
       match NeXT.  Also correct some typos in error messages.

From-SVN: r5398
1993-09-22 17:59:50 +00:00
Kresten Krab Thorup
9cf8d5481b (objc_read_string): Allocate n+1 chars instead of just n.
From-SVN: r5371
1993-09-20 10:27:23 +00:00
Kresten Krab Thorup
b783df230b Initial revision
From-SVN: r5206
1993-08-24 10:05:25 +00:00
Kresten Krab Thorup
772fa04a92 (objc_msg_sendv): Use new encoding facilities.
(__objc_update_dispatch_table_for_class):
        Don't free dtable... (memory leak to make posing work)
(__objc_update_dispatch_table_for_class):
        Free old dispatch table and install a new.

From-SVN: r5205
1993-08-24 10:01:23 +00:00
Kresten Krab Thorup
2224b8ccb3 (nil_method): Don't define it, import it from sendmsg.c.
(arglist_t): Data-definition changed.

From-SVN: r5204
1993-08-24 10:00:49 +00:00
Kresten Krab Thorup
62b9a71206 (CLS_SETNUMBER): Clear old number
From-SVN: r5203
1993-08-24 10:00:19 +00:00
Kresten Krab Thorup
499056939e (class_pose_as): lazy copy dtables.
#include sarray.h
(class_pose_as): Rewritten

From-SVN: r5202
1993-08-24 09:59:41 +00:00
Kresten Krab Thorup
0b3d89ca54 (-performv): Use new objc_msg_sendv.
From-SVN: r5201
1993-08-24 09:59:14 +00:00
Kresten Krab Thorup
a62354a0db (sendmsg.c, fflags, xforward): Targets removed;
(OBJC_O): Added encoding.o;
(OBJC_H): Added encoding.h, removed mutex.h.

From-SVN: r5200
1993-08-24 09:58:45 +00: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
1cd88c716e (objc_msg_sendv): Pass a dummy va_list, not 0, to objc_error.
From-SVN: r4631
1993-06-05 03:00:59 +00:00
Richard Stallman
0a8305859d (copy-headers): chmod the headers, not the dir.
From-SVN: r4625
1993-06-03 04:58:40 +00:00
Richard Stallman
eba92c951e (__objc_init_protocols): Call recursively on super protocols.
(__objc_init_protocols): Call recursively
on super protocols.  Make local var `proto_class' static.

From-SVN: r4544
1993-05-23 19:33:55 +00:00
Richard Stallman
ecd023b662 (objc_protocol): New field `class_pointer'.
From-SVN: r4543
1993-05-23 19:33:36 +00:00
Richard Stallman
5c940d7a7e (sarray_at_put): Add #ifdef case for
!defined(PRECOMPUTE_SELECTORS) and OBJC_SPARSE2.

From-SVN: r4526
1993-05-21 15:39:23 +00:00