MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
For three address code generation of “B B1 or M B2”, M.quad is used to backpatch
A
B1.truelist
B
B1.falselist
C
B2.truelist
D
B2.falselist
Explanation: 

Detailed explanation-1: -Backpatching is basically a process of fulfilling unspecified information. This information is of labels. It basically uses the appropriate semantic actions during the process of code generation. It may indicate the address of the Label in goto statements while producing TACs for the given expressions.

Detailed explanation-2: -Backpatching can be used to generate a program for boolean expressions and the flow of control statements in one pass. In this, synthesized attributes truelist and falselist of non-terminal B are used to handle labels in jumping code for Boolean expressions.

Detailed explanation-3: -Three address code is a type of intermediate code which is easy to generate and can be easily converted to machine code.It makes use of at most three addresses and one operator to represent an expression and the value computed at each instruction is stored in temporary variable generated by compiler.

There is 1 question to complete.