Methods, Functions and Messaging.

Nice Post .. Nikhil

Cocoa Puff

Objective C programs interact with run time systems at three distinct levels

  • Through objective C source code – When an objective C code is compiled then the compiler creates the data structures and function calls that implement the dynamic behaviour of the language. The data structures capture information found in class and category definitions and in protocol declarations.
  • Through methods of NSObject class found in Foundation Framework.
  • Through direct calls to runtime functions. – A dynamic shared library with a public interface consisting of a set of functions and data structures in the header files located in the /usr/include/objc.

obj_msgSend :

In objective C methods are not bound to a function until runtime. The compiler converts a message expression [receiver message] into a call on a messaging function obj_msgSend. This function is of the following form:

objc_msgSend(receiver, selector, arg1, arg2, …)

receiver – Receiver…

View original post 341 more words

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s