Re: Cocoa and dead-code stripping
Re: Cocoa and dead-code stripping
- Subject: Re: Cocoa and dead-code stripping
- From: Alastair Houghton <email@hidden>
- Date: Fri, 6 Jul 2007 22:10:28 +0100
On 6 Jul 2007, at 20:39, Scott Ribe wrote:
None of
the methods on the services object need be used within the main
app, and
thus get dead-stripped.
Which is exactly why there must be some way to declare those
methods as not
eligible for stripping, which is a problem that exists in other
languages,
is well-understood, and solved.
However this does not address the problem that in a typical Cocoa
application, a *significant* proportion of methods would not be
eligible for stripping, and there is no way to isolate most of those
automatically. This is in contrast to C, where very few functions
are ineligible for dead code stripping (typically only those exposed
as APIs or entry points for plug-ins and libraries), or C++, where
virtual functions are arguably the main category of ineligible
functions.
It's perhaps worth noting that ObjC methods are more dynamic than C++
virtual functions, and that dead stripping implementations typically
leave virtual functions well enough alone.
Nobody's disputing that dead stripping is possible. The problem is
that it's too dangerous to have it happen automatically, and by the
time you've finished marking all the functions where you want it to
(potentially) happen (since you can't mark just those that you need
to keep... that's far too many), you might as well just have sorted
things out by hand.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden