• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa and dead-code stripping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • speechSynthesizer willSpeakWord trouble
      • From: Paul Bruneau <email@hidden>
References: 
 >Re: Cocoa and dead-code stripping (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Cocoa and dead-code stripping
  • Next by Date: Re: Objective-c Run-time headers
  • Previous by thread: Re: Cocoa and dead-code stripping
  • Next by thread: speechSynthesizer willSpeakWord trouble
  • Index(es):
    • Date
    • Thread