int baseAddress = methodDef.getPackedSwitchBaseAddress( this.codeAddress + ((Instruction31t)instruction).getCodeOffset()); if (baseAddress == -1) {
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { commentedOut = true; for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { commentedOut = true; for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }
public PackedSwitchMethodItem(MethodDefinition methodDef, int codeAddress, PackedSwitchPayload instruction) { super(methodDef, codeAddress, instruction); int baseCodeAddress = methodDef.getPackedSwitchBaseAddress(codeAddress); targets = new ArrayList<PackedSwitchTarget>(); boolean first = true; //TODO: does dalvik allow switc payloads with no cases? int firstKey = 0; if (baseCodeAddress >= 0) { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } LabelMethodItem label = methodDef.getLabelCache().internLabel( new LabelMethodItem(methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(), "pswitch_")); targets.add(new PackedSwitchLabelTarget(label)); } } else { for (SwitchElement switchElement: instruction.getSwitchElements()) { if (first) { firstKey = switchElement.getKey(); first = false; } targets.add(new PackedSwitchOffsetTarget(switchElement.getOffset())); } } this.firstKey = firstKey; }
int baseAddress = methodDef.getPackedSwitchBaseAddress( this.codeAddress + ((Instruction31t)instruction).getCodeOffset()); if (baseAddress == -1) {