Loading the code workspace…
Implement code generation for control flow statements.
Generate code for if statements:
Generate code for loops:
Handle break and continue:
Implement short-circuit evaluation:
&&: Skip right side if left is false||: Skip right side if left is trueGenerate proper comparison code:
Lowering if/while into labels and conditional jumps is where structured programming meets the machine — CPUs only have jumps, and every compiler must do this translation. Branch layout choices made here have real performance consequences: GCC's __builtin_expect and the Linux kernel's likely()/unlikely() macros exist to influence exactly this codegen.
Sample case for Run. Submit grades this sample plus all hidden tests.