Overview
Comment: | Multiple dtable / sparse array improvements
* dtable.m is now the old sparse array, using IMP as type for values and |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1ebb9eb7b3b52c548f98eb4e6a9a5222 |
User & Date: | js on 2014-05-15 15:32:35 |
Other Links: | manifest | tags |
Context
2014-05-15
| ||
15:32 | Fix a few instances of signed vs. unsigned check-in: 7f0359ce68 user: js tags: trunk | |
15:32 | Multiple dtable / sparse array improvements check-in: 1ebb9eb7b3 user: js tags: trunk | |
15:17 | Don't declare objc_classname_to_class inline check-in: e23441b121 user: js tags: trunk | |
Changes
Modified src/OFObject.m from [a836174d3d] to [31f7e1ca7d].
︙ | |||
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | + + + + | @implementation OFObject + (void)load { #if !defined(OF_APPLE_RUNTIME) || defined(__OBJC2__) objc_setUncaughtExceptionHandler(uncaughtExceptionHandler); #endif #if defined(OF_APPLE_RUNTIME) objc_setForwardHandler((void*)&of_forward, (void*)&of_forward_stret); #else objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret); #endif #ifdef HAVE_OBJC_ENUMERATIONMUTATION objc_setEnumerationMutationHandler(enumerationMutationHandler); #endif #if defined(HAVE_ARC4RANDOM) of_hash_seed = arc4random(); |
︙ |
Modified src/runtime/Makefile from [9343c57ff2] to [19c7e25279].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + | include ../../extra.mk SUBDIRS = lookup-asm STATIC_PIC_LIB_NOINST = ${RUNTIME_LIB_A} STATIC_LIB_NOINST = ${RUNTIME_A} SRCS = arc.m \ category.m \ class.m \ dtable.m \ exception.m \ hashtable.m \ init.m \ lookup.m \ property.m \ protocol.m \ selector.m \ |
︙ |
Modified src/runtime/class.m from [ae710a7cad] to [79ebd88d66].
︙ | |||
21 22 23 24 25 26 27 | 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 | - - - - - + - + - + | #include <string.h> #include <assert.h> #import "runtime.h" #import "runtime-private.h" |
︙ | |||
78 79 80 81 82 83 84 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + | objc_register_selector( (struct objc_abi_selector*)&ml->methods[i]); } Class objc_classname_to_class(const char *name, bool cache) { |
︙ | |||
104 105 106 107 108 109 110 | 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 | - + - - - - + - - - - - - - + - - + - + - + - - - - - - - - - - - - - + - - - - - - + - - - + - - + - - + | * * Runtime internal usage does not use the fast path and does not count * as a call into objc_classname_to_class(). The reason for this is * that if the runtime calls into objc_classname_to_class(), it already * has the lock and thus the performance gain would be small, but it * would waste memory. */ |
︙ | |||
215 216 217 218 219 220 221 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + - + - + - + | struct objc_category **cats; unsigned int i; if (!(cls->info & OBJC_CLASS_INFO_DTABLE)) return; if (cls->dtable == empty_dtable) |
︙ | |||
841 842 843 844 845 846 847 | 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | - + | if (rcls->subclass_list != NULL) { free(rcls->subclass_list); rcls->subclass_list = NULL; } if (rcls->dtable != NULL && rcls->dtable != empty_dtable) |
︙ | |||
869 870 871 872 873 874 875 | 834 835 836 837 838 839 840 841 842 843 844 845 846 847 | - - - - - - - - - - - - - - | if (strcmp(class_getName(cls), "Protocol") != 0) classes_cnt--; unregister_class(cls); unregister_class(cls->isa); } |
︙ | |||
916 917 918 919 920 921 922 | 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 | - + - - + + | i = UINT_FAST32_MAX; } } assert(classes_cnt == 0); if (empty_dtable != NULL) { |
Added src/runtime/dtable.m version [397b45eb7b].