package com.grahamedgecombe.tinybasic.stackir;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public final class InstructionSequence {

    private final List<Instruction> instructions = new ArrayList<>();
    private int labelCounter = 0;

    public String createLineLabel(int line) {
        return "line_" + line;
    }

    public String createGeneratedLabel() {
        return "generated_" + (labelCounter++);
    }

    public void append(Instruction... instructions) {
        for (Instruction instruction : instructions)
            this.instructions.add(instruction);
    }

    public List<Instruction> getInstructions() {
        return Collections.unmodifiableList(instructions);
    }

}

@@ -69,16 +69,41 @@
 ayList;%0A
+import java.util.Arrays;%0A
 import j
@@ -535,65 +535,8 @@
 ) %7B%0A
-        for (Instruction instruction : instructions)%0A    
     
@@ -560,16 +560,33 @@
 ions.add
+All(Arrays.asList
 (instruc
@@ -589,16 +589,18 @@
 truction
+s)
 );%0A    %7D

Replace InstructionSequence.append() for loop with addAll() call.