Skip code generation for Block, ProjNode and StartNode IrGraph nodes

This commit is contained in:
Laborratte 5 2025-05-12 16:42:03 +02:00
parent 3cfe211bf6
commit 2be0298ee7
Signed by: Laborratte5
GPG key ID: 3A30072E35202C02

View file

@ -10,7 +10,10 @@ import edu.kit.kastel.vads.compiler.backend.aasm.AasmRegisterAllocator;
import edu.kit.kastel.vads.compiler.backend.regalloc.Register;
import edu.kit.kastel.vads.compiler.backend.regalloc.RegisterAllocator;
import edu.kit.kastel.vads.compiler.ir.IrGraph;
import edu.kit.kastel.vads.compiler.ir.node.Block;
import edu.kit.kastel.vads.compiler.ir.node.Node;
import edu.kit.kastel.vads.compiler.ir.node.ProjNode;
import edu.kit.kastel.vads.compiler.ir.node.StartNode;
public class X86CodeGenerator implements CodeGenerator {
@ -56,7 +59,11 @@ public class X86CodeGenerator implements CodeGenerator {
// TODO: implement code generation
switch (node) {
default:
case Block _, ProjNode _, StartNode _ -> {
// do nothing, skip line break
return;
}
default ->
throw new UnsupportedOperationException("Codegeneration for '" + node.toString() + "' is not implemented.");
}
}