Charlie Burns
2013-Apr-13 20:10 UTC
[LLVMdev] Q: clang, obj-c: Hashing selectors to SEL's.
I'm trying to understand the method dispatch in objc_MsgSend. At some point during compilation, ascii selectors are hashed into integer SEL's. Is this hash somehow guaranteed to be unique? If so, how? If not, how are collisions handled? Is this hashing done during the link phase? Any insights/pointers to the code/documentation related to this hashing would be greatly appreciated. Thanks, Charlie
David Chisnall
2013-Apr-14 10:50 UTC
[LLVMdev] Q: clang, obj-c: Hashing selectors to SEL's.
This is a question specific to Apple's Objective-C runtime and would be more appropriately addressed to Apple's Objective-C mailing list. David On 13 Apr 2013, at 21:10, Charlie Burns <crb at sonic.net> wrote:> > I'm trying to understand the method dispatch in objc_MsgSend. > > At some point during compilation, ascii selectors are hashed > into integer SEL's. Is this hash somehow guaranteed to be unique? > If so, how? If not, how are collisions handled? Is this hashing > done during the link phase? > > Any insights/pointers to the code/documentation related to this > hashing would be greatly appreciated. > > Thanks, > > Charlie > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev