Example usage for org.objectweb.asm Opcodes SIPUSH

List of usage examples for org.objectweb.asm Opcodes SIPUSH

Introduction

In this page you can find the example usage for org.objectweb.asm Opcodes SIPUSH.

Prototype

int SIPUSH

To view the source code for org.objectweb.asm Opcodes SIPUSH.

Click Source Link

Usage

From source file:serianalyzer.JVMImpl.java

License:Open Source License

/**
 * @param opcode/*w w w. j  a  v a  2  s . com*/
 * @param operand
 * @param s
 */
static void handleJVMIntInsn(int opcode, int operand, JVMStackState s) {
    switch (opcode) {
    case Opcodes.BIPUSH:
        s.push(new BasicConstant(Type.BYTE_TYPE, operand));
        break;
    case Opcodes.SIPUSH:
        s.push(new BasicConstant(Type.SHORT_TYPE, operand));
        break;
    case Opcodes.NEWARRAY:
        s.pop();
        s.push(new BasicVariable(makeBasicArrayType(operand), "array", false)); //$NON-NLS-1$
    }
}