Java Code Examples for jdk.internal.org.objectweb.asm.Opcodes#BIPUSH

The following examples show how to use jdk.internal.org.objectweb.asm.Opcodes#BIPUSH . 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: CheckMethodAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 2
Source File: CheckMethodAdapter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 3
Source File: CheckMethodAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 4
Source File: CheckMethodAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 5
Source File: CheckMethodAdapter.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkVisitCodeCalled();
    checkVisitMaxsNotCalled();
    checkOpcodeMethod(opcode, Method.VISIT_INT_INSN);
    switch (opcode) {
        case Opcodes.BIPUSH:
            checkSignedByte(operand, "Invalid operand");
            break;
        case Opcodes.SIPUSH:
            checkSignedShort(operand, "Invalid operand");
            break;
        case Opcodes.NEWARRAY:
            if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
                throw new IllegalArgumentException(
                        "Invalid operand (must be an array type code T_...): " + operand);
            }
            break;
        default:
            throw new AssertionError();
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 6
Source File: CheckMethodAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 7
Source File: CheckMethodAdapter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 8
Source File: CheckMethodAdapter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 9
Source File: CheckMethodAdapter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    checkStartCode();
    checkEndCode();
    checkOpcode(opcode, 1);
    switch (opcode) {
    case Opcodes.BIPUSH:
        checkSignedByte(operand, "Invalid operand");
        break;
    case Opcodes.SIPUSH:
        checkSignedShort(operand, "Invalid operand");
        break;
    // case Constants.NEWARRAY:
    default:
        if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
            throw new IllegalArgumentException(
                    "Invalid operand (must be an array type code T_...): "
                            + operand);
        }
    }
    super.visitIntInsn(opcode, operand);
    ++insnCount;
}
 
Example 10
Source File: InstructionAdapter.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 11
Source File: InstructionAdapter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 12
Source File: InstructionAdapter.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 13
Source File: InstructionAdapter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
        case Opcodes.BIPUSH:
            iconst(operand);
            break;
        case Opcodes.SIPUSH:
            iconst(operand);
            break;
        case Opcodes.NEWARRAY:
            switch (operand) {
                case Opcodes.T_BOOLEAN:
                    newarray(Type.BOOLEAN_TYPE);
                    break;
                case Opcodes.T_CHAR:
                    newarray(Type.CHAR_TYPE);
                    break;
                case Opcodes.T_BYTE:
                    newarray(Type.BYTE_TYPE);
                    break;
                case Opcodes.T_SHORT:
                    newarray(Type.SHORT_TYPE);
                    break;
                case Opcodes.T_INT:
                    newarray(Type.INT_TYPE);
                    break;
                case Opcodes.T_FLOAT:
                    newarray(Type.FLOAT_TYPE);
                    break;
                case Opcodes.T_LONG:
                    newarray(Type.LONG_TYPE);
                    break;
                case Opcodes.T_DOUBLE:
                    newarray(Type.DOUBLE_TYPE);
                    break;
                default:
                    throw new IllegalArgumentException();
            }
            break;
        default:
            throw new IllegalArgumentException();
    }
}
 
Example 14
Source File: InstructionAdapter.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 15
Source File: InstructionAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 16
Source File: InstructionAdapter.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 17
Source File: InstructionAdapter.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 18
Source File: InstructionAdapter.java    From nashorn with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
        case Opcodes.BIPUSH:
            iconst(operand);
            break;
        case Opcodes.SIPUSH:
            iconst(operand);
            break;
        case Opcodes.NEWARRAY:
            switch (operand) {
                case Opcodes.T_BOOLEAN:
                    newarray(Type.BOOLEAN_TYPE);
                    break;
                case Opcodes.T_CHAR:
                    newarray(Type.CHAR_TYPE);
                    break;
                case Opcodes.T_BYTE:
                    newarray(Type.BYTE_TYPE);
                    break;
                case Opcodes.T_SHORT:
                    newarray(Type.SHORT_TYPE);
                    break;
                case Opcodes.T_INT:
                    newarray(Type.INT_TYPE);
                    break;
                case Opcodes.T_FLOAT:
                    newarray(Type.FLOAT_TYPE);
                    break;
                case Opcodes.T_LONG:
                    newarray(Type.LONG_TYPE);
                    break;
                case Opcodes.T_DOUBLE:
                    newarray(Type.DOUBLE_TYPE);
                    break;
                default:
                    throw new IllegalArgumentException();
            }
            break;
        default:
            throw new IllegalArgumentException();
    }
}
 
Example 19
Source File: InstructionAdapter.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}
 
Example 20
Source File: InstructionAdapter.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void visitIntInsn(final int opcode, final int operand) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        iconst(operand);
        break;
    case Opcodes.SIPUSH:
        iconst(operand);
        break;
    case Opcodes.NEWARRAY:
        switch (operand) {
        case Opcodes.T_BOOLEAN:
            newarray(Type.BOOLEAN_TYPE);
            break;
        case Opcodes.T_CHAR:
            newarray(Type.CHAR_TYPE);
            break;
        case Opcodes.T_BYTE:
            newarray(Type.BYTE_TYPE);
            break;
        case Opcodes.T_SHORT:
            newarray(Type.SHORT_TYPE);
            break;
        case Opcodes.T_INT:
            newarray(Type.INT_TYPE);
            break;
        case Opcodes.T_FLOAT:
            newarray(Type.FLOAT_TYPE);
            break;
        case Opcodes.T_LONG:
            newarray(Type.LONG_TYPE);
            break;
        case Opcodes.T_DOUBLE:
            newarray(Type.DOUBLE_TYPE);
            break;
        default:
            throw new IllegalArgumentException();
        }
        break;
    default:
        throw new IllegalArgumentException();
    }
}