Differences From Artifact [e741aba66a]:
- File
src/OFObject.m
— part of check-in
[3dac86b429]
at
2013-12-21 12:58:27
on branch trunk
— -[performSelector:]: Use the normal dispatch.
This has the advantage of being faster. (user: js, size: 25634) [annotate] [blame] [check-ins using]
To Artifact [a55f4922cc]:
- File
src/OFObject.m
— part of check-in
[0c332aa2d2]
at
2013-12-27 02:07:14
on branch trunk
— Rework forwarding API and ABI.
It matches the Apple API and ABI now and the forwarding handler itself
determines whether it should forward or not.This moves handling of +[resolve{Class,Instance}Method:] to the runtime
and allows adding new kinds of forwarding without changing the runtime.Also fixes a potential stack problem in the forwarding for MIPS. (user: js, size: 23913) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
61 62 63 64 65 66 67 | # import "threading.h" #endif #if defined(OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR) extern id of_forward(id, SEL, ...); extern struct stret of_forward_stret(id, SEL, ...); #else | | | | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | # import "threading.h" #endif #if defined(OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR) extern id of_forward(id, SEL, ...); extern struct stret of_forward_stret(id, SEL, ...); #else # define of_forward of_method_not_found # define of_forward_stret of_method_not_found_stret #endif struct pre_ivar { int32_t retainCount; struct pre_mem *firstMem, *lastMem; #if !defined(OF_HAVE_ATOMIC_OPS) && defined(OF_HAVE_THREADS) of_spinlock_t retainCountSpinlock; |
︙ | ︙ | |||
133 134 135 136 137 138 139 | /* * Just in case doesNotRecognizeSelector: returned, even though it must * never return. */ abort(); } | < < < < < < < < < < < < < < < | < < < < | < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | /* * Just in case doesNotRecognizeSelector: returned, even though it must * never return. */ abort(); } void of_method_not_found_stret(void *st, id obj, SEL sel) { of_method_not_found(obj, sel); } #ifndef HAVE_OBJC_ENUMERATIONMUTATION void objc_enumerationMutation(id object) { enumerationMutationHandler(object); } |
︙ | ︙ | |||
275 276 277 278 279 280 281 | @implementation OFObject + (void)load { #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) objc_setUncaughtExceptionHandler(uncaughtExceptionHandler); #endif | < < < < < < | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | @implementation OFObject + (void)load { #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) objc_setUncaughtExceptionHandler(uncaughtExceptionHandler); #endif objc_setForwardHandler(of_forward, of_forward_stret); #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumerationMutationHandler); #endif #if defined(HAVE_ARC4RANDOM) of_hash_seed = arc4random(); |
︙ | ︙ |