Changes In Branch runtime Through [963db3089f] Excluding Merge-Ins
This is equivalent to a diff from 66db4586f7 to 963db3089f
2012-05-10
| ||
18:38 | Return objects as void* instead of const void*. check-in: bc531024f5 user: js tags: runtime | |
18:21 | objc_hashtable_alloc() -> objc_hashtable_new(). check-in: 963db3089f user: js tags: runtime | |
2012-05-09
| ||
13:55 | Initialize classes on the first dispatch. check-in: dcf845546a user: js tags: runtime | |
2012-04-25
| ||
09:15 | objfw-compile: Allow -std=*. check-in: 74f283ce2a user: js tags: trunk | |
2012-04-21
| ||
11:31 | Merge branch 'master' into runtime check-in: 676e09bf77 user: js tags: runtime | |
11:02 | Fix __has_feature check. check-in: 66db4586f7 user: js tags: trunk | |
10:30 | Use __objc_yes and __objc_no if available. check-in: e571ecccc0 user: js tags: trunk | |
Modified configure.ac from [8413d47c07] to [a12f19a3e6].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - + - - + - - - - - - - - | esac AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"]) AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings" AC_SUBST(NO_CONST_CFSTRINGS, "-fno-constant-cfstrings") ]) |
︙ | |||
124 125 126 127 128 129 130 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | AC_SUBST(OFBLOCKTESTS_M, "OFBlockTests.m") AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) OBJCFLAGS="$old_OBJCFLAGS" ]) |
︙ | |||
240 241 242 243 244 245 246 247 248 249 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + | AS_IF([test x"$PLUGIN_SUFFIX" != x""], [ AC_SUBST(OFPLUGIN_M, "OFPlugin.m") AC_SUBST(OFPLUGINTESTS_M, "OFPluginTests.m") AC_SUBST(TESTPLUGIN, "plugin") AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support]) AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS") ]) objc_runtime="ObjFW runtime" AC_CHECK_HEADER(objc/objc.h) AC_MSG_CHECKING(which Objective C runtime to use) AC_ARG_ENABLE(runtime, AS_HELP_STRING([--enable-runtime], [use the included runtime])) AC_ARG_ENABLE(seluid16, AS_HELP_STRING([--enable-seluid16], [use only 16 bit for selectors UIDs])) AS_IF([test x"$enable_runtime" != x"yes"], [ AS_IF([test x"$ac_cv_header_objc_objc_h" = x"yes"], [ dnl TODO: This is ugly. Let's think of a better check. AC_EGREP_CPP(yes, [ #import <objc/objc.h> #ifdef __objc_INCLUDE_GNU yes #endif ], [ dnl We don't want the GNU runtime ], [ objc_runtime="Apple runtime" ]) ]) ]) AC_MSG_RESULT($objc_runtime) case $objc_runtime in "ObjFW runtime") AC_DEFINE(OF_OBJFW_RUNTIME, 1, [Whether we use the ObjFW runtime]) GNU_RUNTIME="-fgnu-runtime" OBJCFLAGS="$OBJCFLAGS -fgnu-runtime" RUNTIME_FLAGS="-fgnu-runtime" AX_CHECK_COMPILER_FLAGS(-fno-objc-nonfragile-abi, [ OBJCFLAGS="$OBJCFLAGS -fno-objc-nonfragile-abi" GNU_RUNTIME="$GNU_RUNTIME -fno-objc-nonfragile-abi" ]) AC_SUBST(GNU_RUNTIME) AC_SUBST(RUNTIME, "runtime") if test x"$enable_shared" != x"no"; then AC_SUBST(RUNTIME_LIB_A, "runtime.lib.a") AC_SUBST(RUNTIME_RUNTIME_LIB_A, "runtime/runtime.lib.a") fi if test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"; then AC_SUBST(RUNTIME_A, "runtime.a") AC_SUBST(RUNTIME_RUNTIME_A, "runtime/runtime.a") fi AC_EGREP_CPP(yes, [ #if defined(__amd64__) || defined(__x86_64__) # ifdef __ELF__ yes # endif #endif ], [ AC_SUBST(LOOKUP_S, lookup-amd64-elf.S) AC_DEFINE(OF_ASM_LOOKUP, 1, [Whether to use lookup in assembly]) ], [ AC_EGREP_CPP(yes, [ #if defined(__i386__) && defined(__ELF__) yes #endif ], [ AC_SUBST(LOOKUP_S, lookup-x86-elf.S) AC_DEFINE(OF_ASM_LOOKUP, 1, [Whether to use lookup in assembly]) ]) ]) AS_IF([test x"$enable_seluid16" = x"yes"], [ AC_DEFINE(OF_SELUID16, 1, [Whether to use 16 bit selector UIDs]) ]) ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_CHECK_LIB(objc, objc_msgSend, [ LIBS="-lobjc $LIBS" ], [ AC_MSG_ERROR([libobjc not found!]) ]) ;; esac AC_CHECK_FUNC(objc_enumerationMutation, [ AC_DEFINE(HAVE_OBJC_ENUMERATIONMUTATION, 1, [Whether we have objc_enumerationMutation]) ]) case "$host_os" in darwin*) |
︙ | |||
405 406 407 408 409 410 411 | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - - - - - - | AC_DEFINE(OF_THREADS, 1, [Whether we have threads]) AC_SUBST(OFTHREAD_M, "OFThread.m") AC_SUBST(OFTHREADTESTS_M, "OFThreadTests.m") AC_SUBST(OFHTTPREQUESTTESTS_M, "OFHTTPRequestTests.m") AC_SUBST(THREADING_H, "threading.h") |
︙ | |||
574 575 576 577 578 579 580 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - + | AC_MSG_RESULT($have_threadsafe_getaddrinfo) ]) ], [ AC_MSG_RESULT(no) ]) |
︙ |
Modified extra.mk.in from [c78962a205] to [21c2490513].
︙ | |||
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 | 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 | + + + + + + | ATOMIC_H = @ATOMIC_H@ BIN_PREFIX = @BIN_PREFIX@ EXCEPTIONS_A = @EXCEPTIONS_A@ EXCEPTIONS_EXCEPTIONS_A = @EXCEPTIONS_EXCEPTIONS_A@ EXCEPTIONS_EXCEPTIONS_LIB_A = @EXCEPTIONS_EXCEPTIONS_LIB_A@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ FOUNDATION_COMPAT_M = @FOUNDATION_COMPAT_M@ LOOKUP_S = @LOOKUP_S@ MACH_ALIAS_LIST = @MACH_ALIAS_LIST@ OFBLOCKTESTS_M = @OFBLOCKTESTS_M@ OBJC_PROPERTIES_M = @OBJC_PROPERTIES_M@ OBJC_SYNC_M = @OBJC_SYNC_M@ OFHTTPREQUESTTESTS_M = @OFHTTPREQUESTTESTS_M@ OFPLUGIN_M = @OFPLUGIN_M@ OFPLUGINTESTS_M = @OFPLUGINTESTS_M@ OFSTREAMOBSERVER_KQUEUE_M = @OFSTREAMOBSERVER_KQUEUE_M@ OFSTREAMOBSERVER_POLL_M = @OFSTREAMOBSERVER_POLL_M@ OFSTREAMOBSERVER_SELECT_M = @OFSTREAMOBSERVER_SELECT_M@ OFTHREAD_M = @OFTHREAD_M@ OFTHREADTESTS_M = @OFTHREADTESTS_M@ PROPERTIESTESTS_M = @PROPERTIESTESTS_M@ REEXPORT_LIBOBJC = @REEXPORT_LIBOBJC@ RUNTIME = @RUNTIME@ RUNTIME_A = @RUNTIME_A@ RUNTIME_RUNTIME_A = @RUNTIME_RUNTIME_A@ RUNTIME_RUNTIME_LIB_A = @RUNTIME_RUNTIME_LIB_A@ RUNTIME_LIB_A = @RUNTIME_LIB_A@ TESTPLUGIN = @TESTPLUGIN@ TESTS = @TESTS@ TEST_LAUNCHER = @TEST_LAUNCHER@ THREADING_H = @THREADING_H@ |
Modified src/Makefile from [f5abc14455] to [dc55b4be53].
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | include ../extra.mk |
︙ | |||
92 93 94 95 96 97 98 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + - - - - + + - + | ${OFSTREAMOBSERVER_POLL_M} \ ${OFSTREAMOBSERVER_SELECT_M} \ OFString_UTF8.m \ OFTCPSocket+SOCKS5.m \ ${ASPRINTF_M} \ ${FOUNDATION_COMPAT_M} \ iso_8859_15.m \ |
Modified src/OFBlock.m from [5825d5d284] to [36beda4104].
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | + + | #include <stdlib.h> #include <string.h> #include <assert.h> #if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__) # import <objc/runtime.h> #elif defined(OF_OBJFW_RUNTIME) # import "runtime-private.h" #endif #import "OFBlock.h" #import "OFAllocFailedException.h" #import "OFInitializationFailedException.h" #import "OFNotImplementedException.h" |
︙ | |||
69 70 71 72 73 74 75 | 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 | - - - - - - - - - - - - - - - - - - - - - - + - + - - - + + + - - - + + + - - - + + + - - - - + + + + + + + - + - - - - + + | }; @protocol RetainRelease - retain; - (void)release; @end |
︙ |
Modified src/OFIntrospection.m from [3e6c8b04d5] to [e4635330ec].
︙ | |||
14 15 16 17 18 19 20 | 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 | - + - - - + - - - - - - - - - - - - - - - - - - | * file. */ #include "config.h" #include <stdlib.h> |
︙ | |||
96 97 98 99 100 101 102 | 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 | - + - - - - - - - - - - - - - - - - - - | { return [OFString stringWithFormat: @"<OFMethod: %@ [%s]>", name, typeEncoding]; } @end @implementation OFInstanceVariable |
︙ | |||
168 169 170 171 172 173 174 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | } @end #ifdef OF_HAVE_PROPERTIES @implementation OFProperty @synthesize name, attributes; |
︙ | |||
218 219 220 221 222 223 224 | 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 | - + - - - + | - initWithClass: (Class)class { self = [super init]; @try { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; |
︙ | |||
286 287 288 289 290 291 292 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | _initWithProperty: propertyList[i]] autorelease]]; [pool releaseObjects]; } } @finally { free(propertyList); } |
︙ |
Modified src/OFObject.h from [34ca0c3322] to [9092415875].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | #endif #include <stddef.h> #include <stdint.h> #include <limits.h> #ifdef OF_OBJFW_RUNTIME |
︙ |
Modified src/OFObject.m from [708e72ca3d] to [26d577e585].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + - - | #import "OFMemoryNotPartOfObjectException.h" #import "OFNotImplementedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "macros.h" |
︙ | |||
77 78 79 80 81 82 83 | 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 | - - - - - + - - - - + | (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 1)) #define PRE_IVAR ((struct pre_ivar*)(void*)((char*)self - PRE_IVAR_ALIGN)) #define PRE_MEM_ALIGN ((sizeof(struct pre_mem) + \ (__BIGGEST_ALIGNMENT__ - 1)) & ~(__BIGGEST_ALIGNMENT__ - 1)) #define PRE_MEM(mem) ((struct pre_mem*)(void*)((char*)mem - PRE_MEM_ALIGN)) |
︙ | |||
125 126 127 128 129 130 131 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - - - - | void objc_enumerationMutation(id object) { enumeration_mutation_handler(object); } #endif |
︙ | |||
182 183 184 185 186 187 188 | 169 170 171 172 173 174 175 176 177 178 179 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + | const char* _NSPrintForDebugger(id object) { return [[object description] cStringWithEncoding: OF_STRING_ENCODING_NATIVE]; } |
︙ | |||
312 313 314 315 316 317 318 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | + (Class)superclass { return class_getSuperclass(self); } + (BOOL)instancesRespondToSelector: (SEL)selector { |
︙ | |||
425 426 427 428 429 430 431 | 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | typeEncoding: typeEncoding]; } + (IMP)replaceInstanceMethod: (SEL)selector withImplementation: (IMP)implementation typeEncoding: (const char*)typeEncoding { |
︙ | |||
576 577 578 579 580 581 582 | 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | - - + + - - + + - - + + - - + + - - + + - - - | [self replaceInstanceMethod: selector withMethodFromClass: class]; } } @finally { free(methodList); } |
︙ | |||
674 675 676 677 678 679 680 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | - - - - - - - - - - - | - (BOOL)isMemberOfClass: (Class)class { return (isa == class); } - (BOOL)respondsToSelector: (SEL)selector { |
︙ | |||
734 735 736 737 738 739 740 | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | - - - - - - - - - | const char *ret; if ((ret = objc_get_type_encoding(isa, selector)) == NULL) @throw [OFNotImplementedException exceptionWithClass: isa selector: selector]; return ret; |
︙ | |||
941 942 943 944 945 946 947 | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | - + | #endif } - autorelease { /* * Cache OFAutoreleasePool since class lookups are expensive with the |
︙ |
Modified src/OFThread.m from [ee16dd390b] to [15c3b7304d].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - - - | #ifndef _WIN32 # include <unistd.h> # include <sched.h> #else # include <windows.h> #endif |
︙ | |||
57 58 59 60 61 62 63 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - - - - | static of_tlskey_t threadSelf; static id call_main(id object) { OFThread *thread = (OFThread*)object; |
︙ | |||
87 88 89 90 91 92 93 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - - - | thread->running = OF_THREAD_WAITING_FOR_JOIN; [OFTLSKey callAllDestructors]; [OFAutoreleasePool _releaseAll]; [thread release]; |
︙ | |||
223 224 225 226 227 228 229 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - - - - | } [OFTLSKey callAllDestructors]; [OFAutoreleasePool _releaseAll]; [thread release]; |
︙ |
Modified src/base64.h from [1cfc5e7ce8] to [86d7b49ac9].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | # define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #ifdef OF_OBJFW_RUNTIME |
︙ |
Modified src/exceptions/Makefile from [f45b67542a] to [7c2fda7df6].
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 | - + | OFUnsupportedProtocolException.m \ OFWriteFailedException.m INCLUDES = ${SRCS:.m=.h} include ../../buildsys.mk |
Modified src/macros.h from [ef3c33f2fd] to [5266d93197].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - - | */ #import "OFObject.h" #include <stddef.h> #include <stdint.h> |
︙ | |||
77 78 79 80 81 82 83 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - - - - - - - - | # elif defined(__ppc__) || defined(__PPC__) # define OF_PPC_ASM # elif defined(__arm__) || defined(__ARM__) # define OF_ARM_ASM # endif #endif |
︙ |
Deleted src/objc_properties.m version [d2cf97ab35].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted src/objc_sync.m version [6d549f3b5e].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Added src/runtime/Makefile version [22377f6c1a].
|
Added src/runtime/category.m version [c947f89bcc].