/** * Constructs an instance. * * @param opcode {@code non-null;} the opcode * @param position {@code non-null;} source position * @param sources {@code non-null;} specs for all the sources * @param catches {@code non-null;} list of exceptions caught * @param callSiteMethod {@code non-null;} the method called by * invoke-virtual that this instance will replace. */ public InvokePolymorphicInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, TypeList catches, CstMethodRef callSiteMethod) { super(opcode, position, null, sources); if (opcode.getBranchingness() != Rop.BRANCH_THROW) { throw new IllegalArgumentException("opcode with invalid branchingness: " + opcode.getBranchingness()); } if (catches == null) { throw new NullPointerException("catches == null"); } this.catches = catches; if (callSiteMethod == null) { throw new NullPointerException("callSiteMethod == null"); } else if (!callSiteMethod.isSignaturePolymorphic()) { throw new IllegalArgumentException("callSiteMethod is not signature polymorphic"); } this.callSiteMethod = callSiteMethod; this.invokeMethod = makeInvokeMethod(callSiteMethod); this.callSiteProto = makeCallSiteProto(callSiteMethod); }
/** * Constructs an instance. * * @param opcode {@code non-null;} the opcode * @param position {@code non-null;} source position * @param sources {@code non-null;} specs for all the sources * @param catches {@code non-null;} list of exceptions caught * @param callSiteMethod {@code non-null;} the method called by * invoke-virtual that this instance will replace. */ public InvokePolymorphicInsn(Rop opcode, SourcePosition position, RegisterSpecList sources, TypeList catches, CstMethodRef callSiteMethod) { super(opcode, position, null, sources); if (opcode.getBranchingness() != Rop.BRANCH_THROW) { throw new IllegalArgumentException("opcode with invalid branchingness: " + opcode.getBranchingness()); } if (catches == null) { throw new NullPointerException("catches == null"); } this.catches = catches; if (callSiteMethod == null) { throw new NullPointerException("callSiteMethod == null"); } else if (!callSiteMethod.isSignaturePolymorphic()) { throw new IllegalArgumentException("callSiteMethod is not signature polymorphic"); } this.callSiteMethod = callSiteMethod; this.polymorphicMethod = makePolymorphicMethod(callSiteMethod); this.callSiteProto = makeCallSiteProto(callSiteMethod); }
if (ref.isSignaturePolymorphic()) { return RegOps.INVOKE_POLYMORPHIC;
if (ref.isSignaturePolymorphic()) { return RegOps.INVOKE_POLYMORPHIC;
if (methodRef.isSignaturePolymorphic()) { checkInvokeSignaturePolymorphic(opcode);
if (methodRef.isSignaturePolymorphic()) { if (!dexOptions.canUseInvokePolymorphic()) { throw new SimException(