package p.studio.compiler.backend.irvm;

import p.studio.utilities.structures.ReadOnlyList;

import java.util.Objects;

public record IRVMFunction(
        String name,
        int paramSlots,
        int localSlots,
        int returnSlots,
        int maxStackSlots,
        ReadOnlyList<IRVMInstruction> instructions) {
    public IRVMFunction {
        Objects.requireNonNull(name, "name");
        instructions = instructions == null ? ReadOnlyList.empty() : instructions;
    }
}

