| CSC448: Code Generation: Code Generation for Other Statements [78/133] | ![]() ![]() ![]() |
Corin did not show
We still have to generate code for:
StatGoto: easy, unconditional jump
(jmp).
StatIfThenGoto: easy, extract the integer
field from the Boolean and jump if it is non-zero to the
label (jne).
StatLabel: easy.
StatReturn: easy, use getExpVarOrExpNull.
StatVar: easy, just emit a comment.
Hunt for examples in:
Exercise: reflect on the complexity of a code generator that would be needed if we did not perform source-to-source transformations.