Homework #7

Compiler Construction, WS0910

Implement code generation for if, else and while statements. You should start by reenabling your interpreter unit tests and try to fix one by one by extending your code generator. The compiler should handle boolean operators <, >, =, <=, etc. The expression compiler should generate a branch instruction if it detects a conditional expression. Afterwards, the surrounding code handling the if statement is responsible for jump target fixup to implement branching logic. Please make sure to write tests for all if/else combinations with true and false conditions. while should be simpler, but make sure to test it, too.