Projects STRLCPY jadx Commits 4caa58f5
🤬
  • core: use correct argument wrap method

  • Loading...
  • Skylot committed 1 decade ago
    4caa58f5
    1 parent 43913d47
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    jadx-core/src/main/java/jadx/core/dex/instructions/args/InsnArg.java
    skipped 34 lines
    35 35   return lit(insn.getLiteral(), type);
    36 36   }
    37 37   
    38  - public static InsnWrapArg wrap(InsnNode insn) {
     38 + private static InsnWrapArg wrap(InsnNode insn) {
    39 39   return new InsnWrapArg(insn);
    40 40   }
    41 41   
    skipped 39 lines
    81 81   return null;
    82 82   }
    83 83   
    84  - private static InsnArg wrapArg(InsnNode insn) {
     84 + public static InsnArg wrapArg(InsnNode insn) {
    85 85   InsnArg arg;
    86 86   switch (insn.getType()) {
    87 87   case MOVE:
    skipped 24 lines
  • ■ ■ ■ ■ ■ ■
    jadx-core/src/main/java/jadx/core/dex/instructions/mods/TernaryInsn.java
    1  -package jadx.core.dex.instructions.mods;
    2  - 
    3  -import jadx.core.dex.instructions.IfNode;
    4  -import jadx.core.dex.instructions.IfOp;
    5  -import jadx.core.dex.instructions.InsnType;
    6  -import jadx.core.dex.instructions.args.InsnArg;
    7  -import jadx.core.dex.nodes.InsnNode;
    8  -import jadx.core.utils.InsnUtils;
    9  -import jadx.core.utils.Utils;
    10  - 
    11  -public class TernaryInsn extends IfNode {
    12  - 
    13  - public TernaryInsn(IfOp op, InsnNode then, InsnNode els) {
    14  - super(then.getOffset(),
    15  - InsnArg.wrap(then),
    16  - els == null ? null : InsnArg.wrap(els));
    17  - }
    18  - 
    19  - @Override
    20  - public InsnType getType() {
    21  - return InsnType.TERNARY;
    22  - }
    23  - 
    24  - @Override
    25  - public String toString() {
    26  - return InsnUtils.formatOffset(offset) + ": TERNARY"
    27  - + getResult() + " = "
    28  - + Utils.listToString(getArguments());
    29  - }
    30  -}
    31  - 
  • ■ ■ ■ ■
    jadx-core/src/main/java/jadx/core/dex/visitors/SimplifyVisitor.java
    skipped 164 lines
    165 165   for (int i = 1; i < argsCount; i++) {
    166 166   concat.addArg(wrap.getArg(i));
    167 167   }
    168  - return new ArithNode(ArithOp.ADD, fArg, fArg, InsnArg.wrap(concat));
     168 + return new ArithNode(ArithOp.ADD, fArg, fArg, InsnArg.wrapArg(concat));
    169 169   }
    170 170   } catch (Throwable e) {
    171 171   LOG.debug("Can't convert field arith insn: {}, mth: {}", insn, mth, e);
    skipped 41 lines
Please wait...
Page is in error, reload to recover