home *** CD-ROM | disk | FTP | other *** search
- head 0.11;
- access;
- symbols;
- locks
- dennisg:0.11; strict;
- comment @ * @;
-
-
- 0.11
- date 91.12.31.20.16.08; author dennisg; state Exp;
- branches;
- next 0.10;
-
- 0.10
- date 91.12.10.12.03.22; author dennisg; state Exp;
- branches;
- next 0.9;
-
- 0.9
- date 91.12.01.01.29.29; author dennisg; state Exp;
- branches;
- next 0.8;
-
- 0.8
- date 91.11.29.22.00.10; author dennisg; state Exp;
- branches;
- next 0.7;
-
- 0.7
- date 91.11.29.20.02.01; author dennisg; state Exp;
- branches;
- next 0.6;
-
- 0.6
- date 91.11.29.13.32.16; author dennisg; state Exp;
- branches;
- next 0.5;
-
- 0.5
- date 91.11.29.00.24.14; author dennisg; state Exp;
- branches;
- next 0.4;
-
- 0.4
- date 91.11.19.12.37.49; author dennisg; state Exp;
- branches;
- next 0.3;
-
- 0.3
- date 91.11.16.15.56.07; author dennisg; state Exp;
- branches;
- next 0.2;
-
- 0.2
- date 91.11.07.22.31.42; author dennisg; state Exp;
- branches;
- next 0.1;
-
- 0.1
- date 91.10.24.00.19.24; author dennisg; state Exp;
- branches;
- next ;
-
-
- desc
- @This file contains function prototypes that are
- private to the Objective-C run-time system.
- @
-
-
- 0.11
- log
- @Deleted index variable stuff. Index variables are a hack to the language.
- Cleaned up some documentation.
- @
- text
- @/* -*-c-*-
- * This file contains prototype declarations of private
- * functions provided by the run-time system.
- *
- * Copyright (C) 1991 Threaded Technologies Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 1, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should receive a copy of the GNU General Public License
- * 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-proto-private.h,v 0.10 1991/12/10 12:03:22 dennisg Exp dennisg $
- $Author: dennisg $
- $Date: 1991/12/10 12:03:22 $
- $Log: ObjC-proto-private.h,v $
- * Revision 0.10 1991/12/10 12:03:22 dennisg
- * Cleaned up file format for a distribution.
- *
- * Revision 0.9 1991/12/01 01:29:29 dennisg
- * modified to remove changes previously made to
- * implement posing. posing just got easy.
- *
- * Revision 0.8 1991/11/29 22:00:10 dennisg
- * modified to implement set functions.
- *
- * Revision 0.7 1991/11/29 20:02:01 dennisg
- * fixed several const decls. bozo.
- *
- * Revision 0.6 1991/11/29 13:32:16 dennisg
- * committed some functions to inline and changes prototypes
- * to match.
- * also added some documentation.
- *
- * Revision 0.5 1991/11/29 00:24:14 dennisg
- * many changes including posing, things to make the compiler
- * happier, structure changes, and things to make it play better.
- *
- * Revision 0.4 1991/11/19 12:37:49 dennisg
- * modified to support changes of run-time.
- *
- * Revision 0.3 1991/11/16 15:56:07 dennisg
- * deleted some prototypes that are no longer part of the
- * implementation.
- * added others.
- *
- * 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.
- *
- */
-
-
- #ifndef _objc_proto_private_INCLUDE_GNU
- #define _objc_proto_private_INCLUDE_GNU
-
-
- #include <ObjC.h>
-
-
- /*
- * This function searches a method list for the indicated method. If found
- * the address of the method structure is returned; Otherwise, NULL is
- * returned.
- */
- Method_t searchForMethodInList (MethodList_t, SEL);
-
- /*
- * This function searches a class's hierarchy for the indicated method.
- *
- * The passed parameter can be of either type Class_t of MetaClass_t.
- *
- * If found the address of the method structure is returned; Otherwise, NULL
- * is returned.
- *
- * If the method is found it is added to the class's method cache.
- */
- Method_t searchForMethodInHierarchy (Class_t, SEL);
-
- /*
- * This function takes a list of methods and adds them to the method list of
- * a class. The method list must remain intact during the lifetime of the
- * class.
- */
- void addMethodsToClass (Class_t, MethodList_t);
-
- /*
- * This function purges the method caches for all of the classes.
- *
- * It is necessary to do this, for example, when methods are added or removed
- * from a class. Methods that are part of a class are not only stored in
- * that classes's method cache but possibly its subclasses as well.
- *
- * When this function is called the system takes a major performance hit.
- */
- void invalidateAllCaches( void );
-
- /*
- * This function is used by the objc_*Class() functions to look for a class
- * given its name.
- *
- * The search technique for both class and meta class functions are the same
- * except which class hash table is searched.
- */
- CacheNode_t searchForClass (Cache_t, const char*);
-
- /*
- * This function creates a new instance of aClass, initializes its isa
- * instance variable to point to the class, and return the new instance.
- *
- * All other instance variables are initialized to 0.
- */
- static inline id
- class_createInstance( Class_t aClass) {
-
- return (*_alloc)(aClass);
- }
-
- /*
- * object_dispose() frees the memory occupied by aObject after setting its
- * isa instance variable to nil, and returns nil. The function it calls to
- * do this work can be changed by reassigning the _dealloc variable.
- */
- static inline id
- object_dispose (id aObject) {
-
- return (*_dealloc)(aObject);
- }
-
- /*
- * object_copy() creates a new object that's an exact copy of anObject and
- * return the new object. The second argument, indexedIvarBytes, specifies
- * the number of additional bytes that should be allocated for the copy to
- * accommodate indexed instance variables; it serves the same purpose as the
- * second argument to class_createInstance(). The function that
- * object_copy() calls to do this work can be changed by reassigning the
- * _copy variable.
- */
- static inline id
- object_copy (id aObject) {
-
- return (*_copy)(aObject);
- }
-
- /*
- * object_realloc() reallocates storage for anObject, adding numBytes if
- * possible. The memory previously occupied by anObject is freed if it can't
- * be reused, and a pointer to the new location of anObject is returned. The
- * function that object_realloc() calls to do this work can be changed by
- * reassigning the _realloc variable.
- */
- static inline id
- object_realloc (id aObject, u_int numBytes) {
-
- return (*_realloc)(aObject, numBytes);
- }
-
- /*
- * This function causes one class to pose as its super class. Messages sent
- * to the super class will actually be sent to the posing class.
- *
- * Instance variables should not be declared in the posing class. The posing
- * class can add new methods to the class or override existing methods in the
- * super class.
- */
- Class_t class_poseAs(Class_t, Class_t);
-
- /* These functions set and return the class version number. */
- static inline void
- class_setVersion(Class_t aClass, long theVersion) {
-
- aClass->version = theVersion ;
- aClass->isa->version = theVersion ;
- }
-
- static inline long
- class_getVersion(Class_t aClass) {
-
- return aClass->version ;
- }
-
-
- #endif
-
- @
-
-
- 0.10
- log
- @Cleaned up file format for a distribution.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.9 1991/12/01 01:29:29 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/12/01 01:29:29 $
- d24 3
- d71 3
- a73 3
- * This function searches a method list for the indicated
- * method. If found the address of the method structure
- * is returned; Otherwise, NULL is returned.
- d78 1
- a78 2
- * This function searches a class's hierarchy for the
- * indicated method.
- d80 1
- a80 2
- * The passed parameter can be of either type Class_t
- * of MetaClass_t.
- d82 2
- a83 2
- * If found the address of the method structure is
- * returned; Otherwise, NULL is returned.
- d85 1
- a85 2
- * If the method is found it is added to the
- * class's method cache.
- d90 3
- a92 3
- * This function takes a list of methods and adds them
- * to the method list of a class. The method list must
- * remain intact during the lifetime of the class.
- d97 1
- a97 2
- * This function purges the method caches for all of the
- * classes.
- d99 3
- a101 4
- * It is necessary to do this, for example, when methods are added
- * or removed from a class. Methods that are part of a class are
- * not only stored in that classes's method cache but possibly its
- * subclasses as well.
- d103 1
- a103 2
- * When this function is called the system takes a major
- * performance hit.
- d108 2
- a109 2
- * This function is used by the objc_*Class() functions to
- * look for a class given its name.
- d111 2
- a112 2
- * The search technique for both class and meta class functions
- * are the same except which class hash table is searched.
- d117 2
- a118 3
- * This function creates a new instance of aClass,
- * initializes its isa instance variable to point
- * to the class, and return the new instance.
- d120 1
- a120 1
- * All other instance variables are initialized to 0.
- d123 1
- a123 1
- class_createInstance( Class_t aClass, u_int idxIvars) {
- d125 1
- a125 1
- return (*_alloc)(aClass, idxIvars);
- d129 3
- a131 5
- * object_dispose() frees the memory occupied by
- * aObject after setting its isa instance variable to nil,
- * and returns nil.
- * The function it calls to do this work can be changed
- * by reassigning the _dealloc variable.
- d140 8
- a147 9
- * object_copy() creates a new object that's an exact copy
- * of anObject and return the new object. The second argument,
- * indexedIvarBytes, specifies the number of additional
- * bytes that should be allocated for the copy to
- * accommodate indexed instance variables; it serves the
- * same purpose as the second argument to class_createInstance().
- * The function that object_copy() calls to do this work can be
- * changed by reassigning the _copy variable.
- */
- d149 1
- a149 1
- object_copy (id aObject, u_int indexedIvarBytes) {
- d151 1
- a151 1
- return (*_copy)(aObject, indexedIvarBytes);
- d155 5
- a159 7
- * object_realloc() reallocates storage for anObject,
- * adding numBytes if possible. The memory previously
- * occupied by anObject is freed if it can't be reused,
- * and a pointer to the new location of anObject is
- * returned.
- * The function that object_realloc() calls to do this
- * work can be changed by reassigning the _realloc variable.
- d168 2
- a169 3
- * This function causes one class to pose as its
- * super class. Messages sent to the super class will
- * actually be sent to the posing class.
- d171 3
- a173 3
- * Instance variables should not be declared in the
- * posing class. The posing class can add new methods to
- * the class or override existing methods in the super class.
- d177 1
- a177 4
- /*
- * These functions set and return the
- * class version number.
- */
- @
-
-
- 0.9
- log
- @modified to remove changes previously made to
- implement posing. posing just got easy.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.8 1991/11/29 22:00:10 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/29 22:00:10 $
- d24 4
- d72 1
- a72 1
- Method_t searchForMethodInList (MethodList_t, SEL);
- d76 1
- a76 1
- * indicated method.
- d79 1
- a79 1
- * of MetaClass_t.
- d82 1
- a82 1
- * returned; Otherwise, NULL is returned.
- d85 1
- a85 1
- * class's method cache.
- d87 1
- a87 1
- Method_t searchForMethodInHierarchy (Class_t, SEL);
- d91 2
- a92 2
- * to the method list of a class. The method list must
- * remain intact during the lifetime of the class.
- d94 1
- a94 1
- void addMethodsToClass (Class_t, MethodList_t);
- d98 1
- a98 1
- * classes.
- d101 3
- a103 3
- * or removed from a class. Methods that are part of a class are
- * not only stored in that classes's method cache but possibly its
- * subclasses as well.
- d106 1
- a106 1
- * performance hit.
- d108 1
- a108 1
- void invalidateAllCaches( void );
- d112 1
- a112 1
- * look for a class given its name.
- d115 1
- a115 1
- * are the same except which class hash table is searched.
- d117 1
- a117 1
- CacheNode_t searchForClass (Cache_t, const char*);
- d126 2
- a127 2
- static inline id
- class_createInstance( Class_t aClass, u_int idxIvars) {
- d129 1
- a129 1
- return (*_alloc)(aClass, idxIvars);
- d134 2
- a135 2
- * aObject after setting its isa instance variable to nil,
- * and returns nil.
- d137 1
- a137 1
- * by reassigning the _dealloc variable.
- d139 4
- a142 4
- static inline id
- object_dispose (id aObject) {
-
- return (*_dealloc)(aObject);
- d147 5
- a151 5
- * of anObject and return the new object. The second argument,
- * indexedIvarBytes, specifies the number of additional
- * bytes that should be allocated for the copy to
- * accommodate indexed instance variables; it serves the
- * same purpose as the second argument to class_createInstance().
- d153 1
- a153 1
- * changed by reassigning the _copy variable.
- d155 2
- a156 2
- static inline id
- object_copy (id aObject, u_int indexedIvarBytes) {
- d158 1
- a158 1
- return (*_copy)(aObject, indexedIvarBytes);
- d163 4
- a166 4
- * adding numBytes if possible. The memory previously
- * occupied by anObject is freed if it can't be reused,
- * and a pointer to the new location of anObject is
- * returned.
- d168 1
- a168 1
- * work can be changed by reassigning the _realloc variable.
- d170 2
- a171 2
- static inline id
- object_realloc (id aObject, u_int numBytes) {
- d173 1
- a173 1
- return (*_realloc)(aObject, numBytes);
- d178 2
- a179 2
- * super class. Messages sent to the super class will
- * actually be sent to the posing class.
- d182 2
- a183 2
- * posing class. The posing class can add new methods to
- * the class or override existing methods in the super class.
- d185 1
- a185 1
- Class_t class_poseAs(Class_t, Class_t);
- d189 1
- a189 1
- * class version number.
- d192 1
- a192 1
- class_setVersion(Class_t aClass, long theVersion) {
- d194 2
- a195 2
- aClass->version = theVersion ;
- aClass->isa->version = theVersion ;
- d199 1
- a199 1
- class_getVersion(Class_t aClass) {
- d201 1
- a201 1
- return aClass->version ;
- @
-
-
- 0.8
- log
- @modified to implement set functions.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.7 1991/11/29 20:02:01 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/29 20:02:01 $
- d24 3
- a81 3
- *
- * The last parameter is set true if the method is being
- * searched via [ super ??? ].
- d83 1
- a83 1
- Method_t searchForMethodInHierarchy (Class_t, SEL, BOOL);
- @
-
-
- 0.7
- log
- @fixed several const decls. bozo.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.6 1991/11/29 13:32:16 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/29 13:32:16 $
- d24 3
- d65 1
- a65 1
- Method_t searchForMethodInList (MethodList_t, SEL);
- d83 1
- a83 1
- Method_t searchForMethodInHierarchy (Class_t, SEL, BOOL);
- d90 1
- a90 1
- void addMethodsToClass (Class_t, MethodList_t);
- d104 1
- a104 1
- void invalidateAllCaches( void );
- d113 86
- a198 1
- CacheNode_t searchForClass (Cache_t, const char*);
- @
-
-
- 0.6
- log
- @committed some functions to inline and changes prototypes
- to match.
- also added some documentation.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.5 1991/11/29 00:24:14 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/29 00:24:14 $
- d24 5
- d110 1
- a110 1
- CacheNode_t searchForClass (Cache_t, STR const);
- @
-
-
- 0.5
- log
- @many changes including posing, things to make the compiler
- happier, structure changes, and things to make it play better.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.4 1991/11/19 12:37:49 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/19 12:37:49 $
- d24 4
- d92 3
- d105 1
- a105 1
- CacheNode_t searchForClass (Cache_t, STR const);
- @
-
-
- 0.4
- log
- @modified to support changes of run-time.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.3 1991/11/16 15:56:07 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/16 15:56:07 $
- d24 3
- d53 1
- a53 1
- Method_t searchForMethodInList( MethodList_t, SEL );
- d67 3
- d71 28
- a98 1
- Method_t searchForMethodInHierarchy( Class_t, SEL );
- @
-
-
- 0.3
- log
- @deleted some prototypes that are no longer part of the
- implementation.
- added others.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.2 1991/11/07 22:31:42 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/11/07 22:31:42 $
- d24 5
- d35 1
- a35 1
- */
- d50 16
- a65 1
- Method_t searchForMethod( MethodList_t, SEL );
- @
-
-
- 0.2
- log
- @added copyleft.
- @
- text
- @d20 1
- a20 1
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC-proto-private.h,v 0.1 1991/10/24 00:19:24 dennisg Exp dennisg $
- d22 1
- a22 1
- $Date: 1991/10/24 00:19:24 $
- d24 3
- a40 28
- * Given the name of a meta class, return its data
- * structure within the DATA segment used by
- * the run-time.
- */
- MetaClass_t _objc_getMetaClass( const char* );
- /*
- * Given the name of a meta class, return the cache node
- * used by the run-time to translate a TEXT structure to
- * its DATA counterpart.
- *
- * theKey is the TEXT value and theValue is the DATA value.
- */
- CacheNode_t _objc_getMetaClassNode( const char* );
- /*
- * Given the name of a class, return its data
- * structure within the DATA segment used by
- * the run-time.
- */
- Class_t _objc_getClass( const char* );
- /*
- * Given the name of a class, return the cache node
- * used by the run-time to translate a TEXT structure to
- * its DATA counterpart.
- *
- * theKey is the TEXT value and theValue is the DATA value.
- */
- CacheNode_t _objc_getClassNode( const char* );
- /*
- a45 7
-
-
- /*
- * List host specific functions to load the
- * class hash tables.
- */
- void objc_load_NeXT_MachO( void );
- @
-
-
- 0.1
- log
- @Initial check in. Preliminary development stage.
- @
- text
- @d5 22
- a26 4
- $Header$
- $Author$
- $Date$
- $Log$
- @
-