Re: Cocoa and dead-code stripping
Re: Cocoa and dead-code stripping
- Subject: Re: Cocoa and dead-code stripping
- From: Andre Schnoor <email@hidden>
- Date: Tue, 03 Jul 2007 17:32:15 +0200
Dirk Stegemann (Mailing-Lists) wrote:
Hello,
Am 03.07.2007 um 16:21 schrieb Andre Schnoor:
While it is possible, unused code stripping has its weaknesses, like
others already pointed out.
I'm still not convinced that *unused code stripping* is possible in
Obj-C, because it's simply not possible to tell "unused" and "most
probably unused" code apart, so the "weakness" is its non-feasibility;
just call it "risky dead local code stripping" or similar, and it's
fine...
I must admit I am not familiar with the reflective capabilities of
Objective-C in detail, so I might be wrong. But other dynamic OO
languages, Smalltalk for instance, can do it (I am doing it every day,
even wrote parts of the stripper myself). Hence it should be possible.
Telling used and unused code apart is straightforward unless
non-standard method calls are employed (e.g. selectors constructed from
Strings).
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.
Andre
_______________________________________________
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