Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.TableSwitchInsnNode


                    if (node.getOpcode() != Opcodes.GOTO)
                        succTemp.add(new ControlEdge(insnNo, insnNo+1, null));
                    break;

                case AbstractInsnNode.TABLESWITCH_INSN:
                    TableSwitchInsnNode tsi = (TableSwitchInsnNode) node;
                    succTemp.add(new ControlEdge(insnNo, insnMap.get(tsi.dflt), null));
                    for (int i = 0; i  < tsi.labels.size(); i++)
                        succTemp.add(new ControlEdge(insnNo, insnMap.get(tsi.labels.get(i)), null));
                    break;
View Full Code Here


                    IincInsnNode ii = (IincInsnNode) ai;
                    return (ii.var >= 256 || ii.incr > 127 || ii.incr < -128) ? 6 : 3;
                }
            case AbstractInsnNode.TABLESWITCH_INSN:
                {
                    TableSwitchInsnNode si = (TableSwitchInsnNode) ai;
                    return 16 + si.labels.size() * 4;
                }
            case AbstractInsnNode.LOOKUPSWITCH_INSN:
                {
                    LookupSwitchInsnNode si = (LookupSwitchInsnNode) ai;
View Full Code Here

                    v.visitJumpInsn(opc, mapLabel(ji.label, begin, insnLabels, exitTrampolineLabels));
                    break;
                }
            case AbstractInsnNode.TABLESWITCH_INSN:
                {
                    TableSwitchInsnNode si = (TableSwitchInsnNode)ai;
                    Label[] mapped = new Label[si.labels.size()];
                    for (int i = 0; i < mapped.length; i++)
                        mapped[i] = mapLabel((LabelNode)si.labels.get(i), begin, insnLabels, exitTrampolineLabels);
                    v.visitTableSwitchInsn(si.min, si.max, mapLabel(si.dflt, begin, insnLabels, exitTrampolineLabels), mapped);
                    break;
View Full Code Here

                JumpInsnNode jnode = (JumpInsnNode) node;
                int destidx = instructions.indexOf(jnode.label);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
            }
            if (node.getType() == AbstractInsnNode.TABLESWITCH_INSN) {
                TableSwitchInsnNode tsnode = (TableSwitchInsnNode) node;
                int destidx = instructions.indexOf(tsnode.dflt);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
                for (int i = tsnode.labels.size() - 1; i >= 0; --i) {
                    LabelNode l = tsnode.labels.get(i);
                    destidx = instructions.indexOf(l);
View Full Code Here

      case 10:
        IincInsnNode iiinsn = (IincInsnNode) insn;
        visitIincInsn(iiinsn.var, iiinsn.incr);
        break;
      case 11:
        TableSwitchInsnNode tsinsn = (TableSwitchInsnNode) insn;
        Label[] tslables = new Label[tsinsn.labels.size()];
        for (int i = 0; i < tslables.length; i++)
          tslables[i] = tsinsn.labels.get(i).getLabel();
        visitTableSwitchInsn(tsinsn.min, tsinsn.max, tsinsn.dflt.getLabel(), tslables);
        break;
View Full Code Here

        case 7:
          JumpInsnNode jinsn = (JumpInsnNode) insn;
          controlFlowLabels.add(jinsn.label);
          break;
        case 11:
          TableSwitchInsnNode tsinsn = (TableSwitchInsnNode) insn;
          for (LabelNode label : tsinsn.labels)
            controlFlowLabels.add(label);
          break;
        case 12:
          LookupSwitchInsnNode lsinsn = (LookupSwitchInsnNode) insn;
View Full Code Here

                            jump = insns.indexOf(label);
                            merge(jump, current, subroutine);
                            newControlFlowEdge(insn, jump);
                        }
                    } else if (insnNode instanceof TableSwitchInsnNode) {
                        TableSwitchInsnNode tsi = (TableSwitchInsnNode) insnNode;
                        int jump = insns.indexOf(tsi.dflt);
                        merge(jump, current, subroutine);
                        newControlFlowEdge(insn, jump);
                        for (int j = 0; j < tsi.labels.size(); ++j) {
                            LabelNode label = (LabelNode) tsi.labels.get(j);
View Full Code Here

                } else {
                    JumpInsnNode jnode = (JumpInsnNode) node;
                    findSubroutine(insns.indexOf(jnode.label), sub, calls);
                }
            } else if (node instanceof TableSwitchInsnNode) {
                TableSwitchInsnNode tsnode = (TableSwitchInsnNode) node;
                findSubroutine(insns.indexOf(tsnode.dflt), sub, calls);
                for (int i = tsnode.labels.size() - 1; i >= 0; --i) {
                    LabelNode l = (LabelNode) tsnode.labels.get(i);
                    findSubroutine(insns.indexOf(l), sub, calls);
                }
View Full Code Here

    testInstructionBetweenFrames(new IincInsnNode(3, 42));
  }

  @Test
  public void testTableSwitchInsn() {
    testInstructionBetweenFrames(new TableSwitchInsnNode(0, 0,
        new LabelNode(), new LabelNode[0]));
  }
View Full Code Here

                JumpInsnNode jnode = (JumpInsnNode) node;
                int destidx = instructions.indexOf(jnode.label);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
            }
            if (node.getType() == AbstractInsnNode.TABLESWITCH_INSN) {
                TableSwitchInsnNode tsnode = (TableSwitchInsnNode) node;
                int destidx = instructions.indexOf(tsnode.dflt);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
                for (int i = tsnode.labels.size() - 1; i >= 0; --i) {
                    LabelNode l = tsnode.labels.get(i);
                    destidx = instructions.indexOf(l);
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.TableSwitchInsnNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.