}
final VariableReference variable = variables.reference(variableSlot, op, offset);
if (variableSlot < 0) {
instruction = new Instruction(op, new ErrorOperand("!!! BAD LOCAL: " + variableSlot + " !!!"));
}
else {
instruction = Instruction.create(op, variable);
}
break;
}
case LocalI1: {
final int variableSlot;
final int operand;
if (op.isWide()) {
variableSlot = b.readUnsignedShort();
}
else {
variableSlot = b.readUnsignedByte();
}
final VariableReference variable = variables.reference(variableSlot, op, offset);
operand = b.readByte();
if (variableSlot < 0) {
instruction = new Instruction(
op,
new ErrorOperand("!!! BAD LOCAL: " + variableSlot + " !!!"),
operand
);
}
else {
instruction = Instruction.create(op, variable, operand);
}
break;
}
case LocalI2: {
final int variableSlot;
final int operand;
if (op.isWide()) {
variableSlot = b.readUnsignedShort();
}
else {
variableSlot = b.readUnsignedByte();
}
final VariableReference variable = variables.reference(variableSlot, op, offset);
operand = b.readShort();
if (variableSlot < 0) {
instruction = new Instruction(
op,
new ErrorOperand("!!! BAD LOCAL: " + variableSlot + " !!!"),
operand
);
}
else {
instruction = Instruction.create(op, variable, operand);