}
@Override
public void setData(byte[] data, DecompilationContext dc) {
ByteParser parser = new ByteArrayByteParser(data);
parser.setBigEndian(true);
parser.getByte(); // throw away OPCODE
while ((dc.getPosition() + parser.getPosition()) % 4 != 0) {
parser.getByte(); // throw away bytes until we are in a position
// divisible by 4
}
this.def = new Label((int) parser.getInt() + dc.getPosition(),
"lookup_label_def");
int npairs = (int) parser.getInt();
this.offsets = new HashMap<Integer, Label>();
for (int i = 0; i < npairs; i++) {
int match = (int) parser.getInt();
int offset = (int) parser.getInt();
Label label = new Label(dc.getPosition() + offset, "lookup_label_"
+ match);
this.offsets.put(match, label);
}
}