Package com.android.dx.rop.code

Examples of com.android.dx.rop.code.TranslationAdvice


    {
      return null;
    }

    ConcreteMethod concrete= new ConcreteMethod(method, classFile, false, false);
    TranslationAdvice advice= DexTranslationAdvice.THE_ONE;
    RopMethod rmeth= Ropper.convert(concrete, advice);
    CstMethodRef meth= new CstMethodRef(method.getDefiningClass(), method.getNat());
    int paramSize= meth.getParameterWordCount(isStatic);
    DalvCode code= RopTranslator.translate(rmeth, PositionList.NONE, null, paramSize);
    DalvCode.AssignIndicesCallback callback= new DalvCode.AssignIndicesCallback()
View Full Code Here


                    ConcreteMethod concrete =
                        new ConcreteMethod(one, cf,
                                (args.positionInfo != PositionList.NONE),
                                args.localInfo);

                    TranslationAdvice advice;

                    advice = DexTranslationAdvice.THE_ONE;

                    RopMethod rmeth = Ropper.convert(concrete, advice);
                    RopMethod nonOptRmeth = null;
View Full Code Here

            return;
        }

        ConcreteMethod meth =
            new ConcreteMethod((Method) member, classFile, true, true);
        TranslationAdvice advice = DexTranslationAdvice.THE_ONE;
        RopMethod rmeth = Ropper.convert(meth, advice);
        SsaMethod ssaMeth = null;
        boolean isStatic = AccessFlags.isStatic(meth.getAccessFlags());
        int paramWidth = computeParamWidth(meth, isStatic);
View Full Code Here

     */
    private void ropDump(ConcreteMethod meth) {
        BytecodeArray code = meth.getCode();
        ByteArray bytes = code.getBytes();

        TranslationAdvice advice = DexTranslationAdvice.THE_ONE;

        RopMethod rmeth =
            Ropper.convert(meth, advice);
        StringBuffer sb = new StringBuffer(2000);

View Full Code Here

    /**
     * Run the literal op upgrader
     */
    private void run() {
        final TranslationAdvice advice = Optimizer.getAdvice();

        ssaMeth.forEachInsn(new SsaInsn.Visitor() {
            public void visitMoveInsn(NormalSsaInsn insn) {
                // do nothing
            }

            public void visitPhiInsn(PhiInsn insn) {
                // do nothing
            }

            public void visitNonMoveInsn(NormalSsaInsn insn) {

                Insn originalRopInsn = insn.getOriginalRopInsn();
                Rop opcode = originalRopInsn.getOpcode();
                RegisterSpecList sources = insn.getSources();

                if (sources.size() != 2 ) {
                    // We're only dealing with two-source insns here.
                    return;
                }

                if (opcode.getBranchingness() == Rop.BRANCH_IF) {
                    /*
                     * An if instruction can become an if-*z instruction.
                     */
                    if (isConstIntZeroOrKnownNull(sources.get(0))) {
                        replacePlainInsn(insn, sources.withoutFirst(),
                                RegOps.flippedIfOpcode(opcode.getOpcode()));
                    } else if (isConstIntZeroOrKnownNull(sources.get(1))) {
                        replacePlainInsn(insn, sources.withoutLast(),
                                opcode.getOpcode());
                    }
                } else if (advice.hasConstantOperation(
                        opcode, sources.get(0), sources.get(1))) {
                    insn.upgradeToLiteral();
                } else  if (opcode.isCommutative()
                        && advice.hasConstantOperation(
                        opcode, sources.get(1), sources.get(0))) {
                    /*
                     * An instruction can be commuted to a literal operation
                     */

 
View Full Code Here

      return;
    }

    ConcreteMethod concrete= new ConcreteMethod(method, cf, (positionInfo != PositionList.NONE), localInfo);

    TranslationAdvice advice= DexTranslationAdvice.THE_ONE;

    RopMethod rmeth= Ropper.convert(concrete, advice);
    int paramSize= meth.getParameterWordCount(isStatic);

    String canonicalName= method.getDefiningClass().getClassType().getDescriptor() + "." + method.getName().getString();
View Full Code Here

TOP

Related Classes of com.android.dx.rop.code.TranslationAdvice

Copyright © 2018 www.massapicom. 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.