@Nonnull private BuilderInstruction11x newBuilderInstruction11x(@Nonnull Instruction11x instruction) { return new BuilderInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
@Override public Op create(MethodLocation location, TIntObjectMap<MethodLocation> addressToLocation, VirtualMachine vm) { Instruction11x instr = (Instruction11x) location.getInstruction(); int register = instr.getRegisterA(); return new ThrowOp(location, register); }
@Override public Op create(MethodLocation location, TIntObjectMap<MethodLocation> addressToLocation, VirtualMachine vm) { Instruction11x instr = (Instruction11x) location.getInstruction(); int register = instr.getRegisterA(); return new ReturnOp(location, register); }
@Override public void jimplify(DexBody body) { Instruction11x throwInstruction = (Instruction11x) instruction; ThrowStmt throwStmt = Jimple.v().newThrowStmt(body.getRegisterLocal(throwInstruction.getRegisterA())); setUnit(throwStmt); addTags(throwStmt); body.add(throwStmt); if (IDalvikTyper.ENABLE_DVKTYPER) { DalvikTyper.v().setType(throwStmt.getOpBox(), RefType.v("java.lang.Throwable"), true); } } }
@Override public void jimplify(DexBody body) { Instruction11x returnInstruction = (Instruction11x) this.instruction; Local l = body.getRegisterLocal(returnInstruction.getRegisterA()); ReturnStmt returnStmt = Jimple.v().newReturnStmt(l); setUnit(returnStmt); addTags(returnStmt); body.add(returnStmt); if (IDalvikTyper.ENABLE_DVKTYPER) { // DalvikTyper.v().addConstraint(returnStmt.getOpBox(), new // ImmediateBox(Jimple.body.getBody().getMethod().getReturnType())); DalvikTyper.v().setType(returnStmt.getOpBox(), body.getBody().getMethod().getReturnType(), true); } } }
@Nonnull private BuilderInstruction11x newBuilderInstruction11x(@Nonnull Instruction11x instruction) { return new BuilderInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
@Nonnull private BuilderInstruction11x newBuilderInstruction11x(@Nonnull Instruction11x instruction) { return new BuilderInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
@Nonnull private BuilderInstruction11x newBuilderInstruction11x(@Nonnull Instruction11x instruction) { return new BuilderInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
@Nonnull private BuilderInstruction11x newBuilderInstruction11x(@Nonnull Instruction11x instruction) { return new BuilderInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
public static ImmutableInstruction11x of(Instruction11x instruction) { if (instruction instanceof ImmutableInstruction11x) { return (ImmutableInstruction11x)instruction; } return new ImmutableInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
public static ImmutableInstruction11x of(Instruction11x instruction) { if (instruction instanceof ImmutableInstruction11x) { return (ImmutableInstruction11x)instruction; } return new ImmutableInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
public static ImmutableInstruction11x of(Instruction11x instruction) { if (instruction instanceof ImmutableInstruction11x) { return (ImmutableInstruction11x)instruction; } return new ImmutableInstruction11x( instruction.getOpcode(), instruction.getRegisterA()); }
public void write(@Nonnull Instruction11x instruction) { try { writer.write(instruction.getOpcode().value); writer.write(instruction.getRegisterA()); } catch (IOException ex) { throw new RuntimeException(ex); } }
public void write(@Nonnull Instruction11x instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(instruction.getRegisterA()); } catch (IOException ex) { throw new RuntimeException(ex); } }
public void write(@Nonnull Instruction11x instruction) { try { writer.write(getOpcodeValue(instruction.getOpcode())); writer.write(instruction.getRegisterA()); } catch (IOException ex) { throw new RuntimeException(ex); } }
UnaryOperation.OpID.MOVE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_RESULT_WIDE: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE_WIDE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_RESULT_OBJECT: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_EXCEPTION: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE_EXCEPTION, ((Instruction11x)inst).getRegisterA(), getExceptionReg(), inst.getOpcode(), this)); break; ((Instruction11x)inst).getRegisterA(), true, inst.getOpcode(), this)); break; case RETURN_WIDE: ((Instruction11x)inst).getRegisterA(), ((Instruction11x)inst).getRegisterA()+1, inst.getOpcode(), this)); break; case RETURN_OBJECT: instructions.add(new Return.ReturnSingle(instLoc, ((Instruction11x)inst).getRegisterA(), false, inst.getOpcode(), this)); break; case CONST_4: {
UnaryOperation.OpID.MOVE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_RESULT_WIDE: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE_WIDE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_RESULT_OBJECT: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE, ((Instruction11x)inst).getRegisterA(), getReturnReg(), inst.getOpcode(), this)); break; case MOVE_EXCEPTION: instructions.add(new UnaryOperation(instLoc, UnaryOperation.OpID.MOVE_EXCEPTION, ((Instruction11x)inst).getRegisterA(), getExceptionReg(), inst.getOpcode(), this)); break; ((Instruction11x)inst).getRegisterA(), true, inst.getOpcode(), this)); break; case RETURN_WIDE: ((Instruction11x)inst).getRegisterA(), ((Instruction11x)inst).getRegisterA()+1, inst.getOpcode(), this)); break; case RETURN_OBJECT: instructions.add(new Return.ReturnSingle(instLoc, ((Instruction11x)inst).getRegisterA(), false, inst.getOpcode(), this)); break; case CONST_4: {