Machine-translated by Google. Questions are authored in English.
Top

Discussion

A new temporary name is created during expression translation by

  • A.the register allocator during the code generation phase
  • B.a function that returns a fresh name on each call
  • C.reusing the name of the leftmost operand of the expression
  • D.asking the symbol table for an unused user identifier

Answer: B

A counter guarantees a distinct name for each intermediate result. Reducing the number of temporaries is left to later optimisation rather than to the translation itself. Keeping the translation simple makes it far easier to verify as correct.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.