class InstructionOffsetMap {

    public InstructionOffsetMap(@Nonnull List<? extends Instruction> instructions) {
        this.instructionCodeOffsets = new int[instructions.size()];

        int codeOffset = 0;
        for (int i=0; i<instructions.size(); i++) {
            instructionCodeOffsets[i] = codeOffset;
            codeOffset += instructions.get(i).getCodeUnits();
        }
    }

    public  InstructionOffsetMap(@Nonnull List<? extends Instruction> instructions);

}