blob: 324b6807cf3f7cb457a8abbdbafe85e4399623f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
/* Object definition taken from <objc/Object.h>
*/
#ifndef _OBJC_OBJECT1_H_
#define _OBJC_OBJECT1_H_
#undef DO_NEXT_M64_OBJECT_IMPLEMENTATION
#ifndef __NEXT_RUNTIME__
# include <objc/Object.h>
#else
# include "next-abi.h"
# ifndef NEXT_OBJC_USE_NEW_INTERFACE
/* We are on a next system, or version, that is happy to compile V0 ABI */
# include <objc/Object.h>
# else
# if (NEXT_OBJC_ABI_VERSION==0)
/* We are on a system that has V0 ABI implementation in libobjc.dylib.
* However, we need to use the new accessors and pretend that the
* structures are opaque to avoid 'deprecated' warnings
*/
# include <objc/Object.h>
# else
/* We are on a system that includes a V2 ABI Object in libobjc.dylib.
*/
# ifdef __OBJC2__
/* ... and we have a V2 ABI compiler .. */
# include <objc/Object.h>
# else
/* We can't access the Object definition in libobjc.dylib because
* we can't yet generate OBJC2 code.
*
* So we'll roll our own Object - purely for the sake of compile
* checks - the code is unlikely to run...
*/
# ifndef _OBJC_OBJECT_H_
# define _OBJC_OBJECT_H_
#include <stdarg.h>
#import <objc/objc-runtime.h>
/* This is a cut-down Object with only the methods currently required
by the testsuite declared.
For those executables that require an implementation (to link) this
can be provided in a given test by placing:
#include "path/to/objc-c++shared/Object1-implementation.h"
at the end of the source for the test.
*/
@interface Object
{
Class isa; /* A pointer to the instance's class structure */
}
+ initialize;
- init;
+ new;
+ free;
- free;
+ alloc;
//- copy;
//+ allocFromZone:(void *)zone;
//- copyFromZone:(void *)zone;
//- (void *)zone;
+ class;
//+ superclass;
//+ (const char *) name;
- class;
- superclass;
- (const char *) name;
//- self;
//- (unsigned int) hash;
//-(BOOL) isEqual:anObject;
/* Testing inheritance relationships */
//- (BOOL) isKindOf: aClassObject;
//- (BOOL) isMemberOf: aClassObject;
//- (BOOL) isKindOfClassNamed: (const char *)aClassName;
//- (BOOL) isMemberOfClassNamed: (const char *)aClassName;
/* Testing class functionality */
//+ (BOOL) instancesRespondTo:(SEL)aSelector;
//- (BOOL) respondsTo:(SEL)aSelector;
/* Testing protocol conformance */
- (BOOL) conformsTo: (Protocol *)aProtocolObject;
//+ (BOOL) conformsTo: (Protocol *)aProtocolObject;
/* Obtaining method descriptors from protocols */
//- (struct objc_method_description *) descriptionForMethod:(SEL)aSel;
//+ (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
/* Obtaining method handles */
//- (IMP) methodFor:(SEL)aSelector;
//+ (IMP) instanceMethodFor:(SEL)aSelector;
/* Sending messages determined at run time */
//- perform:(SEL)aSelector;
//- perform:(SEL)aSelector with:anObject;
//- perform:(SEL)aSelector with:object1 with:object2;
/* Posing */
//+ poseAs: aClassObject;
/* Enforcing intentions */
//- subclassResponsibility:(SEL)aSelector;
//- notImplemented:(SEL)aSelector;
/* Error handling */
//- doesNotRecognize:(SEL)aSelector;
//- error:(const char *)aString, ...;
/* Debugging */
//- (void) printForDebugger:(void *)stream;
/* Archiving */
//- awake;
//- write:(void *)stream;
//- read:(void *)stream;
//+ (int) version;
//+ setVersion: (int) aVersion;
/* Forwarding */
//- forward: (SEL)sel : (marg_list)args;
//- performv: (SEL)sel : (marg_list)args;
@end
#define DO_NEXT_M64_OBJECT_IMPLEMENTATION
# endif /* _OBJC_OBJECT_H_ */
# endif /* __OBJC2__ */
# endif /* ABI=0 */
# endif /* NEXT_OBJC_USE_NEW_INTERFACE */
# endif /* __NEXT_RUNTIME__ */
#endif /* _OBJC_OBJECT1_H_ */
|