COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

MISCELLENOUS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A ____ keeps track of what is currently in each register.
A
Address descriptor
B
Program counter
C
Register descriptor
D
Data descriptor
Explanation: 

Detailed explanation-1: -Register descriptor : Register descriptor is used to inform the code generator about the availability of registers. Register descriptor keeps track of values stored in each register. Whenever a new register is required during code generation, this descriptor is consulted for register availability.

Detailed explanation-2: -Register and Address Descriptors: A register descriptor is used to keep track of what is currently in each registers. The register descriptors show that initially all the registers are empty. An address descriptor stores the location where the current value of the name can be found at run time.

Detailed explanation-3: -For each program variable, an address descriptor keeps track of the loca-tion or locations where the current value of that variable can be found. The location might be a register, a memory address, a stack location, or some set of more than one of these.

Detailed explanation-4: -Explanation: Address descriptor : Values of the names (identifiers) used in the program might be stored at different locations while in execution. Address descriptors are used to keep track of memory locations where the values of identifiers are stored.

There is 1 question to complete.