Dynamic Dead Code Elimination
Dead code is normally considered dead unconditionally. Therefore, it is reasonable attempting to remove dead code through dead code elimination at compile time.
However, in practise it is also common for code sections to represent dead or unreachable code only under certain conditions, which may not be known at the time of compilation. Such conditions may be imposed by different runtime environments (for example different versions of an operating system, or different sets and combinations of drivers or services loaded in a particular target environment), which may require different sets of special cases in the code, but at the same time become conditionally dead code for the other cases. Also, the software (for example, a driver or resident service) may be configurable to include or exclude certain features depending on user preferences, rendering unused code portions useless in a particular scenario. While modular software may be developed to dynamically load libraries on demand only, in most cases, it is not possible to load only the relevant routines from a particular library, and even if this would be supported, a routine may still include code sections which can be considered dead code in a given scenario, but could not be ruled out at compile time, already.
The techniques used to dynamically detect demand, identify and resolve dependencies, remove conditionally dead code, and recombine the remaining code at load or runtime are called dynamic dead code elimination.
Most computer languages, compilers and operating systems offer no or little more support than dynamic loading of libraries and late linking, therefore software utilizing dynamic dead code elimination is very rare.
Read more about this topic: Dead Code Elimination
Famous quotes containing the words dynamic, dead, code and/or elimination:
“Imagination is always the fabric of social life and the dynamic of history. The influence of real needs and compulsions, of real interests and materials, is indirect because the crowd is never conscious of it.”
—Simone Weil (19091943)
“And crossed the dark defile at last, and found
At Roncevaux upon the darkening plain
The dead against the dead and on the silent ground
The silent slain”
—Archibald MacLeish (18921982)
“Many people will say to working mothers, in effect, I dont think you can have it all. The phrase for have it all is code for have your cake and eat it too. What these people really mean is that achievement in the workplace has always come at a priceusually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.”
—Anne C. Weisberg (20th century)
“To reduce the imagination to a state of slaveryeven though it would mean the elimination of what is commonly called happinessis to betray all sense of absolute justice within oneself. Imagination alone offers me some intimation of what can be.”
—André Breton (18961966)