[LLVMdev] Q: clang, obj-c: Hashing selectors to SEL's.

Charlie Burns crb at sonic.net
Sat Apr 13 13:10:04 PDT 2013


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



More information about the llvm-dev mailing list