getAllInstructions method Null safety

List<ProgramInstruction<OT>> getAllInstructions()

Implementation

List<ProgramInstruction<OT>> getAllInstructions() {
  final result = <ProgramInstruction<OT>>[];
  for (int opcode = 0; opcode < _operationTable.length; opcode++) {
    final op = _operationTable[opcode];
    if (op != null) {
      final arg = _argValues[opcode]!;
      final instr = memory.model.newProgramInstruction(op, arg);
      assert(instr.opcode == opcode);
      result.add(instr);
    }
  }
  return result;
}