Re: How is @selector resolved at compile time ?
Re: How is @selector resolved at compile time ?
- Subject: Re: How is @selector resolved at compile time ?
- From: "Erik M. Buck" <email@hidden>
- Date: Wed, 25 Jul 2001 22:59:41 -0500
The following assembly code is taken from the output of the test.
__OBJC_SELECTOR_TABLE: obviously holds the selector values. How are these
selector values merged with selector values from other files and other
frameworks. I assume the magic is in __OBJC_MODULE_CONSTRUCTOR:
when it calls ___objc_execClass. What does ___objc_execClass do exactlt ?
.align 4
__OBJC_SYMBOLS:
.long 15
.long __OBJC_SELECTOR_TABLE
.word 0
.word 0
.long 5
.long 0
.long LC3
.long LC3
.long LC3
.long LC3
.long LC3
.stabs "_OBJC_SELECTOR_TABLE:S233=ar1;0;6;38",38,0,0,__OBJC_SELECTOR_TABLE
.align 4
__OBJC_SELECTOR_TABLE:
.long __OBJC_METH_VAR_NAME_0
.long __OBJC_METH_VAR_NAME_1
.long __OBJC_METH_VAR_NAME_2
.long __OBJC_METH_VAR_NAME_3
.long __OBJC_METH_VAR_NAME_4
.long __OBJC_METH_VAR_NAME_5
.long 0
.stabs "_objc_module:T234=s16version:3,0,32;size:3,32,32;\\",128,0,0,0
.stabs "name:20,64,32;symtab:235=*230,96,32;;",128,0,0,0
.align 4
__OBJC_MODULES:
.long 5
.long 16
.long __OBJC_CLASS_NAME_0
.long __OBJC_SYMBOLS
.text
.align 4
__OBJC_MODULE_CONSTRUCTOR:
.stabd 68,0,53
pushl ëp
movl %esp,ëp
pushl $__OBJC_MODULES
call ___objc_execClass
leave
ret