Java Code Examples for proguard.classfile.instruction.InstructionConstants#OP_LDIV

The following examples show how to use proguard.classfile.instruction.InstructionConstants#OP_LDIV . 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: ExceptionInstructionChecker.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
{
    byte opcode = simpleInstruction.opcode;

    // Check for instructions that may throw exceptions.
    // Note that monitorexit can not sensibly throw exceptions, except the
    // broken and deprecated asynchronous ThreadDeath. Removing the
    // artificial infinite looping exception blocks that recent compilers
    // add does not strictly follow the JVM specs, but it does have the
    // additional benefit of avoiding a bug in the JVM in JDK 1.1.
    switch (opcode)
    {
        case InstructionConstants.OP_IDIV:
        case InstructionConstants.OP_LDIV:
        case InstructionConstants.OP_IREM:
        case InstructionConstants.OP_LREM:
        case InstructionConstants.OP_IALOAD:
        case InstructionConstants.OP_LALOAD:
        case InstructionConstants.OP_FALOAD:
        case InstructionConstants.OP_DALOAD:
        case InstructionConstants.OP_AALOAD:
        case InstructionConstants.OP_BALOAD:
        case InstructionConstants.OP_CALOAD:
        case InstructionConstants.OP_SALOAD:
        case InstructionConstants.OP_IASTORE:
        case InstructionConstants.OP_LASTORE:
        case InstructionConstants.OP_FASTORE:
        case InstructionConstants.OP_DASTORE:
        case InstructionConstants.OP_AASTORE:
        case InstructionConstants.OP_BASTORE:
        case InstructionConstants.OP_CASTORE:
        case InstructionConstants.OP_SASTORE:
        case InstructionConstants.OP_NEWARRAY:
        case InstructionConstants.OP_ARRAYLENGTH:
        case InstructionConstants.OP_ATHROW:
        case InstructionConstants.OP_MONITORENTER:
            // These instructions may throw exceptions.
            mayThrowExceptions = true;
    }

}
 
Example 2
Source File: EvaluationSimplifier.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
{
    switch (simpleInstruction.opcode)
    {
        case InstructionConstants.OP_IALOAD:
        case InstructionConstants.OP_BALOAD:
        case InstructionConstants.OP_CALOAD:
        case InstructionConstants.OP_SALOAD:
        case InstructionConstants.OP_IADD:
        case InstructionConstants.OP_ISUB:
        case InstructionConstants.OP_IMUL:
        case InstructionConstants.OP_IDIV:
        case InstructionConstants.OP_IREM:
        case InstructionConstants.OP_INEG:
        case InstructionConstants.OP_ISHL:
        case InstructionConstants.OP_ISHR:
        case InstructionConstants.OP_IUSHR:
        case InstructionConstants.OP_IAND:
        case InstructionConstants.OP_IOR:
        case InstructionConstants.OP_IXOR:
        case InstructionConstants.OP_L2I:
        case InstructionConstants.OP_F2I:
        case InstructionConstants.OP_D2I:
        case InstructionConstants.OP_I2B:
        case InstructionConstants.OP_I2C:
        case InstructionConstants.OP_I2S:
            replaceIntegerPushInstruction(clazz, offset, simpleInstruction);
            break;

        case InstructionConstants.OP_LALOAD:
        case InstructionConstants.OP_LADD:
        case InstructionConstants.OP_LSUB:
        case InstructionConstants.OP_LMUL:
        case InstructionConstants.OP_LDIV:
        case InstructionConstants.OP_LREM:
        case InstructionConstants.OP_LNEG:
        case InstructionConstants.OP_LSHL:
        case InstructionConstants.OP_LSHR:
        case InstructionConstants.OP_LUSHR:
        case InstructionConstants.OP_LAND:
        case InstructionConstants.OP_LOR:
        case InstructionConstants.OP_LXOR:
        case InstructionConstants.OP_I2L:
        case InstructionConstants.OP_F2L:
        case InstructionConstants.OP_D2L:
            replaceLongPushInstruction(clazz, offset, simpleInstruction);
            break;

        case InstructionConstants.OP_FALOAD:
        case InstructionConstants.OP_FADD:
        case InstructionConstants.OP_FSUB:
        case InstructionConstants.OP_FMUL:
        case InstructionConstants.OP_FDIV:
        case InstructionConstants.OP_FREM:
        case InstructionConstants.OP_FNEG:
        case InstructionConstants.OP_I2F:
        case InstructionConstants.OP_L2F:
        case InstructionConstants.OP_D2F:
            replaceFloatPushInstruction(clazz, offset, simpleInstruction);
            break;

        case InstructionConstants.OP_DALOAD:
        case InstructionConstants.OP_DADD:
        case InstructionConstants.OP_DSUB:
        case InstructionConstants.OP_DMUL:
        case InstructionConstants.OP_DDIV:
        case InstructionConstants.OP_DREM:
        case InstructionConstants.OP_DNEG:
        case InstructionConstants.OP_I2D:
        case InstructionConstants.OP_L2D:
        case InstructionConstants.OP_F2D:
            replaceDoublePushInstruction(clazz, offset, simpleInstruction);
            break;

        case InstructionConstants.OP_AALOAD:
            replaceReferencePushInstruction(clazz, offset, simpleInstruction);
            break;
    }
}