• 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: Andrew Demkin <email@hidden>
  • Date: Tue, 3 Jul 2007 10:04:38 -0700


On Jul 3, 2007, at 9:54 AM, Clark Cox wrote:

The problem with this is that there is nothing "non-standard" about
constructing selectors from strings. Any Cocoa app that:

loads Nibs,
uses Cocoa Bindings,
uses Core Data,

is implicitly using Key-value coding. KVC depends on being able to
call methods (and lookup instance variables) based on strings that
need not be known at compile time.

Virtually every Cocoa program uses KVC in some way.

There will of course still remain some unused code after the stripping.
No stripper is able to tell which (theoretically) reachable code will
actually be reached during runtime.

And, in Objective-C, the "stripper" would have to assume that *any* method was reachable (because that is true; every method is reachable). It could, however, still strip C and C++ functions.


Nib files are part of an Xcode project. Perhaps it's not obvious, but an automatic stripping tool would be initialized with access to these resources so they too can be parsed for message selectors (derived from property names or whatever).

Andrew

_______________________________________________

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:
    • Re: Cocoa and dead-code stripping
      • From: Andre Schnoor <email@hidden>
References: 
 >Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Uli Kusterer <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Chris Hanson <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andrew Demkin <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Thomas Engelmeier <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andre Schnoor <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: "Dirk Stegemann (Mailing-Lists)" <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Andre Schnoor <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: Cocoa and dead-code stripping
  • Next by Date: Re: Cocoa and dead-code stripping
  • Previous by thread: Re: Cocoa and dead-code stripping
  • Next by thread: Re: Cocoa and dead-code stripping
  • Index(es):
    • Date
    • Thread