gcc/gcc/objc
Jim Wilson 71ebb3b81e toplev.h cleanups...
* objc/Make-lang.h (objc-parse.o): Add toplev.h dependency.
	* objc/objc-parse.y, objc/objc-parse.c: Regenerate.

From-SVN: r19591
1998-05-06 10:05:41 -07:00
..
Make-lang.in toplev.h cleanups... 1998-05-06 10:05:41 -07:00
Makefile.in Makefile.in: Various fixes for building cygwin32 native toolchains. 1998-03-21 16:49:21 -07: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 * objc/Object.m (-error): Call objc_verror with our va_list. 1998-02-22 07:33:39 -08: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 entered into RCS 1995-05-15 23:12:15 -04:00
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 More system.h cutover... 1998-05-06 08:57:18 +00: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 toplev.h cleanups... 1998-05-06 10:05:41 -07:00
objc-parse.y toplev.h cleanups... 1998-05-06 10:05: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 Fixes a problem compiling on sparcs where STRUCT_VALUE is defined in sparc.h to... 1998-04-21 06:50:07 +00: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-vxworks.c gthr.h: Support systems that don't have weak, but have threads. 1998-04-02 16:15:06 -07: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.