123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- // Swift metadata initializers. Define these in the test.
- EXTERN_C Class initSuper(Class cls, void *arg);
- EXTERN_C Class initSub(Class cls, void *arg);
- @interface SwiftSuper : NSObject @end
- @interface SwiftSub : SwiftSuper @end
- __BEGIN_DECLS
- // not id to avoid ARC operations because the class doesn't implement RR methods
- void* nop(void* self) { return self; }
- __END_DECLS
- asm( \
- ".globl _OBJC_CLASS_$_"
- ".section __DATA,__objc_data \n" \
- ".align 3 \n" \
- "_OBJC_CLASS_$_"
- PTR "_OBJC_METACLASS_$_"
- PTR "_OBJC_CLASS_$_"
- PTR "__objc_empty_cache \n" \
- PTR "0 \n" \
- PTR "L_"
- \
- ".long 0 \n" \
- ".long 0 \n" \
- ".long 16 \n" \
- ".short 15 \n" \
- ".short 0 \n" \
- ".long 256 \n" \
- ".long 0 \n" \
- PTR "0 \n" \
- \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- \
- "_OBJC_METACLASS_$_"
- PTR "_OBJC_METACLASS_$_"
- PTR "_OBJC_METACLASS_$_"
- PTR "__objc_empty_cache \n" \
- PTR "0 \n" \
- PTR "L_"
- \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- \
- "L_"
- ".long (1<<6) \n" \
- ".long 0 \n" \
- ".long " PTRSIZE " \n" \
- ONLY_LP64(".long 0 \n") \
- PTR "0 \n" \
- PTR "L_"
- PTR "L_"
- PTR "0 \n" \
- PTR "L_"
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "_"
- \
- "L_"
- ".long 1 \n" \
- ".long 40 \n" \
- ".long 40 \n" \
- ONLY_LP64(".long 0 \n") \
- PTR "0 \n" \
- PTR "L_"
- PTR "L_"
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- PTR "0 \n" \
- \
- "L_"
- "L_"
- ".long 3*" PTRSIZE "\n" \
- ".long 1 \n" \
- PTR "L_"
- PTR "L_"
- PTR "_nop" SIGNED_METHOD_LIST_IMP "\n" \
- \
- "L_"
- ".long 4*" PTRSIZE " \n" \
- ".long 1 \n" \
- PTR "L_"
- PTR "L_"
- PTR "L_"
- ".long " LOGPTRSIZE "\n" \
- ".long " PTRSIZE "\n" \
- \
- "L_"
- ".long 0 \n" \
- \
- ".cstring \n" \
- "L_"
- "L_"
- "L_"
- " .ascii \""
- "L_"
- \
- \
- ".text \n" \
- ); \
- extern char OBJC_CLASS_$_
- Class Raw
- extern char OBJC_CLASS_$_
- static Class name
- asm( \
- ".globl _OBJC_CLASS_$_"
- ".section __DATA,__objc_data \n" \
- ".align 3 \n" \
- "_dummy"
- PTR "0 \n" \
- ".alt_entry _OBJC_CLASS_$_"
- "_OBJC_CLASS_$_"
- PTR "1 \n" \
- PTR "_"
- ".text" \
- ); \
- extern char OBJC_CLASS_$_
- Class Raw
- SWIFT_STUB_CLASSREF(name)
-
- void fn(void) { }
|