Re: class dispatch table has duplicate names right?
Re: class dispatch table has duplicate names right?
- Subject: Re: class dispatch table has duplicate names right?
- From: "Clark S. Cox III" <email@hidden>
- Date: Wed, 9 Jul 2003 11:38:42 -0400
On Wednesday, July 09, 2003, at 11:07, Ben Dougall wrote:
On Wednesday, July 9, 2003, at 02:58 pm, Clark S. Cox III wrote:
If you look up a couple of lines on that same page, you'll see that
paragraph put into context:
-------------
The key to messaging lies in the structures that the compiler builds
for each class and object. Every class structure includes these two
essential elements:
■A pointer to the superclass.
■A class dispatch table. This table has entries that associate method
selectors with the class-specific addresses of the methods they
identify. The selector for the setOrigin:: method is associated with
the address of (the procedure that implements) setOrigin::, the
selector for the display method is associated with display’s
address, and so on.
---------
So, every class has it's own class dispatch table.
the structures that are talked about there, in particular the class
ones, would they be part of, or even the same thing as, 'meta-class
objects'? as mentioned here:
(from obj-c pdf pg 70):
Note: The compiler also builds a “meta-class object” for each class.
It describes
the class object just as the class object describes instances of the
class. But while
you can send messages to instances and to the class object, the
meta-class object
is used only internally by the runtime system.
can't see these meta-class objects talked about anywhere at all, apart
from the above bit. just curious.
The meta-class objects have the same relationship to the class objects,
as the class objects have to the instances. That is, the class object
describes what methods the instance object responds to, as well as
where the implementations of those methods are located in memory. Well,
the meta-class object describes what methods the class object responds
to, and where they are located in memory. However, this is all moot
because you are never given access to the meta-classes, they are
basically an implementation detail of the runtime.
--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.