Java Code Examples for org.objectweb.asm.Opcodes#IOR

The following examples show how to use org.objectweb.asm.Opcodes#IOR . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OBBN2Mutator.java    From pitest with Apache License 2.0 5 votes vote down vote up
@Override
public void visitInsn(int opcode) {
    switch (opcode) {
        case Opcodes.IAND:
            if (this.shouldMutate("integer and"))  {
                mv.visitInsn(Opcodes.POP);
            } else  {
                mv.visitInsn(opcode);
            }
            break;
        case Opcodes.IOR:
            if (this.shouldMutate("integer or"))  {
                mv.visitInsn(Opcodes.POP);
            } else  {
                mv.visitInsn(opcode);
            }
            break;
        case Opcodes.LAND:
            if (this.shouldMutate("long and"))  {
                mv.visitInsn(Opcodes.POP2);
            } else  {
                mv.visitInsn(opcode);
            }
            break;
        case Opcodes.LOR:
            if (this.shouldMutate("long or"))  {
                mv.visitInsn(Opcodes.POP2);
            } else  {
                mv.visitInsn(opcode);
            }
            break;
        default:
            mv.visitInsn(opcode);
            break;
    }
}
 
Example 2
Source File: InstructionAssembler.java    From es6draft with MIT License 5 votes vote down vote up
public final void or(Type type) {
    switch (type.getOpcode(Opcodes.IOR)) {
    case Opcodes.IOR:
        ior();
        return;
    case Opcodes.LOR:
        lor();
        return;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 3
Source File: ArithmeticExpression.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isBinaryOp(Instruction instr) {
    switch (instr.getOpcode()) {
        case Opcodes.ISHL:
        case Opcodes.ISHR:
        case Opcodes.LSHL:
        case Opcodes.LSHR:
        case Opcodes.IUSHR:
        case Opcodes.LUSHR:
        case Opcodes.DCMPG:
        case Opcodes.DCMPL:
        case Opcodes.FCMPG:
        case Opcodes.FCMPL:
        case Opcodes.LCMP:
        case Opcodes.IOR:
        case Opcodes.LOR:
        case Opcodes.IXOR:
        case Opcodes.LXOR:
        case Opcodes.IAND:
        case Opcodes.LAND:
        case Opcodes.FADD:
        case Opcodes.DADD:
        case Opcodes.IADD:
        case Opcodes.LADD:
        case Opcodes.FSUB:
        case Opcodes.DSUB:
        case Opcodes.ISUB:
        case Opcodes.LSUB:
        case Opcodes.FDIV:
        case Opcodes.DDIV:
        case Opcodes.LDIV:
        case Opcodes.IDIV:
        case Opcodes.IREM:
        case Opcodes.FREM:
        case Opcodes.DREM:
        case Opcodes.LREM:
        case Opcodes.FMUL:
        case Opcodes.DMUL:
        case Opcodes.IMUL:
        case Opcodes.LMUL:
            return true;
    }
    return false;
}
 
Example 4
Source File: ArithmeticExpression.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static boolean isArithmeticOp(Instruction instr) {
    
    switch (instr.getOpcode()) {
        case Opcodes.ISHL:
        case Opcodes.ISHR:
        case Opcodes.LSHL:
        case Opcodes.LSHR:
        case Opcodes.IUSHR:
        case Opcodes.LUSHR:
        
        case Opcodes.DCMPG:
        case Opcodes.DCMPL:
        case Opcodes.FCMPG:
        case Opcodes.FCMPL:
        case Opcodes.LCMP:
        case Opcodes.FNEG:
        case Opcodes.DNEG:
        case Opcodes.INEG:
        case Opcodes.D2F:
        case Opcodes.D2I:
        case Opcodes.D2L:
        case Opcodes.F2D:
        case Opcodes.F2I:
        case Opcodes.F2L:
        case Opcodes.L2D:
        case Opcodes.L2F:
        case Opcodes.L2I:
        case Opcodes.I2L:
        case Opcodes.I2B:
        case Opcodes.I2C:
        case Opcodes.I2D:
        case Opcodes.I2F:
        case Opcodes.I2S:
        case Opcodes.IOR:
        case Opcodes.LOR:
        case Opcodes.IXOR:
        case Opcodes.LXOR:
        case Opcodes.IAND:
        case Opcodes.LAND:
        case Opcodes.FADD:
        case Opcodes.DADD:
        case Opcodes.IADD:
        case Opcodes.LADD:
        case Opcodes.FSUB:
        case Opcodes.DSUB:
        case Opcodes.ISUB:
        case Opcodes.LSUB:
        case Opcodes.FDIV:
        case Opcodes.DDIV:
        case Opcodes.LDIV:
        case Opcodes.IDIV:
        case Opcodes.IREM:
        case Opcodes.FREM:
        case Opcodes.DREM:
        case Opcodes.LREM:
        case Opcodes.FMUL:
        case Opcodes.DMUL:
        case Opcodes.IMUL:
        case Opcodes.LMUL:
            return true;
    }
    return false;
}