Example usage for org.objectweb.asm.tree IincInsnNode getOpcode

List of usage examples for org.objectweb.asm.tree IincInsnNode getOpcode

Introduction

In this page you can find the example usage for org.objectweb.asm.tree IincInsnNode getOpcode.

Prototype

public int getOpcode() 

Source Link

Document

Returns the opcode of this instruction.

Usage

From source file:edu.mit.streamjit.util.bytecode.MethodResolver.java

License:Open Source License

private void interpret(IincInsnNode insn, FrameState frame, BBInfo block) {
    switch (insn.getOpcode()) {
    case Opcodes.IINC:
        Constant<Integer> c = module.constants().getConstant(insn.incr);
        BinaryInst bi = new BinaryInst(frame.locals[insn.var], BinaryInst.Operation.ADD, c);
        block.block.instructions().add(bi);
        frame.locals[insn.var] = bi;
        break;// ww  w .ja  v  a  2s .co m
    default:
        throw new UnsupportedOperationException("" + insn.getOpcode());
    }
}