Examples of CstBaseMethodRef


Examples of com.android.dx.rop.cst.CstBaseMethodRef

    {
      CstInsn cstInsn= (CstInsn) instruction;
      if (isInvokeInstruction(cstInsn))
      {
        // Adds the class that a method references
            CstBaseMethodRef methodRef= (CstBaseMethodRef) cstInsn.getConstant();
        methodDeps.addDependency(methodRef.getDefiningClass().toHuman(), methodRef.getNat().getName().toHuman() + ":" + methodRef.getPrototype().toString());
      }
      else
      {
        Constant constant= cstInsn.getConstant();
        if (constant instanceof CstMemberRef)
View Full Code Here

Examples of com.android.dx.rop.cst.CstBaseMethodRef

            case RegOps.PUT_STATIC: return opPutStatic(sources.getType(0));
            case RegOps.INVOKE_STATIC: {
                return opInvokeStatic(((CstBaseMethodRef) cst).getPrototype());
            }
            case RegOps.INVOKE_VIRTUAL: {
                CstBaseMethodRef cstMeth = (CstBaseMethodRef) cst;
                Prototype meth = cstMeth.getPrototype();
                CstType definer = cstMeth.getDefiningClass();
                meth = meth.withFirstParameter(definer.getClassType());
                return opInvokeVirtual(meth);
            }
            case RegOps.INVOKE_SUPER: {
                CstBaseMethodRef cstMeth = (CstBaseMethodRef) cst;
                Prototype meth = cstMeth.getPrototype();
                CstType definer = cstMeth.getDefiningClass();
                meth = meth.withFirstParameter(definer.getClassType());
                return opInvokeSuper(meth);
            }
            case RegOps.INVOKE_DIRECT: {
                CstBaseMethodRef cstMeth = (CstBaseMethodRef) cst;
                Prototype meth = cstMeth.getPrototype();
                CstType definer = cstMeth.getDefiningClass();
                meth = meth.withFirstParameter(definer.getClassType());
                return opInvokeDirect(meth);
            }
            case RegOps.INVOKE_INTERFACE: {
                CstBaseMethodRef cstMeth = (CstBaseMethodRef) cst;
                Prototype meth = cstMeth.getPrototype();
                CstType definer = cstMeth.getDefiningClass();
                meth = meth.withFirstParameter(definer.getClassType());
                return opInvokeInterface(meth);
            }
        }
View Full Code Here

Examples of com.android.dx.rop.cst.CstBaseMethodRef

                 * Determine whether the opcode should be
                 * INVOKE_DIRECT or INVOKE_SUPER. See vmspec-2 section 6
                 * on "invokespecial" as well as section 4.8.2 (7th
                 * bullet point) for the gory details.
                 */
          CstBaseMethodRef ref = (CstBaseMethodRef) cst;
                if (ref.isInstanceInit() ||
                    (ref.getDefiningClass() == method.getDefiningClass()) ||
                    !method.getAccSuper()) {
                    return RegOps.INVOKE_DIRECT;
                }
                return RegOps.INVOKE_SUPER;
            }
View Full Code Here

Examples of com.android.dx.rop.cst.CstBaseMethodRef

   * Returns an element representing the given invoke instruction.
   */
  private Element processInvokeInstruction(CstInsn cstInsn, Map<String, ReferenceKind> referencedTypes)
  {
    Element result= new Element(sanitizeInstructionName(cstInsn.getOpcode().getName()), NS_DEX);
    CstBaseMethodRef methodRef= (CstBaseMethodRef) cstInsn.getConstant();
    String classType= methodRef.getDefiningClass().toHuman();
    String methodName= methodRef.getNat().getName().toHuman();

    // Optimization: If the red/green class optimization is enabled, and the
    // class we are about to call is a red class, we remove the call and
    // replace it with an assert.
    if (isRedType(classType))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.