Differences From Artifact [4b4eff1419]:
- File
src/OFObject.m
— part of check-in
[d3a2e59414]
at
2012-11-14 15:39:10
on branch trunk
— Initial -[forwarindTargetForSelector:].
This only works with the ObjFW runtime so far. The Apple runtime will
require an assembly implementation for every architecture. (user: js, size: 25411) [annotate] [blame] [check-ins using]
To Artifact [43abec3b5d]:
- File
src/OFObject.m
— part of check-in
[2b20e164d7]
at
2012-11-16 21:16:06
on branch trunk
— Implement forwarding target for the Apple runtime.
Only on x86_64 so far, others to follow. (user: js, size: 25774) [annotate] [blame] [check-ins using]
︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + + + + | #import "instance.h" #if defined(OF_ATOMIC_OPS) # import "atomic.h" #elif defined(OF_THREADS) # import "threading.h" #endif #if defined(OF_APPLE_RUNTIME) && defined(__x86_64__) extern id of_forward(id, SEL, ...); extern struct stret of_forward_stret(id, SEL, ...); #endif struct pre_ivar { int32_t retainCount; struct pre_mem *firstMem, *lastMem; #if !defined(OF_ATOMIC_OPS) && defined(OF_THREADS) of_spinlock_t retainCountSpinlock; #endif |
︙ | |||
109 110 111 112 113 114 115 | 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 | - - - + + + - - | enumeration_mutation_handler(id object) { @throw [OFEnumerationMutationException exceptionWithClass: [object class] object: object]; } |
︙ | |||
157 158 159 160 161 162 163 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | + + - + - - - - + + + + + + | } return objc_msg_lookup(obj, sel); } } /* Try forwardingTargetForSelector: */ if (class_respondsToSelector(object_getClass(obj), @selector(forwardingTargetForSelector:))) { |
︙ | |||
244 245 246 247 248 249 250 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + + + + + | @implementation OFObject + (void)load { #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) objc_setUncaughtExceptionHandler(uncaught_exception_handler); #endif |
︙ |