Skip to content

Instantly share code, notes, and snippets.

@smirn0v
Created April 30, 2013 20:30
Show Gist options
  • Save smirn0v/5491703 to your computer and use it in GitHub Desktop.
Save smirn0v/5491703 to your computer and use it in GitHub Desktop.
ObjcMsgSend
// message sent to nil: redirect to nil receiver, if any
LMsgSendNilSelf:
call 1f // load new receiver
1: popl %edx
movl __objc_nilReceiver-1b(%edx),%eax
testl %eax, %eax // return nil if no new receiver
je LMsgSendReturnZero
movl %eax, self(%esp) // send to new receiver
jmp LMsgSendReceiverOk // receiver must be in %eax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment