Skip to content

Commit

Permalink
Refactor unstable statics macro implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 12, 2023
1 parent d2737da commit 4fb770b
Show file tree
Hide file tree
Showing 31 changed files with 562 additions and 599 deletions.
305 changes: 134 additions & 171 deletions crates/objc2/src/macros/mod.rs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -878,12 +878,6 @@ l_anon.[ID].21:
.quad l_anon.[ID].16
.asciz "\017\000\000\000\000\000\000"

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
.globl L_OBJC_METH_VAR_NAME_d874ee9262978be2
L_OBJC_METH_VAR_NAME_d874ee9262978be2:
Expand All @@ -896,9 +890,9 @@ L_OBJC_SELECTOR_REFERENCES_d874ee9262978be2:
.quad L_OBJC_METH_VAR_NAME_d874ee9262978be2

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -913,9 +907,9 @@ L_OBJC_SELECTOR_REFERENCES_4539fd1dbda0cddc:
.quad L_OBJC_METH_VAR_NAME_4539fd1dbda0cddc

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -930,9 +924,9 @@ L_OBJC_SELECTOR_REFERENCES_2b1b3a94e0ece2e5:
.quad L_OBJC_METH_VAR_NAME_2b1b3a94e0ece2e5

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -947,9 +941,9 @@ L_OBJC_SELECTOR_REFERENCES_f7f521670860b0ce:
.quad L_OBJC_METH_VAR_NAME_f7f521670860b0ce

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -964,9 +958,9 @@ L_OBJC_SELECTOR_REFERENCES_6addfcf634c6232f:
.quad L_OBJC_METH_VAR_NAME_6addfcf634c6232f

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -980,4 +974,10 @@ L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166:
L_OBJC_SELECTOR_REFERENCES_4a8c690dbc9d8166:
.quad L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
.asciz "\000\000\000\000@\000\000"

.subsections_via_symbols
Original file line number Diff line number Diff line change
Expand Up @@ -806,12 +806,6 @@ l_anon.[ID].21:
.long l_anon.[ID].16
.asciz "\017\000\000"

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
.globl L_OBJC_METH_VAR_NAME_d874ee9262978be2
L_OBJC_METH_VAR_NAME_d874ee9262978be2:
Expand All @@ -824,9 +818,9 @@ L_OBJC_SELECTOR_REFERENCES_d874ee9262978be2:
.long L_OBJC_METH_VAR_NAME_d874ee9262978be2

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -841,9 +835,9 @@ L_OBJC_SELECTOR_REFERENCES_4539fd1dbda0cddc:
.long L_OBJC_METH_VAR_NAME_4539fd1dbda0cddc

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -858,9 +852,9 @@ L_OBJC_SELECTOR_REFERENCES_2b1b3a94e0ece2e5:
.long L_OBJC_METH_VAR_NAME_2b1b3a94e0ece2e5

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -875,9 +869,9 @@ L_OBJC_SELECTOR_REFERENCES_f7f521670860b0ce:
.long L_OBJC_METH_VAR_NAME_f7f521670860b0ce

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -892,9 +886,9 @@ L_OBJC_SELECTOR_REFERENCES_6addfcf634c6232f:
.long L_OBJC_METH_VAR_NAME_6addfcf634c6232f

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -908,6 +902,12 @@ L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166:
L_OBJC_SELECTOR_REFERENCES_4a8c690dbc9d8166:
.long L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
.asciz "\000\000\000\000@\000\000"

.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.p2align 2, 0x0
LL_OBJC_CLASSLIST_REFERENCES_$_NSObject$non_lazy_ptr:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,6 @@ l_anon.[ID].21:
.long l_anon.[ID].16
.asciz "\017\000\000"

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
.globl L_OBJC_METH_VAR_NAME_d874ee9262978be2
L_OBJC_METH_VAR_NAME_d874ee9262978be2:
Expand All @@ -827,9 +821,9 @@ L_OBJC_SELECTOR_REFERENCES_d874ee9262978be2:
.long L_OBJC_METH_VAR_NAME_d874ee9262978be2

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -844,9 +838,9 @@ L_OBJC_SELECTOR_REFERENCES_4539fd1dbda0cddc:
.long L_OBJC_METH_VAR_NAME_4539fd1dbda0cddc

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -861,9 +855,9 @@ L_OBJC_SELECTOR_REFERENCES_2b1b3a94e0ece2e5:
.long L_OBJC_METH_VAR_NAME_2b1b3a94e0ece2e5

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -878,9 +872,9 @@ L_OBJC_SELECTOR_REFERENCES_f7f521670860b0ce:
.long L_OBJC_METH_VAR_NAME_f7f521670860b0ce

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -895,9 +889,9 @@ L_OBJC_SELECTOR_REFERENCES_6addfcf634c6232f:
.long L_OBJC_METH_VAR_NAME_6addfcf634c6232f

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__objc_methname,cstring_literals
Expand All @@ -911,6 +905,12 @@ L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166:
L_OBJC_SELECTOR_REFERENCES_4a8c690dbc9d8166:
.long L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166

.section __DATA,__objc_imageinfo,regular,no_dead_strip
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
.asciz "\000\000\000\000@\000\000"

.section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
.p2align 2, 0x0
LL_OBJC_CLASSLIST_REFERENCES_$_NSObject$non_lazy_ptr:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -831,12 +831,6 @@ l_anon.[ID].21:
.long l_anon.[ID].16
.asciz "\017\000\000"

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
.globl L_OBJC_METH_VAR_NAME_d874ee9262978be2
L_OBJC_METH_VAR_NAME_d874ee9262978be2:
Expand All @@ -849,9 +843,9 @@ L_OBJC_SELECTOR_REFERENCES_d874ee9262978be2:
.long L_OBJC_METH_VAR_NAME_d874ee9262978be2

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.globl L_OBJC_IMAGE_INFO_d874ee9262978be2
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
L_OBJC_IMAGE_INFO_d874ee9262978be2:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
Expand All @@ -866,9 +860,9 @@ L_OBJC_SELECTOR_REFERENCES_4539fd1dbda0cddc:
.long L_OBJC_METH_VAR_NAME_4539fd1dbda0cddc

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.globl L_OBJC_IMAGE_INFO_4539fd1dbda0cddc
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
L_OBJC_IMAGE_INFO_4539fd1dbda0cddc:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
Expand All @@ -883,9 +877,9 @@ L_OBJC_SELECTOR_REFERENCES_2b1b3a94e0ece2e5:
.long L_OBJC_METH_VAR_NAME_2b1b3a94e0ece2e5

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.globl L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
L_OBJC_IMAGE_INFO_2b1b3a94e0ece2e5:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
Expand All @@ -900,9 +894,9 @@ L_OBJC_SELECTOR_REFERENCES_f7f521670860b0ce:
.long L_OBJC_METH_VAR_NAME_f7f521670860b0ce

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.globl L_OBJC_IMAGE_INFO_f7f521670860b0ce
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
L_OBJC_IMAGE_INFO_f7f521670860b0ce:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
Expand All @@ -917,9 +911,9 @@ L_OBJC_SELECTOR_REFERENCES_6addfcf634c6232f:
.long L_OBJC_METH_VAR_NAME_6addfcf634c6232f

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.globl L_OBJC_IMAGE_INFO_6addfcf634c6232f
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
L_OBJC_IMAGE_INFO_6addfcf634c6232f:
.asciz "\000\000\000\000@\000\000"

.section __TEXT,__cstring,cstring_literals
Expand All @@ -933,6 +927,12 @@ L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166:
L_OBJC_SELECTOR_REFERENCES_4a8c690dbc9d8166:
.long L_OBJC_METH_VAR_NAME_4a8c690dbc9d8166

.section __OBJC,__image_info
.globl L_OBJC_IMAGE_INFO_4a8c690dbc9d8166
.p2align 2, 0x0
L_OBJC_IMAGE_INFO_4a8c690dbc9d8166:
.asciz "\000\000\000\000@\000\000"

.section __IMPORT,__pointers,non_lazy_symbol_pointers
LL_OBJC_CLASS_REFERENCES_NSObject$non_lazy_ptr:
.indirect_symbol L_OBJC_CLASS_REFERENCES_NSObject
Expand Down
Loading

0 comments on commit 4fb770b

Please sign in to comment.