Examples of ArithOp


Examples of jadx.core.dex.instructions.ArithOp

      code.add(')');
    }
  }

  private void makeArithOneArg(ArithNode insn, CodeWriter code) throws CodegenException {
    ArithOp op = insn.getOp();
    InsnArg arg = insn.getArg(1);
    // "++" or "--"
    if (arg.isLiteral() && (op == ArithOp.ADD || op == ArithOp.SUB)) {
      LiteralArg lit = (LiteralArg) arg;
      if (lit.isInteger() && lit.getLiteral() == 1) {
        assignVar(code, insn);
        String opSymbol = op.getSymbol();
        code.add(opSymbol).add(opSymbol);
        return;
      }
    }
    // +=, -= ...
    assignVar(code, insn);
    code.add(' ').add(op.getSymbol()).add("= ");
    addArg(code, arg, false);
  }
View Full Code Here

Examples of jadx.core.dex.instructions.ArithOp

   * ('(a + b) +c' => 'a + b + c')
   */
  private static void checkInsn(InsnNode insn) {
    if (insn.getType() == InsnType.ARITH) {
      ArithNode arith = (ArithNode) insn;
      ArithOp op = arith.getOp();
      if (op == ArithOp.ADD || op == ArithOp.SUB) {
        for (int i = 0; i < 2; i++) {
          InsnArg arg = arith.getArg(i);
          if (arg.isInsnWrap()) {
            InsnNode wrapInsn = ((InsnWrapArg) arg).getWrapInsn();
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.