gcc/gcc/objc
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
..
Make-lang.in Make-lang.in: Create runtime-info.h and libobjc_entry.o in the build directory. 1997-12-18 16:27:58 -07:00
Makefile.in Comment out lines containing just formfeeds. 1997-07-21 23:17:44 +00:00
NXConstStr.h Add special exception to copyright notice. 1997-06-22 06:13:57 -04:00
NXConstStr.m Add special exception to copyright notice. 1997-06-22 06:13:57 -04:00
Object.h Update FSF address. 1995-06-15 08:37:21 -04:00
Object.m (-error:): Call objc_error function instead of using function pointer. 1997-02-02 19:38:23 -05:00
Protocol.h Update FSF address. 1995-06-15 08:37:21 -04:00
Protocol.m Update FSF address. 1995-06-15 08:37:21 -04:00
README
README.threads Delete reference to thread-test. 1996-03-05 09:13:24 -05:00
THREADS Reorganize thread implementation to make a clearly defined 1997-06-25 16:23:17 -04:00
THREADS.MACH entered into RCS 1996-05-17 08:27:31 -04:00
archive.c Replace call to abort or __objc_fatal functions with call to objc_error function throughout the complete file. 1997-02-02 19:39:00 -05:00
class.c (objc_get_class): Replace call to abort function with call to 1997-02-02 19:39:22 -05:00
config-lang.in Print message about ObjC thread file. 1997-06-27 18:49:49 -04:00
encoding.c (objc_sizeof_type, objc_alignof_type): Replace call to abort function with call to objc_error function. 1997-02-02 19:39:52 -05:00
encoding.h (method_get_sizeof_arguments): Fix typo. 1997-06-25 16:12:49 -04:00
hash.c (hash_delete): Step through the hash nodes versus using hash_next to 1997-02-02 19:42:48 -05:00
hash.h Include objc/objc.h here instead of in objc/hash.c to get BOOL typedef. 1996-05-17 08:12:32 -04:00
init.c (objc_send_load): New function. 1997-06-25 16:12:28 -04:00
libobjc.def Initial revision 1997-06-27 19:36:32 -04:00
libobjc_entry.c Initial revision 1997-06-27 19:36:32 -04:00
linking.m Initial revision 1997-03-15 07:56:24 -05:00
makefile.dos Changes to compile new files and name renaming. 1996-03-05 09:06:02 -05:00
misc.c (objc_verror): New function. 1997-02-02 19:41:03 -05:00
nil_method.c Initial revision 1996-05-17 08:17:48 -04:00
objc-act.c cse.c (rtx_cost): Add default case in enumeration switch. 1997-12-22 02:31:41 -07:00
objc-act.h Update FSF address. 1995-06-15 07:54:32 -04:00
objc-api.h (OBJC_ERR_BAD_STATE): New error code. 1997-06-25 16:13:21 -04:00
objc-list.h Replace use of __obj_xmalloc and free with objc_malloc and objc_free. 1996-09-22 10:36:59 -04:00
objc-parse.c Rebuild after recent changes. 1997-12-12 08:58:02 -07:00
objc-parse.y objc-act.c (lang_report_error_function): Disable. 1997-12-11 23:20:41 -07:00
objc-tree.def tree.c, tree.h: Change tree_code_type, tree_code_length, and tree_code_name from pointers to arrays. 1997-12-11 23:49:29 -07:00
objc.gperf
objc.h (BOOL): Define BOOL as int for VxWorks. 1996-09-23 22:45:12 -04:00
objects.c Replace use of __obj_xmalloc and free with objc_malloc and objc_free. 1996-09-22 10:36:59 -04:00
runtime.h (__objc_register_instance_methods_to_class): New function. 1997-06-25 16:14:08 -04:00
sarray.c Replace use of __objc_xmalloc and free with objc_malloc and objc_free. 1996-09-22 10:49:59 -04:00
sarray.h (__objc_xmalloc, __objc_xrealloc): Delete. 1996-09-22 10:39:18 -04:00
selector.c (__objc_register_instance_methods_to_class): New function. 1997-06-25 16:13:42 -04:00
sendmsg.c (search_for_method_in_list): No longer static. 1997-06-27 19:30:41 -04:00
thr-dce.c Makefile.in (GTHREAD_FLAGS): New var. 1997-12-24 16:56:08 -07:00
thr-decosf1.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-irix.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-mach.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-os2.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-posix.c (__objc_thread_yield): Use sched_yield instead. 1997-06-27 10:47:07 -04:00
thr-pthreads.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-single.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-solaris.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr-win32.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr.c Completely rework according to new interface. 1997-06-25 16:25:24 -04:00
thr.h Define front-end/back-end interface functions and structures. 1997-06-25 16:25:39 -04:00
typedstream.h Update FSF address. 1995-06-15 08:55:05 -04:00

README

GNU Objective C notes
*********************

This document is to explain what has been done, and a little about how
specific features differ from other implementations.  The runtime has
been completely rewritten in gcc 2.4.  The earlier runtime had several
severe bugs and was rather incomplete.  The compiler has had several
new features added as well.

This is not documentation for Objective C, it is usable to someone
who knows Objective C from somewhere else.


Runtime API functions
=====================

The runtime is modeled after the NeXT Objective C runtime.  That is,
most functions have semantics as it is known from the NeXT.  The
names, however, have changed.  All runtime API functions have names
of lowercase letters and and underscores as opposed to the
`traditional' mixed case names.  
	The runtime api functions are not documented as of now.
Someone offered to write it, and did it, but we were not allowed to
use it by his university (Very sad story).  We have started writing
the documentation over again.  This will be announced in appropriate
places when it becomes available.


Protocols
=========

Protocols are now fully supported.  The semantics is exactly as on the
NeXT.  There is a flag to specify how protocols should be typechecked
when adopted to classes.  The normal typechecker requires that all
methods in a given protocol must be implemented in the class that
adopts it -- it is not enough to inherit them.  The flag
`-Wno-protocol' causes it to allow inherited methods, while
`-Wprotocols' is the default which requires them defined.


+initialize 
===========

This method, if defined, is called before any other instance or class
methods of that particular class.  This method is not inherited, and
is thus not called as initializer for a subclass that doesn't define
it itself.  Thus, each +initialize method is called exactly once (or
never if no methods of that particular class is never called).
Besides this, it is allowed to have several +initialize methods, one
for each category.  The order in which these (multiple methods) are
called is not well defined.  I am not completely certain what the
semantics of this method is for other implementations, but this is
how it works for GNU Objective C.


Passivation/Activation/Typedstreams
===================================

This is supported in the style of NeXT TypedStream's.  Consult the
headerfile Typedstreams.h for api functions.  I (Kresten) have
rewritten it in Objective C, but this implementation is not part of
2.4, it is available from the GNU Objective C prerelease archive. 
   There is one difference worth noting concerning objects stored with
objc_write_object_reference (aka NXWriteObjectReference).  When these
are read back in, their object is not guaranteed to be available until
the `-awake' method is called in the object that requests that object.
To objc_read_object you must pass a pointer to an id, which is valid
after exit from the function calling it (like e.g. an instance
variable).  In general, you should not use objects read in until the
-awake method is called.


Acknowledgements
================

The GNU Objective C team: Geoffrey Knauth <gsk@marble.com> (manager),
Tom Wood <wood@next.com> (compiler) and Kresten Krab Thorup
<krab@iesd.auc.dk> (runtime) would like to thank a some people for
participating in the development of the present GNU Objective C.

Paul Burchard <burchard@geom.umn.edu> and Andrew McCallum
<mccallum@cs.rochester.edu> has been very helpful debugging the
runtime.   Eric Herring <herring@iesd.auc.dk> has been very helpful
cleaning up after the documentation-copyright disaster and is now
helping with the new documentation.

Steve Naroff <snaroff@next.com> and Richard Stallman
<rms@gnu.ai.mit.edu> has been very helpful with implementation details
in the compiler.


Bug Reports
===========

Please read the section `Submitting Bugreports' of the gcc manual
before you submit any bugs.