INTRODUCTION TO COMPILER DESIGN
OVERVIEW OF COMPILERS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Live code
|
|
Dead code
|
|
Constant
|
|
Variable
|
Detailed explanation-1: -Dead code is code that can never be executed in a running program. The surrounding code makes it impossible for a section of code to ever be executed.
Detailed explanation-2: -Dead code-also known as unused code-is code that is never executed at run-time and that can be safely removed. Dead code must be detected and removed because it adds confusion for developers at best. At worst dead code ends up being used again and introduces a bug because it hasen’t been maintained for long.
Detailed explanation-3: -“Dead programmes” were programs stored in write-only memory. To protect program code, PTERA let users block write access to parts of the drum, using a small plugboard. The term “dead” came back also in references to the plugboard itself as providing “dead registers” that the program couldn’t modify.