Re: [Camelbones-devel] [PATCH] Make NSObject::AUTOLOAD cache
Brought to you by:
shermpendley
From: Sherm P. <she...@gm...> - 2010-11-10 21:15:16
|
On Wed, Nov 10, 2010 at 3:33 PM, Matt Sergeant <ma...@se...> wrote: > > Can you explain the need for the isSuperMethod flag? Surely you just > dispatch the method to whichever object is in $self and Objective C knows > how to climb it's own inheritance tree? Yes, but the compiler knows that by emitting different code when super is the target, so [self foo] and [super foo] compile down to calls to objc_msgSend() and objc_msgSendSuper(), respectively. CBCallNativeMethod() needs to know whether it's been called via SUPER for the same reason, to decide which dispatch method to call. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net |