当前位置: 首页>>代码示例>>Java>>正文


Java Instruction12x类代码示例

本文整理汇总了Java中org.jf.dexlib2.iface.instruction.formats.Instruction12x的典型用法代码示例。如果您正苦于以下问题:Java Instruction12x类的具体用法?Java Instruction12x怎么用?Java Instruction12x使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Instruction12x类属于org.jf.dexlib2.iface.instruction.formats包,在下文中一共展示了Instruction12x类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: jimplify

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public void jimplify (DexBody body) {
     if(!(instruction instanceof Instruction12x))
         throw new IllegalArgumentException("Expected Instruction12x but got: "+instruction.getClass());

     Instruction12x lengthOfArrayInstruction = (Instruction12x)instruction;
     int dest = lengthOfArrayInstruction.getRegisterA();

     Local arrayReference = body.getRegisterLocal(lengthOfArrayInstruction.getRegisterB());

     LengthExpr lengthExpr = Jimple.v().newLengthExpr(arrayReference);

     assign = Jimple.v().newAssignStmt(body.getRegisterLocal(dest), lengthExpr);

     setUnit(assign);
     addTags(assign);
     body.add(assign);
     
     if (IDalvikTyper.ENABLE_DVKTYPER) {
Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
       DalvikTyper.v().setType(assign.getLeftOpBox(), IntType.v(), false);      
     }
 }
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:23,代码来源:ArrayLengthInstruction.java

示例2: jimplify

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public void jimplify (DexBody body) {
      if(!(instruction instanceof Instruction12x))
          throw new IllegalArgumentException("Expected Instruction12x but got: "+instruction.getClass());

      Instruction12x cmpInstr = (Instruction12x)instruction;
      int dest = cmpInstr.getRegisterA();

      Local source = body.getRegisterLocal(cmpInstr.getRegisterB());
      Value expr = getExpression(source);

      assign = Jimple.v().newAssignStmt(body.getRegisterLocal(dest), expr);

      setUnit(assign);
      addTags(assign);
      body.add(assign);
      
if (IDalvikTyper.ENABLE_DVKTYPER) {
	Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
        int op = (int)instruction.getOpcode().value;
        //DalvikTyper.v().captureAssign((JAssignStmt)assign, op);
        JAssignStmt jass = (JAssignStmt)assign;
        DalvikTyper.v().setType((expr instanceof JCastExpr) ? ((JCastExpr) expr).getOpBox() : ((UnopExpr) expr).getOpBox(), opUnType[op - 0x7b], true);
        DalvikTyper.v().setType(jass.leftBox, resUnType[op - 0x7b], false);
      }
  }
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:26,代码来源:UnopInstruction.java

示例3: newBuilderInstruction12x

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
@Nonnull
private BuilderInstruction12x newBuilderInstruction12x(@Nonnull Instruction12x instruction) {
    return new BuilderInstruction12x(
            instruction.getOpcode(),
            instruction.getRegisterA(),
            instruction.getRegisterB());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:BuilderMutableMethodImplementation.java

示例4: of

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public static ImmutableInstruction12x of(Instruction12x instruction) {
    if (instruction instanceof ImmutableInstruction12x) {
        return (ImmutableInstruction12x)instruction;
    }
    return new ImmutableInstruction12x(
            instruction.getOpcode(),
            instruction.getRegisterA(),
            instruction.getRegisterB());
}
 
开发者ID:CvvT,项目名称:andbg,代码行数:10,代码来源:ImmutableInstruction12x.java

示例5: jimplify

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public void jimplify (DexBody body) {
     if(!(instruction instanceof Instruction12x))
         throw new IllegalArgumentException("Expected Instruction12x but got: "+instruction.getClass());

     Instruction12x binOp2AddrInstr = (Instruction12x)instruction;
     int dest = binOp2AddrInstr.getRegisterA();

     Local source1 = body.getRegisterLocal(binOp2AddrInstr.getRegisterA());
     Local source2 = body.getRegisterLocal(binOp2AddrInstr.getRegisterB());

     expr = getExpression(source1, source2);

     assign = Jimple.v().newAssignStmt(body.getRegisterLocal(dest), expr);
     assign.addTag(getTag());

     setUnit(assign);
     addTags(assign);
     body.add(assign);
     
     if (IDalvikTyper.ENABLE_DVKTYPER) {
Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
       BinopExpr bexpr = (BinopExpr)expr;
       short op = instruction.getOpcode().value;
       DalvikTyper.v().setType(bexpr.getOp1Box(), op1BinType[op-0xb0], true);
       DalvikTyper.v().setType(bexpr.getOp2Box(), op2BinType[op-0xb0], true);
       DalvikTyper.v().setType(assign.getLeftOpBox(), resBinType[op-0xb0], false);
     }
 }
 
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:29,代码来源:Binop2addrInstruction.java

示例6: of

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public static ImmutableInstruction12x of(Instruction12x instruction) {
    if (instruction instanceof ImmutableInstruction12x) {
        return (ImmutableInstruction12x) instruction;
    }
    return new ImmutableInstruction12x(
            instruction.getOpcode(),
            instruction.getRegisterA(),
            instruction.getRegisterB());
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:10,代码来源:ImmutableInstruction12x.java

示例7: write

import org.jf.dexlib2.iface.instruction.formats.Instruction12x; //导入依赖的package包/类
public void write(@Nonnull Instruction12x instruction) {
    try {
        writer.write(instruction.getOpcode().value);
        writer.write(packNibbles(instruction.getRegisterA(), instruction.getRegisterB()));
    } catch (IOException ex) {
        throw new RuntimeException(ex);
    }
}
 
开发者ID:niranjan94,项目名称:show-java,代码行数:9,代码来源:InstructionWriter.java


注:本文中的org.jf.dexlib2.iface.instruction.formats.Instruction12x类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。