mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-09 11:57:24 +08:00
changed the defs for class structures for new implementation of run-time.
changed def of SEL back to its original type. From-SVN: r61
This commit is contained in:
parent
defc614f04
commit
5b54889788
@ -19,10 +19,13 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
$Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.1 1991/10/24 00:19:24 dennisg Exp dennisg $
|
||||
$Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.2 1991/11/07 22:31:42 dennisg Exp dennisg $
|
||||
$Author: dennisg $
|
||||
$Date: 1991/10/24 00:19:24 $
|
||||
$Date: 1991/11/07 22:31:42 $
|
||||
$Log: ObjC.h,v $
|
||||
* Revision 0.2 1991/11/07 22:31:42 dennisg
|
||||
* added copyleft.
|
||||
*
|
||||
* Revision 0.1 1991/10/24 00:19:24 dennisg
|
||||
* Initial check in. Preliminary development stage.
|
||||
*
|
||||
@ -53,12 +56,18 @@ typedef char BOOL;
|
||||
#define YES (BOOL)1
|
||||
#define NO (BOOL)0
|
||||
|
||||
/* Defination of a
|
||||
/* Definition of a
|
||||
selector. Selectors are
|
||||
really of type char*. The
|
||||
run-time uses strcmp() to
|
||||
locate selectors. */
|
||||
typedef STR SEL;
|
||||
run-time hashes the
|
||||
string's address to locate
|
||||
the method. If the method
|
||||
isn't in the hash table then
|
||||
a search is made through the
|
||||
class hierarchy using
|
||||
strcmp() to locate the
|
||||
method. */
|
||||
typedef struct objc_selector* SEL;
|
||||
|
||||
/* ObjC uses this typedef
|
||||
for untyped instances. */
|
||||
@ -68,11 +77,7 @@ typedef struct objc_object {
|
||||
|
||||
/* Prototype for method
|
||||
functions. */
|
||||
typedef id ( *IMP )(
|
||||
#ifdef __STDC__
|
||||
id, SEL, ...
|
||||
#endif
|
||||
);
|
||||
typedef id ( *IMP )( id, SEL, ... );
|
||||
|
||||
/* Filer types used to
|
||||
describe Ivars and
|
||||
@ -163,10 +168,8 @@ typedef struct objc_symtab {
|
||||
* module structure of the executable.
|
||||
*/
|
||||
typedef struct objc_module {
|
||||
u_long version; /* Unknown. */
|
||||
u_long size; /* Suspect this is
|
||||
sizeof(Module). It is always
|
||||
16. */
|
||||
u_long version; /* Compiler revision. */
|
||||
u_long size; /* sizeof(Module). */
|
||||
char* name; /* Name of the file where the
|
||||
module was generated. The
|
||||
name includes the path. */
|
||||
@ -250,25 +253,27 @@ typedef struct objc_method_list {
|
||||
*
|
||||
* This structure is generated by the compiler in the
|
||||
* executable and used by the run-time during normal
|
||||
* messaging operations. Therefore some definitions
|
||||
* don't make sense in some contexts.
|
||||
* messaging operations. Therefore some members
|
||||
* change type.
|
||||
* The compiler generates "char* const" and places a string
|
||||
* in the following member variables: isa and super_class.
|
||||
*/
|
||||
typedef struct objc_metaClass {
|
||||
char* isa; /* Always a pointer to the
|
||||
string "Object". */
|
||||
char* super_class; /* Name of the class's super
|
||||
class. */
|
||||
char* name; /* Name of the meta class. */
|
||||
long version; /* Unknown. */
|
||||
long info; /* Bit mask. See class masks
|
||||
struct objc_metaClass* isa; /* Pointer to Object meta
|
||||
class. */
|
||||
struct objc_metaClass* super_class; /* Pointer to meta class's
|
||||
super meta class. */
|
||||
char* name; /* Name of the meta class. */
|
||||
long version; /* Unknown. */
|
||||
long info; /* Bit mask. See class masks
|
||||
defined above. */
|
||||
long instance_size; /* Always 0 except for Object.
|
||||
long instance_size; /* Always 0 except for Object.
|
||||
Should be ignored. */
|
||||
IvarList_t ivars; /* Always NULL except for
|
||||
IvarList_t ivars; /* Always NULL except for
|
||||
Object. Should be ignored. */
|
||||
MethodList_t methods; /* Linked List of factory methods
|
||||
MethodList_t methods; /* Linked List of factory methods
|
||||
for the class. */
|
||||
Cache_t cache; /* Used to cache factory methods
|
||||
Cache_t cache; /* Used to cache factory methods
|
||||
defined for the class and its
|
||||
super classes. Entries are
|
||||
made to the cache as the
|
||||
@ -284,33 +289,35 @@ typedef struct objc_metaClass {
|
||||
*
|
||||
* This structure is generated by the compiler in the
|
||||
* executable and used by the run-time during normal
|
||||
* messaging operations. Therefore some definitions
|
||||
* don't make sense in some contexts.
|
||||
* messaging operations. Therefore some members
|
||||
* change type.
|
||||
* The compiler generates "char* const" and places a string
|
||||
* in the following member variables: super_class.
|
||||
*/
|
||||
typedef struct objc_class {
|
||||
MetaClass_t isa; /* Pointer to the class's
|
||||
MetaClass_t isa; /* Pointer to the class's
|
||||
meta class. */
|
||||
char* super_class; /* Name of the class's super
|
||||
class. */
|
||||
char* name; /* Name of the class. */
|
||||
long version; /* Unknown. */
|
||||
long info; /* Bit mask. See class masks
|
||||
struct objc_class* super_class; /* Pointer to the super
|
||||
class. */
|
||||
char* name; /* Name of the class. */
|
||||
long version; /* Unknown. */
|
||||
long info; /* Bit mask. See class masks
|
||||
defined above. */
|
||||
long instance_size; /* Size in bytes of the class.
|
||||
long instance_size; /* Size in bytes of the class.
|
||||
The sum of the class definition
|
||||
and all super class
|
||||
definitions. */
|
||||
IvarList_t ivars; /* Pointer to a structure that
|
||||
IvarList_t ivars; /* Pointer to a structure that
|
||||
describes the instance
|
||||
variables in the class
|
||||
definition. NULL indicates
|
||||
no instance variables. Does
|
||||
not include super class
|
||||
variables. */
|
||||
MethodList_t methods; /* Linked list of instance
|
||||
MethodList_t methods; /* Linked list of instance
|
||||
methods defined for the
|
||||
class. */
|
||||
Cache_t cache; /* Used to cache instance methods
|
||||
Cache_t cache; /* Used to cache instance methods
|
||||
defined for the class and its
|
||||
super classes. Entries are
|
||||
made to the cache as the
|
||||
|
Loading…
Reference in New Issue
Block a user