Re: including xibs from another project
Re: including xibs from another project
- Subject: Re: including xibs from another project
- From: Jonas Maebe <email@hidden>
- Date: Wed, 20 Jan 2010 17:19:14 +0100
On 20 Jan 2010, at 16:47, Roland King wrote:
ok this makes some sense, there's lots of ways in which I can see
dynamic resolution of classes or methods isn't known at link time,
KVO, methods composed from strings, I would not expect a linker to
figure that out. But that's not where we are in this example, it's a
little more direct than that, there's a class Foo and if you call
[ Foo anyMethod ]
all the code for Foo gets linked in
That's because the compiler has to pass a reference to the Foo class
information as target parameter to the objc_msgSend() function. Hence,
the linker knows that it has to link in Foo.
but if you call
[ foo anyInstanceMethod ]
where foo is explicitly defined to be a Foo*, it doesn't link it in.
In this case, the target parameter of objc_msgSend() is simply the
variable "foo". At the assembler/machine code level, there is no
information whatsoever about what that variable's type is (it's just a
random memory location), and hence the linker does not know anything
about it (even if you enable debug info, because the debug info does
not explicitly reference the class information; it rather partially
duplicates that info and primarily relies on the debugger to look up
most things at run time using reflection).
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden