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

Discussion

Merging two backpatch lists rather than patching each jump separately keeps the total work

  • A.constant
  • B.proportional to the number of productions in the grammar
  • C.linear in the number of jumps that were emitted
  • D.quadratic in the number of instructions in the program

Answer: C

Each jump joins a list once and is patched once, so no instruction is visited repeatedly. Patching each jump as soon as a candidate destination appeared would revisit the same instructions many times over as the enclosing expressions combined.

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

Post your comment

Please log in or register to post a comment.