• 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: Mon, 2 Jul 2007 21:31:03 -0700


On Jul 2, 2007, at 8:28 PM, Wade Tregaskis wrote:

The way this would work is to have the development tools scan all message selector references (and class literal references) and strip all methods and classes that aren't referenced. This process would repeat until the tool can no longer perform any more stripping.

O rly?

.h
IBOutlet id myTextField;

.m
NSString *selectorName = [myTextField stringValue];
SEL newSelector = NSSelectorFromString(selectorName);
[myObject performSelector:newSelector];

Yes, this is exactly the sort of example which I tried to cover in my original posting when I said,


    Of course, there's still the probability that some references
    won't be known at compile-time, and for these methods and classes,
    a tagging technique would be necessary to suppress the stripping.

Some folks have chimed in privately that the point wasn't whether dead-stripping support *could* be added to Objective-C, but rather, whether it is supported today.

When I read the earlier messages which claimed it wasn't possible, I thought the implication was that it was not possible due to dynamic messaging. If I misinterpreted, my apologies. To be clear, and as others have stated, no, it's not supported with existing tools. Could it be? Yes, it could. Would it be practical? Perhaps not.

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: "Clark Cox" <email@hidden>
    • Re: Cocoa and dead-code stripping
      • From: Chris Suter <email@hidden>
References: 
 >Cocoa and dead-code stripping (From: Steve Christensen <email@hidden>)
 >Re: Cocoa and dead-code stripping (From: Chris Suter <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: Wade Tregaskis <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