Examples of PhiListAttr


Examples of jadx.core.dex.attributes.nodes.PhiListAttr

      }
    }
  }

  private static void addPhi(BlockNode block, int regNum) {
    PhiListAttr phiList = block.get(AType.PHI_LIST);
    if (phiList == null) {
      phiList = new PhiListAttr();
      block.addAttr(phiList);
    }
    PhiInsn phiInsn = new PhiInsn(regNum, block.getPredecessors().size());
    phiList.getList().add(phiInsn);
    phiInsn.setOffset(block.getStartOffset());
    block.getInstructions().add(0, phiInsn);
  }
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

        int regNum = result.getRegNum();
        vars[regNum] = mth.makeNewSVar(regNum, vers, result);
      }
    }
    for (BlockNode s : block.getSuccessors()) {
      PhiListAttr phiList = s.get(AType.PHI_LIST);
      if (phiList != null) {
        int j = s.getPredecessors().indexOf(block);
        if (j == -1) {
          throw new JadxRuntimeException("Can't find predecessor for " + block + " " + s);
        }
        for (PhiInsn phiInsn : phiList.getList()) {
          if (j >= phiInsn.getArgsCount()) {
            continue;
          }
          int regNum = phiInsn.getResult().getRegNum();
          SSAVar var = vars[regNum];
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

    System.arraycopy(inputVars, 0, vars, 0, vars.length);
  }

  private static void fixLastTryCatchAssign(MethodNode mth) {
    for (BlockNode block : mth.getBasicBlocks()) {
      PhiListAttr phiList = block.get(AType.PHI_LIST);
      if (phiList == null || !block.contains(AType.EXC_HANDLER)) {
        continue;
      }
      for (PhiInsn phi : phiList.getList()) {
        for (int i = 0; i < phi.getArgsCount(); i++) {
          RegisterArg arg = phi.getArg(i);
          InsnNode parentInsn = arg.getAssignInsn();
          if (parentInsn != null
              && parentInsn.getResult() != null
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

          insnToRemove.add((PhiInsn) assignInsn);
        }
      }
    }
    for (BlockNode block : mth.getBasicBlocks()) {
      PhiListAttr phiList = block.get(AType.PHI_LIST);
      if (phiList == null) {
        continue;
      }
      for (PhiInsn phi : phiList.getList()) {
        removePhiWithSameArgs(phi, insnToRemove);
      }
    }
    return removePhiList(mth, insnToRemove);
  }
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

  private static boolean removePhiList(MethodNode mth, List<PhiInsn> insnToRemove) {
    if (insnToRemove.isEmpty()) {
      return false;
    }
    for (BlockNode block : mth.getBasicBlocks()) {
      PhiListAttr phiList = block.get(AType.PHI_LIST);
      if (phiList == null) {
        continue;
      }
      List<PhiInsn> list = phiList.getList();
      for (PhiInsn phiInsn : insnToRemove) {
        if (list.remove(phiInsn)) {
          for (InsnArg arg : phiInsn.getArguments()) {
            ((RegisterArg) arg).getSVar().setUsedInPhi(null);
          }
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

    removePhiInstructions(mth);
  }

  private static void removePhiInstructions(MethodNode mth) {
    for (BlockNode block : mth.getBasicBlocks()) {
      PhiListAttr phiList = block.get(AType.PHI_LIST);
      if (phiList == null) {
        continue;
      }
      List<PhiInsn> list = phiList.getList();
      for (PhiInsn phiInsn : list) {
        removeInsn(mth, block, phiInsn);
      }
    }
  }
View Full Code Here

Examples of jadx.core.dex.attributes.nodes.PhiListAttr

    return null;
  }

  private static BlockNode searchBlockWithPhi(MethodNode mth, PhiInsn insn) {
    for (BlockNode block : mth.getBasicBlocks()) {
      PhiListAttr phiListAttr = block.get(AType.PHI_LIST);
      if (phiListAttr != null) {
        for (PhiInsn phiInsn : phiListAttr.getList()) {
          if (phiInsn == insn) {
            return block;
          }
        }
      }
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.