Overview
Comment: | runtime: Switch MorphOS library to SysV ABI |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7138892706dd54f6026b346f0ee6d9ed |
User & Date: | js on 2019-06-27 19:24:32 |
Other Links: | manifest | tags |
Context
2019-06-27
| ||
21:27 | runtime/linklib: Fix editing via macro gone wrong check-in: 651b363221 user: js tags: trunk | |
19:24 | runtime: Switch MorphOS library to SysV ABI check-in: 7138892706 user: js tags: trunk | |
2019-06-26
| ||
20:38 | Fix non-blocking sockets on MorphOS check-in: d1d1843970 user: js tags: trunk | |
Changes
Modified src/runtime/amiga-glue.m from [503dc0b454] to [f152603cb3].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 | */ #include "config.h" #import "ObjFWRT.h" #import "private.h" #import "macros.h" extern bool objc_init(unsigned int, struct objc_libc *, FILE *, FILE *); bool __saveds | > > > > > > > > > > > > > > > > > > > | > | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | > | | | | | > | | | | | | | > | | | | | | > | | | | | | | | > < | | | | | | < < < | < | < < < < < < < < < < | < | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | > | | | | | | | | | | | | | | | | | > | | < < < < < < | > | | | | | > | | | > > > > > > | 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 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 258 259 260 261 262 263 264 265 266 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 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 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 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 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 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | */ #include "config.h" #import "ObjFWRT.h" #import "private.h" #import "macros.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) # define M68K_ARG OBJC_M68K_ARG #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) #endif extern bool objc_init(unsigned int, struct objc_libc *, FILE *, FILE *); #ifdef OF_MORPHOS /* All __saveds functions in this file need to use the SysV ABI */ __asm__ ( ".section .text\n" ".align 2\n" "__restore_r13:\n" " lwz %r13, 44(%r12)\n" " blr\n" ); #endif bool __saveds glue_objc_init PPC_PARAMS(unsigned int version, struct objc_libc *libc, FILE *stdout_, FILE *stderr_) { M68K_ARG(unsigned int, version, d0) M68K_ARG(struct objc_libc *, libc, a0) M68K_ARG(FILE *, stdout_, a1) M68K_ARG(FILE *, stderr_, a2) return objc_init(version, libc, stdout_, stderr_); } void __saveds glue___objc_exec_class PPC_PARAMS(void *module) { M68K_ARG(void *, module, a0) __objc_exec_class(module); } IMP __saveds glue_objc_msg_lookup PPC_PARAMS(id object, SEL selector) { M68K_ARG(id, object, a0) M68K_ARG(SEL, selector, a1) return objc_msg_lookup(object, selector); } IMP __saveds glue_objc_msg_lookup_stret PPC_PARAMS(id object, SEL selector) { M68K_ARG(id, object, a0) M68K_ARG(SEL, selector, a1) return objc_msg_lookup_stret(object, selector); } IMP __saveds glue_objc_msg_lookup_super PPC_PARAMS(struct objc_super *super, SEL selector) { M68K_ARG(struct objc_super *, super, a0) M68K_ARG(SEL, selector, a1) return objc_msg_lookup_super(super, selector); } IMP __saveds glue_objc_msg_lookup_super_stret PPC_PARAMS(struct objc_super *super, SEL selector) { M68K_ARG(struct objc_super *, super, a0) M68K_ARG(SEL, selector, a1) return objc_msg_lookup_super_stret(super, selector); } Class __saveds glue_objc_lookUpClass PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return objc_lookUpClass(name); } Class __saveds glue_objc_getClass PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return objc_getClass(name); } Class __saveds glue_objc_getRequiredClass PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return objc_getRequiredClass(name); } Class __saveds glue_objc_lookup_class PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return objc_lookup_class(name); } Class __saveds glue_objc_get_class PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return objc_get_class(name); } void __saveds glue_objc_exception_throw PPC_PARAMS(id object) { M68K_ARG(id, object, a0) objc_exception_throw(object); OF_UNREACHABLE } int __saveds glue_objc_sync_enter PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_sync_enter(object); } int __saveds glue_objc_sync_exit PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_sync_exit(object); } id __saveds glue_objc_getProperty PPC_PARAMS(id self, SEL _cmd, ptrdiff_t offset, bool atomic) { M68K_ARG(id, self, a0) M68K_ARG(SEL, _cmd, a1) M68K_ARG(ptrdiff_t, offset, d0) M68K_ARG(bool, atomic, d1) return objc_getProperty(self, _cmd, offset, atomic); } void __saveds glue_objc_setProperty PPC_PARAMS(id self, SEL _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy) { M68K_ARG(id, self, a0) M68K_ARG(SEL, _cmd, a1) M68K_ARG(ptrdiff_t, offset, d0) M68K_ARG(id, value, a2) M68K_ARG(bool, atomic, d1) M68K_ARG(signed char, copy, d2) objc_setProperty(self, _cmd, offset, value, atomic, copy); } void __saveds glue_objc_getPropertyStruct PPC_PARAMS(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { M68K_ARG(void *, dest, a0) M68K_ARG(const void *, src, a1) M68K_ARG(ptrdiff_t, size, d0) M68K_ARG(bool, atomic, d1) M68K_ARG(bool, strong, d2) objc_getPropertyStruct(dest, src, size, atomic, strong); } void __saveds glue_objc_setPropertyStruct PPC_PARAMS(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { M68K_ARG(void *, dest, a0) M68K_ARG(const void *, src, a1) M68K_ARG(ptrdiff_t, size, d0) M68K_ARG(bool, atomic, d1) M68K_ARG(bool, strong, d2) objc_setPropertyStruct(dest, src, size, atomic, strong); } void __saveds glue_objc_enumerationMutation PPC_PARAMS(id object) { M68K_ARG(id, object, a0) objc_enumerationMutation(object); } int __saveds glue___gnu_objc_personality PPC_PARAMS(int version, int actions, uint64_t exClass, void *ex, void *ctx) { M68K_ARG(int, version, d0) M68K_ARG(int, actions, d1) M68K_ARG(uint64_t *, exClassPtr, d2) M68K_ARG(void *, ex, a0) M68K_ARG(void *, ctx, a1) #ifdef OF_AMIGAOS_M68K uint64_t exClass = *exClassPtr; #endif #ifdef HAVE_SJLJ_EXCEPTIONS return __gnu_objc_personality_sj0(version, actions, exClass, ex, ctx); #else return __gnu_objc_personality_v0(version, actions, exClass, ex, ctx); #endif } id __saveds glue_objc_retain PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_retain(object); } id __saveds glue_objc_retainBlock PPC_PARAMS(id block) { M68K_ARG(id, block, a0) return objc_retainBlock(block); } id __saveds glue_objc_retainAutorelease PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_retainAutorelease(object); } void __saveds glue_objc_release PPC_PARAMS(id object) { M68K_ARG(id, object, a0) objc_release(object); } id __saveds glue_objc_autorelease PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_autorelease(object); } id __saveds glue_objc_autoreleaseReturnValue PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_autoreleaseReturnValue(object); } id __saveds glue_objc_retainAutoreleaseReturnValue PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_retainAutoreleaseReturnValue(object); } id __saveds glue_objc_retainAutoreleasedReturnValue PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return objc_retainAutoreleasedReturnValue(object); } id __saveds glue_objc_storeStrong PPC_PARAMS(id *object, id value) { M68K_ARG(id *, object, a0) M68K_ARG(id, value, a1) return objc_storeStrong(object, value); } id __saveds glue_objc_storeWeak PPC_PARAMS(id *object, id value) { M68K_ARG(id *, object, a0) M68K_ARG(id, value, a1) return objc_storeWeak(object, value); } id __saveds glue_objc_loadWeakRetained PPC_PARAMS(id *object) { M68K_ARG(id *, object, a0) return objc_loadWeakRetained(object); } id __saveds glue_objc_initWeak PPC_PARAMS(id *object, id value) { M68K_ARG(id *, object, a0) M68K_ARG(id, value, a1) return objc_initWeak(object, value); } void __saveds glue_objc_destroyWeak PPC_PARAMS(id *object) { M68K_ARG(id *, object, a0) objc_destroyWeak(object); } id __saveds glue_objc_loadWeak PPC_PARAMS(id *object) { M68K_ARG(id *, object, a0) return objc_loadWeak(object); } void __saveds glue_objc_copyWeak PPC_PARAMS(id *dest, id *src) { M68K_ARG(id *, dest, a0) M68K_ARG(id *, src, a1) objc_copyWeak(dest, src); } void __saveds glue_objc_moveWeak PPC_PARAMS(id *dest, id *src) { M68K_ARG(id *, dest, a0) M68K_ARG(id *, src, a1) objc_moveWeak(dest, src); } SEL __saveds glue_sel_registerName PPC_PARAMS(const char *name) { M68K_ARG(const char *, name, a0) return sel_registerName(name); } const char *__saveds glue_sel_getName PPC_PARAMS(SEL selector) { M68K_ARG(SEL, selector, a0) return sel_getName(selector); } bool __saveds glue_sel_isEqual PPC_PARAMS(SEL selector1, SEL selector2) { M68K_ARG(SEL, selector1, a0) M68K_ARG(SEL, selector2, a1) return sel_isEqual(selector1, selector2); } Class __saveds glue_objc_allocateClassPair PPC_PARAMS(Class superclass, const char *name, size_t extraBytes) { M68K_ARG(Class, superclass, a0) M68K_ARG(const char *, name, a1) M68K_ARG(size_t, extraBytes, d0) return objc_allocateClassPair(superclass, name, extraBytes); } void __saveds glue_objc_registerClassPair PPC_PARAMS(Class class) { M68K_ARG(Class, class, a0) objc_registerClassPair(class); } unsigned int __saveds glue_objc_getClassList PPC_PARAMS(Class *buffer, unsigned int count) { M68K_ARG(Class *, buffer, a0) M68K_ARG(unsigned int, count, d0) return objc_getClassList(buffer, count); } Class *__saveds glue_objc_copyClassList PPC_PARAMS(unsigned int *length) { M68K_ARG(unsigned int *, length, a0) return objc_copyClassList(length); } bool __saveds glue_class_isMetaClass PPC_PARAMS(Class class) { M68K_ARG(Class, class, a0) return class_isMetaClass(class); } const char *__saveds glue_class_getName PPC_PARAMS(Class class) { M68K_ARG(Class, class, a0) return class_getName(class); } Class __saveds glue_class_getSuperclass PPC_PARAMS(Class class) { M68K_ARG(Class, class, a0) return class_getSuperclass(class); } unsigned long __saveds glue_class_getInstanceSize PPC_PARAMS(Class class) { M68K_ARG(Class, class, a0) return class_getInstanceSize(class); } bool __saveds glue_class_respondsToSelector PPC_PARAMS(Class class, SEL selector) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) return class_respondsToSelector(class, selector); } bool __saveds glue_class_conformsToProtocol PPC_PARAMS(Class class, Protocol *protocol) { M68K_ARG(Class, class, a0) M68K_ARG(Protocol *, protocol, a1) return class_conformsToProtocol(class, protocol); } IMP __saveds glue_class_getMethodImplementation PPC_PARAMS(Class class, SEL selector) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) return class_getMethodImplementation(class, selector); } IMP __saveds glue_class_getMethodImplementation_stret PPC_PARAMS(Class class, SEL selector) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) return class_getMethodImplementation_stret(class, selector); } const char *__saveds glue_class_getMethodTypeEncoding PPC_PARAMS(Class class, SEL selector) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) return class_getMethodTypeEncoding(class, selector); } bool __saveds glue_class_addMethod PPC_PARAMS(Class class, SEL selector, IMP implementation, const char *typeEncoding) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) M68K_ARG(IMP, implementation, a2) M68K_ARG(const char *, typeEncoding, a3) return class_addMethod(class, selector, implementation, typeEncoding); } IMP __saveds glue_class_replaceMethod PPC_PARAMS(Class class, SEL selector, IMP implementation, const char *typeEncoding) { M68K_ARG(Class, class, a0) M68K_ARG(SEL, selector, a1) M68K_ARG(IMP, implementation, a2) M68K_ARG(const char *, typeEncoding, a3) return class_replaceMethod(class, selector, implementation, typeEncoding); } Class __saveds glue_object_getClass PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return object_getClass(object); } Class __saveds glue_object_setClass PPC_PARAMS(id object, Class class) { M68K_ARG(id, object, a0) M68K_ARG(Class, class, a1) return object_setClass(object, class); } const char *__saveds glue_object_getClassName PPC_PARAMS(id object) { M68K_ARG(id, object, a0) return object_getClassName(object); } const char *__saveds glue_protocol_getName PPC_PARAMS(Protocol *protocol) { M68K_ARG(Protocol *, protocol, a0) return protocol_getName(protocol); } bool __saveds glue_protocol_isEqual PPC_PARAMS(Protocol *protocol1, Protocol *protocol2) { M68K_ARG(Protocol *, protocol1, a0) M68K_ARG(Protocol *, protocol2, a1) return protocol_isEqual(protocol1, protocol2); } bool __saveds glue_protocol_conformsToProtocol PPC_PARAMS(Protocol *protocol1, Protocol *protocol2) { M68K_ARG(Protocol *, protocol1, a0) M68K_ARG(Protocol *, protocol2, a1) return protocol_conformsToProtocol(protocol1, protocol2); } objc_uncaught_exception_handler_t __saveds glue_objc_setUncaughtExceptionHandler PPC_PARAMS( objc_uncaught_exception_handler_t handler) { M68K_ARG(objc_uncaught_exception_handler_t, handler, a0) return objc_setUncaughtExceptionHandler(handler); } void __saveds glue_objc_setForwardHandler PPC_PARAMS(IMP forward, IMP stretForward) { M68K_ARG(IMP, forward, a0) M68K_ARG(IMP, stretForward, a1) objc_setForwardHandler(forward, stretForward); } void __saveds glue_objc_setEnumerationMutationHandler PPC_PARAMS( objc_enumeration_mutation_handler_t handler) { M68K_ARG(objc_enumeration_mutation_handler_t, handler, a0) objc_setEnumerationMutationHandler(handler); } void __saveds glue_objc_zero_weak_references PPC_PARAMS(id value) { M68K_ARG(id, value, a0) objc_zero_weak_references(value); } void __saveds glue_objc_exit(void) { objc_exit(); } |
Modified src/runtime/amiga-library.m from [55ee69eb97] to [2c24631f83].
︙ | ︙ | |||
58 59 60 61 62 63 64 | #ifdef OF_AMIGAOS_M68K extern uintptr_t __CTOR_LIST__[]; extern const void *_EH_FRAME_BEGINS__; extern void *_EH_FRAME_OBJECTS__; #endif | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | > > < < < | 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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | #ifdef OF_AMIGAOS_M68K extern uintptr_t __CTOR_LIST__[]; extern const void *_EH_FRAME_BEGINS__; extern void *_EH_FRAME_OBJECTS__; #endif extern bool glue_objc_init(void); extern void glue___objc_exec_class(void); extern IMP _Nonnull glue_objc_msg_lookup(void); extern IMP _Nonnull glue_objc_msg_lookup_stret(void); extern IMP _Nonnull glue_objc_msg_lookup_super(void); extern IMP _Nonnull glue_objc_msg_lookup_super_stret(void); extern Class _Nullable glue_objc_lookUpClass(void); extern Class _Nullable glue_objc_getClass(void); extern Class _Nonnull glue_objc_getRequiredClass(void); extern Class _Nullable glue_objc_lookup_class(void); extern Class _Nonnull glue_objc_get_class(void); extern void glue_objc_exception_throw(void); extern int glue_objc_sync_enter(void); extern int glue_objc_sync_exit(void); extern id _Nullable glue_objc_getProperty(void); extern void glue_objc_setProperty(void); extern void glue_objc_getPropertyStruct(void); extern void glue_objc_setPropertyStruct(void); extern void glue_objc_enumerationMutation(void); extern int glue___gnu_objc_personality(void); extern id _Nullable glue_objc_retain(void); extern id _Nullable glue_objc_retainBlock(void); extern id _Nullable glue_objc_retainAutorelease(void); extern void glue_objc_release(void); extern id _Nullable glue_objc_autorelease(void); extern id _Nullable glue_objc_autoreleaseReturnValue(void); extern id _Nullable glue_objc_retainAutoreleaseReturnValue(void); extern id _Nullable glue_objc_retainAutoreleasedReturnValue(void); extern id _Nullable glue_objc_storeStrong(void); extern id _Nullable glue_objc_storeWeak(void); extern id _Nullable glue_objc_loadWeakRetained(void); extern id _Nullable glue_objc_initWeak(void); extern void glue_objc_destroyWeak(void); extern id _Nullable glue_objc_loadWeak(void); extern void glue_objc_copyWeak(void); extern void glue_objc_moveWeak(void); extern SEL _Nonnull glue_sel_registerName(void); extern const char *_Nonnull glue_sel_getName(void); extern bool glue_sel_isEqual(void); extern Class _Nonnull glue_objc_allocateClassPair(void); extern void glue_objc_registerClassPair(void); extern unsigned int glue_objc_getClassList(void); extern Class _Nonnull *_Nonnull glue_objc_copyClassList(void); extern bool glue_class_isMetaClass(void); extern const char *_Nullable glue_class_getName(void); extern Class _Nullable glue_class_getSuperclass(void); extern unsigned long glue_class_getInstanceSize(void); extern bool glue_class_respondsToSelector(void); extern bool glue_class_conformsToProtocol(void); extern IMP _Nullable glue_class_getMethodImplementation(void); extern IMP _Nullable glue_class_getMethodImplementation_stret(void); extern const char *_Nullable glue_class_getMethodTypeEncoding(void); extern bool glue_class_addMethod(void); extern IMP _Nullable glue_class_replaceMethod(void); extern Class _Nullable glue_object_getClass(void); extern Class _Nullable glue_object_setClass(void); extern const char *_Nullable glue_object_getClassName(void); extern const char *_Nonnull glue_protocol_getName(void); extern bool glue_protocol_isEqual(void); extern bool glue_protocol_conformsToProtocol(void); extern _Nullable objc_uncaught_exception_handler_t glue_objc_setUncaughtExceptionHandler(void); extern void glue_objc_setForwardHandler(void); extern void glue_objc_setEnumerationMutationHandler(void); extern void glue_objc_zero_weak_references(void); extern void glue_objc_exit(void); #ifdef OF_MORPHOS const ULONG __abox__ = 1; #endif struct ExecBase *SysBase; struct objc_libc libc; FILE *stdout; FILE *stderr; #if defined(OF_AMIGAOS_M68K) __asm__ ( ".text\n" ".globl ___restore_a4\n" ".align 1\n" "___restore_a4:\n" " movea.l 42(a6), a4\n" " rts" ); #elif defined(OF_MORPHOS) /* All __saveds functions in this file need to use the M68K ABI */ __asm__ ( ".section .text\n" ".align 2\n" "__restore_r13:\n" " lwz %r13, 56(%r2)\n" " lwz %r13, 44(%r13)\n" " blr\n" ); #endif static OF_INLINE char * getDataSeg(void) { char *dataSeg; |
︙ | ︙ | |||
373 374 375 376 377 378 379 | static void * lib_null(void) { return NULL; } bool | | > > < > > | < < | | 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | static void * lib_null(void) { return NULL; } bool objc_init(unsigned int version, struct objc_libc *libc_, FILE *stdout_, FILE *stderr_) { #ifdef OF_AMIGAOS_M68K OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6) #else register struct ObjFWRTBase *r12 __asm__("r12"); struct ObjFWRTBase *base = r12; #endif uintptr_t *iter, *iter0; if (version > 1) return false; memcpy(&libc, libc_, sizeof(libc)); stdout = stdout_; |
︙ | ︙ | |||
563 564 565 566 567 568 569 | (CONST_APTR)FUNCARRAY_BEGIN, (CONST_APTR)FUNCARRAY_32BIT_NATIVE, #endif (CONST_APTR)lib_open, (CONST_APTR)lib_close, (CONST_APTR)lib_expunge, (CONST_APTR)lib_null, | > | > > > | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | > | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | (CONST_APTR)FUNCARRAY_BEGIN, (CONST_APTR)FUNCARRAY_32BIT_NATIVE, #endif (CONST_APTR)lib_open, (CONST_APTR)lib_close, (CONST_APTR)lib_expunge, (CONST_APTR)lib_null, #ifdef OF_MORPHOS (CONST_APTR)-1, (CONST_APTR)FUNCARRAY_32BIT_SYSTEMV, #endif (CONST_APTR)glue_objc_init, (CONST_APTR)glue___objc_exec_class, (CONST_APTR)glue_objc_msg_lookup, (CONST_APTR)glue_objc_msg_lookup_stret, (CONST_APTR)glue_objc_msg_lookup_super, (CONST_APTR)glue_objc_msg_lookup_super_stret, (CONST_APTR)glue_objc_lookUpClass, (CONST_APTR)glue_objc_getClass, (CONST_APTR)glue_objc_getRequiredClass, (CONST_APTR)glue_objc_lookup_class, (CONST_APTR)glue_objc_get_class, (CONST_APTR)glue_objc_exception_throw, (CONST_APTR)glue_objc_sync_enter, (CONST_APTR)glue_objc_sync_exit, (CONST_APTR)glue_objc_getProperty, (CONST_APTR)glue_objc_setProperty, (CONST_APTR)glue_objc_getPropertyStruct, (CONST_APTR)glue_objc_setPropertyStruct, (CONST_APTR)glue_objc_enumerationMutation, (CONST_APTR)glue___gnu_objc_personality, (CONST_APTR)glue_objc_retain, (CONST_APTR)glue_objc_retainBlock, (CONST_APTR)glue_objc_retainAutorelease, (CONST_APTR)glue_objc_release, (CONST_APTR)glue_objc_autorelease, (CONST_APTR)glue_objc_autoreleaseReturnValue, (CONST_APTR)glue_objc_retainAutoreleaseReturnValue, (CONST_APTR)glue_objc_retainAutoreleasedReturnValue, (CONST_APTR)glue_objc_storeStrong, (CONST_APTR)glue_objc_storeWeak, (CONST_APTR)glue_objc_loadWeakRetained, (CONST_APTR)glue_objc_initWeak, (CONST_APTR)glue_objc_destroyWeak, (CONST_APTR)glue_objc_loadWeak, (CONST_APTR)glue_objc_copyWeak, (CONST_APTR)glue_objc_moveWeak, (CONST_APTR)glue_sel_registerName, (CONST_APTR)glue_sel_getName, (CONST_APTR)glue_sel_isEqual, (CONST_APTR)glue_objc_allocateClassPair, (CONST_APTR)glue_objc_registerClassPair, (CONST_APTR)glue_objc_getClassList, (CONST_APTR)glue_objc_copyClassList, (CONST_APTR)glue_class_isMetaClass, (CONST_APTR)glue_class_getName, (CONST_APTR)glue_class_getSuperclass, (CONST_APTR)glue_class_getInstanceSize, (CONST_APTR)glue_class_respondsToSelector, (CONST_APTR)glue_class_conformsToProtocol, (CONST_APTR)glue_class_getMethodImplementation, (CONST_APTR)glue_class_getMethodImplementation_stret, (CONST_APTR)glue_class_getMethodTypeEncoding, (CONST_APTR)glue_class_addMethod, (CONST_APTR)glue_class_replaceMethod, (CONST_APTR)glue_object_getClass, (CONST_APTR)glue_object_setClass, (CONST_APTR)glue_object_getClassName, (CONST_APTR)glue_protocol_getName, (CONST_APTR)glue_protocol_isEqual, (CONST_APTR)glue_protocol_conformsToProtocol, (CONST_APTR)glue_objc_setUncaughtExceptionHandler, (CONST_APTR)glue_objc_setForwardHandler, (CONST_APTR)glue_objc_setEnumerationMutationHandler, (CONST_APTR)glue_objc_zero_weak_references, (CONST_APTR)glue_objc_exit, (CONST_APTR)-1, #ifdef OF_MORPHOS (CONST_APTR)FUNCARRAY_END #endif }; #pragma GCC diagnostic pop |
︙ | ︙ |
Modified src/runtime/amigaos3.sfd from [10ada06b71] to [de4ad75da8].
1 2 3 4 5 6 | ==base _ObjFWRTBase ==basetype struct Library * ==libname objfwrt68k.library ==bias 30 ==public * Functions that are only for the linklib. | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | > | 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 | ==base _ObjFWRTBase ==basetype struct Library * ==libname objfwrt68k.library ==bias 30 ==public * Functions that are only for the linklib. bool glue_objc_init(unsigned int version, struct objc_libc *libc, FILE *stdout, FILE *stderr)(d0,a0,a1,a2) * These have a built-in declaration in the compiler that does not use the * registers and thus always need glue. void glue___objc_exec_class(void *_Nonnull module)(a0) IMP _Nonnull glue_objc_msg_lookup(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull glue_objc_msg_lookup_stret(id _Nullable object, SEL _Nonnull selector)(a0,a1) IMP _Nonnull glue_objc_msg_lookup_super(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) IMP _Nonnull glue_objc_msg_lookup_super_stret(struct objc_super *_Nonnull super, SEL _Nonnull selector)(a0,a1) Class _Nullable glue_objc_lookUpClass(const char *_Nonnull name)(a0) Class _Nullable glue_objc_getClass(const char *_Nonnull name)(a0) Class _Nonnull glue_objc_getRequiredClass(const char *_Nonnull name)(a0) Class _Nullable glue_objc_lookup_class(const char *_Nonnull name)(a0) Class _Nonnull glue_objc_get_class(const char *_Nonnull name)(a0) void glue_objc_exception_throw(id _Nonnull object)(a0) int glue_objc_sync_enter(id _Nullable object)(a0) int glue_objc_sync_exit(id _Nullable object)(a0) id glue_objc_getProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1) void glue_objc_setProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2) void glue_objc_getPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void glue_objc_setPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void glue_objc_enumerationMutation(id _Nonnull object)(a0) int glue___gnu_objc_personality(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)(d0,d1,d2,a0,a1) id _Nullable glue_objc_retain(id _Nullable object)(a0) id _Nullable glue_objc_retainBlock(id _Nullable block)(a0) id _Nullable glue_objc_retainAutorelease(id _Nullable object)(a0) void glue_objc_release(id _Nullable object)(a0) id _Nullable glue_objc_autorelease(id _Nullable object)(a0) id _Nullable glue_objc_autoreleaseReturnValue(id _Nullable object)(a0) id _Nullable glue_objc_retainAutoreleaseReturnValue(id _Nullable object)(a0) id _Nullable glue_objc_retainAutoreleasedReturnValue(id _Nullable object)(a0) id _Nullable glue_objc_storeStrong(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable glue_objc_storeWeak(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) id _Nullable glue_objc_loadWeakRetained(id _Nullable *_Nonnull object)(a0) id _Nullable glue_objc_initWeak(id _Nullable *_Nonnull object, id _Nullable value)(a0,a1) void glue_objc_destroyWeak(id _Nullable *_Nonnull object)(a0) id _Nullable glue_objc_loadWeak(id _Nullable *_Nonnull object)(a0) void glue_objc_copyWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) void glue_objc_moveWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)(a0,a1) SEL _Nonnull glue_sel_registerName(const char *_Nonnull name)(a0) const char *_Nonnull glue_sel_getName(SEL _Nonnull selector)(a0) bool glue_sel_isEqual(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1) Class _Nonnull glue_objc_allocateClassPair(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0) void glue_objc_registerClassPair(Class _Nonnull class_)(a0) unsigned int glue_objc_getClassList(Class _Nonnull *_Nullable buffer, unsigned int count)(a0,d0) Class _Nonnull *_Nonnull glue_objc_copyClassList(unsigned int *_Nullable length)(a0) bool glue_class_isMetaClass(Class _Nullable class_)(a0) const char *_Nullable glue_class_getName(Class _Nullable class_)(a0) Class _Nullable glue_class_getSuperclass(Class _Nullable class_)(a0) unsigned long glue_class_getInstanceSize(Class _Nullable class_)(a0) bool glue_class_respondsToSelector(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool glue_class_conformsToProtocol(Class _Nullable class_, Protocol *_Nonnull p)(a0,a1) IMP _Nullable glue_class_getMethodImplementation(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) IMP _Nullable glue_class_getMethodImplementation_stret(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) const char *_Nullable glue_class_getMethodTypeEncoding(Class _Nullable class_, SEL _Nonnull selector)(a0,a1) bool glue_class_addMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) IMP _Nullable glue_class_replaceMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)(a0,a1,a2,a3) Class _Nullable glue_object_getClass(id _Nullable object)(a0) Class _Nullable glue_object_setClass(id _Nullable object, Class _Nonnull class_)(a0,a1) const char *_Nullable glue_object_getClassName(id _Nullable object)(a0) const char *_Nonnull glue_protocol_getName(Protocol *_Nonnull protocol)(a0) bool glue_protocol_isEqual(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) bool glue_protocol_conformsToProtocol(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) _Nullable objc_uncaught_exception_handler_t glue_objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t _Nullable handler)(a0) void glue_objc_setForwardHandler(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1) void glue_objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t _Nullable handler)(a0) void glue_objc_zero_weak_references(id _Nonnull value)(a0) void glue_objc_exit(void)() ==end |
Modified src/runtime/linklib/linklib.m from [1429bcc593] to [fd0b2b3bf0].
︙ | ︙ | |||
59 60 61 62 63 64 65 | #endif extern void __register_frame_info(const void *, void *); extern void __deregister_frame_info(const void *); struct Library *ObjFWRTBase; void *__objc_class_name_Protocol; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #endif extern void __register_frame_info(const void *, void *); extern void __deregister_frame_info(const void *); struct Library *ObjFWRTBase; void *__objc_class_name_Protocol; static void ctor(void) { static bool initialized = false; struct objc_libc libc = { .malloc = malloc, .calloc = calloc, |
︙ | ︙ | |||
208 209 210 211 212 213 214 | if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, OBJFWRT_LIB_MINOR)) == NULL) { fputs("Failed to open " OBJFWRT_AMIGA_LIB "!\n", stderr); abort(); } | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, OBJFWRT_LIB_MINOR)) == NULL) { fputs("Failed to open " OBJFWRT_AMIGA_LIB "!\n", stderr); abort(); } if (!glue_objc_init(1, &libc, stdout, stderr)) { fputs("Failed to initialize " OBJFWRT_AMIGA_LIB "!\n", stderr); abort(); } initialized = true; } |
︙ | ︙ | |||
240 241 242 243 244 245 246 | DESTRUCTOR_P(ObjFWRT, 4000) { dtor(); } #endif void | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | < | | | | | | | < | < > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | < < < < < < | < | | | | < | | | > > > > > > | 136 137 138 139 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 258 259 260 261 262 263 264 265 266 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 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 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 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 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 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 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 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | DESTRUCTOR_P(ObjFWRT, 4000) { dtor(); } #endif void __objc_exec_class(void *module) { /* * The compiler generates constructors that call into this, so it is * possible that we are not set up yet when we get called. */ ctor(); glue___objc_exec_class(module); } IMP objc_msg_lookup(id object, SEL selector) { return glue_objc_msg_lookup(object, selector); } IMP objc_msg_lookup_stret(id object, SEL selector) { return glue_objc_msg_lookup_stret(object, selector); } IMP objc_msg_lookup_super(struct objc_super *super, SEL selector) { return glue_objc_msg_lookup_super(super, selector); } IMP objc_msg_lookup_super_stret(struct objc_super *super, SEL selector) { return glue_objc_msg_lookup_super_stret(super, selector); } Class objc_lookUpClass(const char *name) { return glue_objc_lookUpClass(name); } Class objc_getClass(const char *name) { return glue_objc_getClass(name); } Class objc_getRequiredClass(const char *name) { return glue_objc_getRequiredClass(name); } Class objc_lookup_class(const char *name) { return glue_objc_lookup_class(name); } Class objc_get_class(const char *name) { return glue_objc_get_class(name); } void objc_exception_throw(id object) { #ifdef OF_AMIGAOS_M68K /* * This does not use the glue code to hack around a compiler bug. * * When using the generated inline stubs, the compiler does not emit * any frame information, making the unwind fail. As unwind always * starts from objc_exception_throw(), this means exceptions would * never work. If, however, we're using a function pointer instead of * the inline stub, the compiler does generate a frame and everything * works fine. */ register void *a6 __asm__("a6") = ObjFWRTBase; uintptr_t throw = (((uintptr_t)ObjFWRTBase) - 0x60); ((void (*)(id __asm__("a0")))throw)(object); (void)a6; #else glue_objc_exception_throw(object); #endif OF_UNREACHABLE } int objc_sync_enter(id object) { return glue_objc_sync_enter(object); } int objc_sync_exit(id object) { return glue_objc_sync_exit(object); } id objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, bool atomic) { return glue_objc_getProperty(self, _cmd, offset, atomic); } void objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy) { glue_objc_setProperty(self, _cmd, offset, value, atomic, copy); } void objc_getPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { glue_objc_getPropertyStruct(dest, src, size, atomic, strong); } void objc_setPropertyStruct(void *dest, const void *src, ptrdiff_t size, bool atomic, bool strong) { glue_objc_setPropertyStruct(dest, src, size, atomic, strong); } void objc_enumerationMutation(id object) { #ifdef OF_AMIGAOS_M68K /* * This does not use the glue code to hack around a compiler bug. * * When using the generated inline stubs, the compiler does not emit * any frame information, making the unwind fail. As a result * objc_enumerationMutation() might throw an exception that could never * be caught. If, however, we're using a function pointer instead of * the inline stub, the compiler does generate a frame and everything * works fine. */ register void *a6 __asm__("a6") = ObjFWRTBase; uintptr_t enumerationMutation = (((uintptr_t)ObjFWRTBase) - 0x8A); ((void (*)(id __asm__("a0")))enumerationMutation)(object); (void)a6; #else glue_objc_enumerationMutation(object); #endif OF_UNREACHABLE } #ifdef HAVE_SJLJ_EXCEPTIONS int __gnu_objc_personality_sj0(int version, int actions, uint64_t exClass, void *ex, void *ctx) { # ifdef OF_AMIGAOS_M68K return glue___gnu_objc_personality(version, actions, &exClass, ex, ctx); # else return glue___gnu_objc_personality(version, actions, exClass, ex, ctx); # endif } #else int __gnu_objc_personality_v0(int version, int actions, uint64_t exClass, void *ex, void *ctx) { # ifdef OF_AMIGAOS_M68K return glue___gnu_objc_personality(version, actions, &exClass, ex, ctx); # else return glue___gnu_objc_personality(version, actions, exClass, ex, ctx); # endif } #endif id objc_retain(id object) { return glue_objc_retain(object); } id objc_retainBlock(id block) { return glue_objc_retainBlock(block); } id objc_retainAutorelease(id object) { return glue_objc_retainAutorelease(object); } void objc_release(id object) { glue_objc_release(object); } id objc_autorelease(id object) { return glue_objc_autorelease(object); } id objc_autoreleaseReturnValue(id object) { return glue_objc_autoreleaseReturnValue(object); } id objc_retainAutoreleaseReturnValue(id object) { return glue_objc_retainAutoreleaseReturnValue(object); } id objc_retainAutoreleasedReturnValue(id object) { return glue_objc_retainAutoreleasedReturnValue(object); } id objc_linklib_objc_storeStrong(id *object, id value) { return glue_objc_storeStrong(object, value); } id objc_storeWeak(id *object, id value) { return glue_objc_storeWeak(object, value); } id objc_loadWeakRetained(id *object) { return glue_objc_loadWeakRetained(object); } id objc_initWeak(id *object, id value) { return glue_objc_initWeak(object, value); } void objc_destroyWeak(id *object) { glue_objc_destroyWeak(object); } id objc_loadWeak(id *object) { return glue_objc_loadWeak(object); } void objc_copyWeak(id *dest, id *src) { glue_objc_copyWeak(dest, src); } void objc_moveWeak(id *dest, id *src) { glue_objc_moveWeak(dest, src); } SEL sel_registerName(const char *name) { return glue_sel_registerName(name); } const char * sel_getName(SEL selector) { return glue_sel_getName(selector); } bool sel_isEqual(SEL selector1, SEL selector2) { return glue_sel_isEqual(selector1, selector2); } Class objc_allocateClassPair(Class superclass, const char *name, size_t extraBytes) { return glue_objc_allocateClassPair(superclass, name, extraBytes); } void objc_registerClassPair(Class class) { glue_objc_registerClassPair(class); } unsigned int objc_getClassList(Class *buffer, unsigned int count) { return glue_objc_getClassList(buffer, count); } Class * objc_copyClassList(unsigned int *length) { return glue_objc_copyClassList(length); } bool class_isMetaClass(Class class) { return glue_class_isMetaClass(class); } const char * class_getName(Class class) { return glue_class_getName(class); } Class class_getSuperclass(Class class) { return glue_class_getSuperclass(class); } unsigned long class_getInstanceSize(Class class) { return glue_class_getInstanceSize(class); } bool class_respondsToSelector(Class class, SEL selector) { return glue_class_respondsToSelector(class, selector); } bool class_conformsToProtocol(Class class, Protocol *protocol) { return glue_class_conformsToProtocol(class, protocol); } IMP class_getMethodImplementation(Class class, SEL selector) { return glue_class_getMethodImplementation(class, selector); } IMP class_getMethodImplementation_stret(Class class, SEL selector) { return glue_class_getMethodImplementation_stret(class, selector); } const char * class_getMethodTypeEncoding(Class class, SEL selector) { return glue_class_getMethodTypeEncoding(class, selector); } bool class_addMethod(Class class, SEL selector, IMP implementation, const char *typeEncoding) { return glue_class_addMethod(class, selector, implementation, typeEncoding); } IMP class_replaceMethod(Class class, SEL selector, IMP implementation, const char *typeEncoding) { return glue_class_replaceMethod(class, selector, implementation, typeEncoding); } Class object_getClass(id object) { return glue_object_getClass(object); } Class object_setClass(id object, Class class) { return glue_object_setClass(object, class); } const char * object_getClassName(id object) { return glue_object_getClassName(object); } const char * protocol_getName(Protocol *protocol) { return glue_protocol_getName(protocol); } bool protocol_isEqual(Protocol *protocol1, Protocol *protocol2) { return glue_protocol_isEqual(protocol1, protocol2); } bool protocol_conformsToProtocol(Protocol *protocol1, Protocol *protocol2) { return glue_protocol_conformsToProtocol(protocol1, protocol2); } objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t handler) { return glue_objc_setUncaughtExceptionHandler(handler); } void objc_setForwardHandler(IMP forward, IMP stretForward) { glue_objc_setForwardHandler(forward, stretForward); } void objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t handler) { glue_objc_setEnumerationMutationHandler(handler); } void objc_zero_weak_references(id value) { glue_objc_zero_weak_references(value); } void objc_exit(void) { glue_objc_exit(); } |
Modified src/runtime/morphos-clib.h from [d7622eaf7a] to [4a0280b314].
1 | /* Functions that are only for the linklib. */ | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | > | 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 | /* Functions that are only for the linklib. */ bool glue_objc_init(unsigned int, struct objc_libc *, FILE *, FILE *); /* All other functions. */ void glue___objc_exec_class(void *); IMP glue_objc_msg_lookup(id, SEL); IMP glue_objc_msg_lookup_stret(id, SEL); IMP glue_objc_msg_lookup_super(struct objc_super *, SEL); IMP glue_objc_msg_lookup_super_stret(struct objc_super *, SEL); Class glue_objc_lookUpClass(const char *); Class glue_objc_getClass(const char *); Class glue_objc_getRequiredClass(const char *); Class glue_objc_lookup_class(const char *); Class glue_objc_get_class(const char *); void glue_objc_exception_throw(id); int glue_objc_sync_enter(id); int glue_objc_sync_exit(id); id glue_objc_getProperty(id, SEL, ptrdiff_t, bool); void glue_objc_setProperty(id, SEL, ptrdiff_t, id, bool, signed char); void glue_objc_getPropertyStruct(void *, const void *, ptrdiff_t, bool, bool); void glue_objc_setPropertyStruct(void *, const void *, ptrdiff_t, bool, bool); void glue_objc_enumerationMutation(id); int glue___gnu_objc_personality(int, int, uint64_t, void *, void *); id glue_objc_retain(id); id glue_objc_retainBlock(id); id glue_objc_retainAutorelease(id); void glue_objc_release(id); id glue_objc_autorelease(id); id glue_objc_autoreleaseReturnValue(id); id glue_objc_retainAutoreleaseReturnValue(id); id glue_objc_retainAutoreleasedReturnValue(id); id glue_objc_storeStrong(id *, id); id glue_objc_storeWeak(id *, id); id glue_objc_loadWeakRetained(id *); id glue_objc_initWeak(id *, id); void glue_objc_destroyWeak(id *); id glue_objc_loadWeak(id *); void glue_objc_copyWeak(id *, id *); void glue_objc_moveWeak(id *, id *); SEL glue_sel_registerName(const char *); const char *glue_sel_getName(SEL); bool glue_sel_isEqual(SEL, SEL); Class glue_objc_allocateClassPair(Class, const char *, size_t); void glue_objc_registerClassPair(Class); unsigned int glue_objc_getClassList(Class *, unsigned int); Class *glue_objc_copyClassList(unsigned int *); bool glue_class_isMetaClass(Class); const char *glue_class_getName(Class); Class glue_class_getSuperclass(Class); unsigned long glue_class_getInstanceSize(Class); bool glue_class_respondsToSelector(Class, SEL); bool glue_class_conformsToProtocol(Class, Protocol *); IMP glue_class_getMethodImplementation(Class, SEL); IMP glue_class_getMethodImplementation_stret(Class, SEL); const char *glue_class_getMethodTypeEncoding(Class, SEL); bool glue_class_addMethod(Class class_, SEL selector, IMP, const char *); IMP glue_class_replaceMethod(Class, SEL, IMP, const char *); Class glue_object_getClass(id); Class glue_object_setClass(id, Class); const char *glue_object_getClassName(id); const char *glue_protocol_getName(Protocol *); bool glue_protocol_isEqual(Protocol *, Protocol *); bool glue_protocol_conformsToProtocol(Protocol *, Protocol *); objc_uncaught_exception_handler_t glue_objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t); void glue_objc_setForwardHandler(IMP, IMP); void glue_objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t); void glue_objc_zero_weak_references(id); void glue_objc_exit(void); |
Modified src/runtime/morphos.fd from [dfb7c42406] to [28b3a4e6a7].
1 2 3 4 | ##base _ObjFWRTBase ##bias 30 ##public * Functions that are only for the linklib. | | < < | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | | | | | | | < < < | | | | | | | | | | | | | | | | | | | | | | | | < | | | | > | 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 | ##base _ObjFWRTBase ##bias 30 ##public * Functions that are only for the linklib. glue_objc_init(version,libc,stdout,stderr)(sysv,r12base) glue___objc_exec_class(module)(sysv,r12base) glue_objc_msg_lookup(object,selector)(sysv,r12base) glue_objc_msg_lookup_stret(object,selector)(sysv,r12base) glue_objc_msg_lookup_super(super,selector)(sysv,r12base) glue_objc_msg_lookup_super_stret(super,selector)(sysv,r12base) glue_objc_lookUpClass(name)(sysv,r12base) glue_objc_getClass(name)(sysv,r12base) glue_objc_getRequiredClass(name)(sysv,r12base) glue_objc_lookup_class(name)(sysv,r12base) glue_objc_get_class(name)(sysv,r12base) glue_objc_exception_throw(object)(sysv,r12base) glue_objc_sync_enter(object)(sysv,r12base) glue_objc_sync_exit(object)(sysv,r12base) glue_objc_getProperty(self,_cmd,offset,atomic)(sysv,r12base) glue_objc_setProperty(self,_cmd,offset,value,atomic,copy)(sysv,r12base) glue_objc_getPropertyStruct(dest,src,size,atomic,strong)(sysv,r12base) glue_objc_setPropertyStruct(dest,src,size,atomic,strong)(sysv,r12base) glue_objc_enumerationMutation(object)(sysv,r12base) glue___gnu_objc_personality(version,actions,exClass,ex,ctx)(sysv,r12base) glue_objc_retain(object)(sysv,r12base) glue_objc_retainBlock(block)(sysv,r12base) glue_objc_retainAutorelease(object)(sysv,r12base) glue_objc_release(object)(sysv,r12base) glue_objc_autorelease(object)(sysv,r12base) glue_objc_autoreleaseReturnValue(object)(sysv,r12base) glue_objc_retainAutoreleaseReturnValue(object)(sysv,r12base) glue_objc_retainAutoreleasedReturnValue(object)(sysv,r12base) glue_objc_storeStrong(object,value)(sysv,r12base) glue_objc_storeWeak(object,value)(sysv,r12base) glue_objc_loadWeakRetained(object)(sysv,r12base) glue_objc_initWeak(object,value)(sysv,r12base) glue_objc_destroyWeak(object)(sysv,r12base) glue_objc_loadWeak(object)(sysv,r12base) glue_objc_copyWeak(dest,src)(sysv,r12base) glue_objc_moveWeak(dest,src)(sysv,r12base) glue_sel_registerName(name)(sysv,r12base) glue_sel_getName(selector)(sysv,r12base) glue_sel_isEqual(selector1,selector2)(sysv,r12base) glue_objc_allocateClassPair(superclass,name,extraBytes)(sysv,r12base) glue_objc_registerClassPair(class_)(sysv,r12base) glue_objc_getClassList(buffer,count)(sysv,r12base) glue_objc_copyClassList(length)(sysv,r12base) glue_class_isMetaClass(class_)(sysv,r12base) glue_class_getName(class_)(sysv,r12base) glue_class_getSuperclass(class_)(sysv,r12base) glue_class_getInstanceSize(class_)(sysv,r12base) glue_class_respondsToSelector(class_,selector)(sysv,r12base) glue_class_conformsToProtocol(class_,p)(sysv,r12base) glue_class_getMethodImplementation(class_,selector)(sysv,r12base) glue_class_getMethodImplementation_stret(class_,selector)(sysv,r12base) glue_class_getMethodTypeEncoding(class_,selector)(sysv,r12base) glue_class_addMethod(class_,selector,implementation,typeEncoding)(sysv,r12base) glue_class_replaceMethod(class_,selector,implementation,typeEncoding)(sysv,r12base) glue_object_getClass(object)(sysv,r12base) glue_object_setClass(object,class_)(sysv,r12base) glue_object_getClassName(object)(sysv,r12base) glue_protocol_getName(protocol)(sysv,r12base) glue_protocol_isEqual(protocol1,protocol2)(sysv,r12base) glue_protocol_conformsToProtocol(protocol1,protocol2)(sysv,r12base) glue_objc_setUncaughtExceptionHandler(handler)(sysv,r12base) glue_objc_setForwardHandler(forward,stretForward)(sysv,r12base) glue_objc_setEnumerationMutationHandler(handler)(sysv,r12base) glue_objc_zero_weak_references(value)(sysv,r12base) glue_objc_exit()(sysv,r12base) ##end |