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

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

Introduction

In this page you can find the example usage for org.objectweb.asm.tree LookupSwitchInsnNode 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(LookupSwitchInsnNode insn, FrameState frame, BBInfo block) {
    assert insn.getOpcode() == Opcodes.LOOKUPSWITCH;
    ConstantFactory cf = module.constants();
    SwitchInst inst = new SwitchInst(frame.stack.pop(), blockByInsn(insn.dflt).block);
    for (int i = 0; i < insn.keys.size(); ++i)
        inst.put(cf.getConstant((Integer) insn.keys.get(i)), blockByInsn((LabelNode) insn.labels.get(i)).block);
    block.block.instructions().add(inst);
}