Dead code: Difference between revisions

Content deleted Content added
Pagen HD (talk | contribs)
Analysis: added a paragraph about Visual Studio and Eclipse's ability to find dead code
reword lede, ch cat (the article is not about terminology)
Line 1:
{{Merge from|Dead code elimination|date=November 2010}}
 
In [[computer programming]], '''Deaddead code''' is a [[computer programming]] term for code in the [[source code]] of a program which is executed but whose result is never used in any other computation.<ref>[http://doi.acm.org/10.1145/349214.349233 Debray, S. K., Evans, W., Muth, R., and De Sutter, B. 2000. Compiler techniques for code compaction. ACM Trans. Program. Lang. Syst. 22, 2 (Mar. 2000), 378-415.]</ref><ref>[[Andrew Appel|Appel, A. W.]] 1998 Modern Compiler Implementation in Java. Cambridge University Press.</ref> The execution of dead code wastes computation time as its results are never used.
 
While the result of a dead computation may never be used the dead code may raise [[exceptions]] or affect some global state, thus removal of such code may change the output of the program and introduce unintended [[software bug|bugs]]. Compiler optimizations are typically conservative in their approach to dead code removal if there is any ambiguity as to whether removal of the dead code will affect the program output.
Line 41:
* [http://www.ucdetector.org/ UCDetector] Eclipse PlugIn to find dead java code
 
<!--Categories-->
{{DEFAULTSORT:Dead Code}}
[[Category:Compiler optimizations]]
[[Category:Software engineering terminology]]
[[Category:Source code]]
 
<!--Interwikis-->
 
[[de:Toter Code]]