Comment: | More style improvements |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
754bf247423a353273b6c62f315cef25 |
User & Date: | js on 2019-02-07 21:31:16 |
Other Links: | manifest | tags |
2019-02-07
| ||
21:55 | More style improvements check-in: 239fbb269e user: js tags: trunk | |
21:31 | More style improvements check-in: 754bf24742 user: js tags: trunk | |
00:46 | Make style consistent between ObjFW and ObjFW_RT check-in: ef6d69931e user: js tags: trunk | |
Modified src/OFApplication.h from [8ae28aad85] to [1dfb4a501e].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - + | @class OFArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFSandbox; @class OFString; |
︙ |
Modified src/OFBlock.m from [f20a52dd95] to [dd601345d1].
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - - + + | struct objc_abi_class _NSConcreteMallocBlock = { &_NSConcreteMallocBlock_metaclass, "OFBlock", "OFMallocBlock", 8, OBJC_CLASS_INFO_CLASS, sizeof(of_block_literal_t), NULL, NULL }; static struct { unsigned long unknown; |
︙ | |||
306 307 308 309 310 311 312 | 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 | - + - + - + - + - + - + - + - - + + - + - + - + - - + + - + | OF_ENSURE(of_spinlock_unlock(&byrefSpinlocks[hash])); #endif break; } } void |
︙ |
Modified src/OFObject.m from [cd9c001f04] to [edba45d06c].
︙ | |||
140 141 142 143 144 145 146 | 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 | - + - + - + - + | static void enumerationMutationHandler(id object) { @throw [OFEnumerationMutationException exceptionWithObject: object]; } void OF_NO_RETURN_FUNC |
︙ |
Modified src/foundation-compat.m from [a5f000b446] to [8a3ccfcff7].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | - + - + | static id alloc(Class self, SEL _cmd) { return [OFAutoreleasePool alloc]; } static void |
︙ |
Modified src/instance.m from [64f7431604] to [77311e8f90].
︙ | |||
15 16 17 18 19 20 21 | 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 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 | - - + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - - - + + + - + | * file. */ #include "config.h" #import "OFObject.h" |
Modified src/macros.h from [ac7aa6dc5d] to [6558af17e7].
︙ | |||
207 208 209 210 211 212 213 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + - + | # define OF_NULL_RESETTABLE_PROPERTY # define nonnull # define nullable # define null_unspecified #endif #if __has_feature(objc_kindof) |
︙ |
Modified src/runtime/ObjFW_RT.h from [eecb74dd6c] to [9b77c85f63].
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + - + + + + | struct objc_selector { uintptr_t UID; const char *_Nullable typeEncoding; }; struct objc_super { id __unsafe_unretained _Nullable self; #ifdef __cplusplus |
︙ | |||
209 210 211 212 213 214 215 | 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 | - + - - - - - + + + + + - + - + - + - + - + - + - + + | extern "C" { #endif extern SEL _Nonnull sel_registerName(const char *_Nonnull name); extern const char *_Nonnull sel_getName(SEL _Nonnull selector); extern bool sel_isEqual(SEL _Nonnull selector1, SEL _Nonnull selector2); extern Class _Nonnull objc_allocateClassPair(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes); |
︙ |
Modified src/runtime/ObjFW_RT.sfd from [fb5bdffa34] to [a242780665].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + | void objc_exception_throw_m68k(id _Nonnull object)(a0) int objc_sync_enter_m68k(id _Nullable object)(a0) int objc_sync_exit_m68k(id _Nullable object)(a0) id objc_getProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)(a0,a1,d0,d1) void objc_setProperty_m68k(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id value, bool atomic, signed char copy)(a0,a1,d0,a2,d1,d2) void objc_getPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) void objc_setPropertyStruct_m68k(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)(a0,a1,d0,d1,d2) |
︙ | |||
46 47 48 49 50 51 52 | 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 | - + - - - - - - - - - - - + + + + + + + + + + + - + | * These only need glue on MorphOS. As none of them are functions that are used * in hot paths, it's easier to also use the glue on AmigaOS 3, which also has * the benefit of having all __saveds in a single place. SEL _Nonnull sel_registerName_m68k(const char *_Nonnull name)(a0) const char *_Nonnull sel_getName_m68k(SEL _Nonnull selector)(a0) bool sel_isEqual_m68k(SEL _Nonnull selector1, SEL _Nonnull selector2)(a0,a1) Class _Nonnull objc_allocateClassPair_m68k(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)(a0,a1,d0) |
Modified src/runtime/amiga-glue.m from [850cd5db39] to [6e9a75e691].
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 | - + - + | return objc_allocateClassPair(superclass, name, extraBytes); } void __saveds objc_registerClassPair_m68k(void) { |
︙ | |||
415 416 417 418 419 420 421 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + | return objc_copyClassList(length); } bool __saveds class_isMetaClass_m68k(void) { |
︙ |
Modified src/runtime/arc.m from [7827e43c55] to [39e51eca73].
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - + - + - + | static struct objc_hashtable *hashtable; #ifdef OF_HAVE_THREADS static of_spinlock_t spinlock; #endif static uint32_t |
︙ |
Modified src/runtime/category.m from [ca01b62fa9] to [153181212b].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | &methodList->methods[i]); } static void registerCategory(struct objc_abi_category *category) { struct objc_abi_category **categories; |
︙ | |||
69 70 71 72 73 74 75 | 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 | - - - + + + - - - + + + - + - + | category->className); newCategories[i] = category; newCategories[i + 1] = NULL; objc_hashtable_set(categoriesMap, category->className, newCategories); |
︙ |
Modified src/runtime/class.m from [66376a6ccb] to [f8bb9979ba].
︙ | |||
30 31 32 33 34 35 36 | 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 | - + - + - - + + - + - + - + - + - + - + | static Class *loadQueue = NULL; static size_t loadQueueCount = 0; static struct objc_dtable *emptyDTable = NULL; static unsigned lookupsUntilFastPath = 128; static struct objc_sparsearray *fastPath = NULL; static void |
︙ | |||
108 109 110 111 112 113 114 | 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 | - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - - + + + - - + + - + - - + + - + - - + + - + - - + + - + - + - - + + - + - + - + - + - - + + - - - - - - + + + + + + - - + + - + - + - + - - + + + - - + + - - + + - + - + - - + + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + | * 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. */ if (cache && fastPath != NULL) { |
︙ | |||
394 395 396 397 398 399 400 | 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 | - + - - - + + + - + - - + + - - + + - + - + - + - - + + - - - - - + + + + + - + - + - + - + - - - + + + - - + + - - + + - + - + - + - - + + - + - + - + - + - + - + | } } void objc_register_all_classes(struct objc_abi_symtab *symtab) { for (uint16_t i = 0; i < symtab->classDefsCount; i++) { |
︙ | |||
552 553 554 555 556 557 558 | 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 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + - + - + - + - + - + - - + + - + - - + + - + - + - + - + | return classesCount; if (classesCount < count) count = classesCount; j = 0; for (uint32_t i = 0; i < classes->size; i++) { |
︙ | |||
813 814 815 816 817 818 819 | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | - + - + - + - + - + - + - - + + - + - + - + - + - + - - - + + + - - + + - + - - + + - + - + - - + + - - + + - + - + - - + + - + - + - + | object = (struct objc_object *)object_; return object->isa; } Class |
︙ |
Modified src/runtime/dtable.m from [1fc547de44] to [f7a78b92b5].
︙ | |||
69 70 71 72 73 74 75 | 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 | - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + | for (uint_fast16_t i = 0; i < 256; i++) DTable->buckets[i] = emptyLevel2; return DTable; } void |
︙ |
Modified src/runtime/exception.m from [3d1d7d2d6b] to [9119c3ea09].
︙ | |||
460 461 462 463 464 465 466 | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + - + | } } return false; #else uintptr_t callsiteLandingpad, callsiteAction; |
︙ |
Modified src/runtime/hashtable.m from [e12d752357] to [d1e5e6d9a8].
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + - + | hash ^= (hash >> 11); hash += (hash << 15); return hash; } bool |
︙ |
Modified src/runtime/linklib/linklib.m from [f03a29b448] to [964c1adbfe].
︙ | |||
322 323 324 325 326 327 328 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | Class objc_allocateClassPair(Class superclass, const char *name, size_t extraBytes) { return objc_allocateClassPair_m68k(superclass, name, extraBytes); } void |
︙ |
Modified src/runtime/lookup.m from [5c7645fb2a] to [b612119f40].
︙ | |||
45 46 47 48 49 50 51 | 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 | - + - + - + - + - + - + - - + + - - + + - - - + + + | * so don't access object directly unless it's a class! */ bool isClass = object_getClass(object)->info & OBJC_CLASS_INFO_METACLASS; if (!(object_getClass(object)->info & OBJC_CLASS_INFO_INITIALIZED)) { |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + - + - + | objc_setForwardHandler(IMP forward, IMP stretForward) { forwardHandler = forward; stretForwardHandler = stretForward; } bool |
︙ | |||
179 180 181 182 183 184 185 | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | - + | IMP (*notFound)(id, SEL)) { IMP imp; if (super->self == nil) return (IMP)nilMethod; |
︙ |
Modified src/runtime/protocol.m from [5ec5a018d6] to [4cf5f39401].
︙ | |||
51 52 53 54 55 56 57 | 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 | - + - + - + - + | protocol2)) return true; return false; } bool |
︙ |
Modified src/runtime/selector.m from [6c2deedb05] to [97ce324a27].
︙ | |||
37 38 39 40 41 42 43 | 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 | - + - + - - + + + - - - + + + - - + + + - - + - + - + - + - + - + - - + + - + - + - + - - + + + | static struct objc_hashtable *selectors = NULL; static uint32_t selectorsCount = 0; static struct objc_sparsearray *selectorNames = NULL; static void **freeList = NULL; static size_t freeListCount = 0; void |
︙ |
Modified src/runtime/static-instances.m from [e9f2e9fced] to [ca4604a232].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + - + - + | void objc_init_static_instances(struct objc_abi_symtab *symtab) { struct objc_abi_static_instances **staticInstances; /* Check if the class for a static instance became available */ for (size_t i = 0; i < staticInstancesCount; i++) { |
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + - + - + | staticInstances = (struct objc_abi_static_instances **) symtab->defs[symtab->classDefsCount + symtab->categoryDefsCount]; if (staticInstances == NULL) return; for (; *staticInstances != NULL; staticInstances++) { |
︙ |