Search in sources :

Example 36 with Rop

use of com.android.dx.rop.code.Rop in project dexmaker by linkedin.

the class Code method compareZ.

/**
 * Check if an int or reference equals to zero. If the comparison is true,
 * execution jumps to {@code trueLabel}. If it is false, execution continues to
 * the next instruction.
 */
public <T> void compareZ(Comparison comparison, Label trueLabel, Local<?> a) {
    adopt(trueLabel);
    Rop rop = comparison.rop(StdTypeList.make(a.type.ropType));
    addInstruction(new PlainInsn(rop, sourcePosition, null, RegisterSpecList.make(a.spec())), trueLabel);
}
Also used : PlainInsn(com.android.dx.rop.code.PlainInsn) Rop(com.android.dx.rop.code.Rop)

Aggregations

Rop (com.android.dx.rop.code.Rop)36 PlainInsn (com.android.dx.rop.code.PlainInsn)23 PlainCstInsn (com.android.dx.rop.code.PlainCstInsn)19 Insn (com.android.dx.rop.code.Insn)16 ThrowingCstInsn (com.android.dx.rop.code.ThrowingCstInsn)15 RegisterSpec (com.android.dx.rop.code.RegisterSpec)14 ThrowingInsn (com.android.dx.rop.code.ThrowingInsn)11 RegisterSpecList (com.android.dx.rop.code.RegisterSpecList)9 FillArrayDataInsn (com.android.dx.rop.code.FillArrayDataInsn)8 Constant (com.android.dx.rop.cst.Constant)6 CstInteger (com.android.dx.rop.cst.CstInteger)6 SourcePosition (com.android.dx.rop.code.SourcePosition)4 SwitchInsn (com.android.dx.rop.code.SwitchInsn)4 CstFieldRef (com.android.dx.rop.cst.CstFieldRef)4 CstType (com.android.dx.rop.cst.CstType)4 TypedConstant (com.android.dx.rop.cst.TypedConstant)4 TypeBearer (com.android.dx.rop.type.TypeBearer)4 SsaInsn (com.android.dx.ssa.SsaInsn)4 BasicBlock (com.android.dx.rop.code.BasicBlock)2 CstInsn (com.android.dx.rop.code.CstInsn)2