Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.TableSwitchInsnNode


                            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 = 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 = tsnode.labels.get(i);
                    findSubroutine(insns.indexOf(l), sub, calls);
                }
View Full Code Here

                        assert dupLabel != null;
                        lastInsn = new JumpInsnNode(lastInsn.getOpcode(), dupLabel);
                    }

                } else if (opcode == TABLESWITCH) {
                    TableSwitchInsnNode tsin = (TableSwitchInsnNode) lastInsn;
                    Label[] labels = new Label[tsin.labels.size()];
                    for (i = 0; i < labels.length; i++) {
                        dupLabel = labelCopyMap.get(tsin.labels.get(i));
                        assert dupLabel != null;
                        labels[i] = dupLabel;
                    }
                    dupLabel = labelCopyMap.get(tsin.dflt);
                    assert dupLabel != null;
                    lastInsn = new TableSwitchInsnNode(tsin.min, tsin.max, dupLabel, labels);
                } else if (opcode == LOOKUPSWITCH) {
                    LookupSwitchInsnNode lsin = (LookupSwitchInsnNode) lastInsn;
                    Label[] labels = new Label[lsin.labels.size()];
                    for (i = 0; i < labels.length; i++) {
                        dupLabel = labelCopyMap.get(lsin.labels.get(i));
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

                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 = (LabelNode) tsnode.labels.get(i);
                    destidx = instructions.indexOf(l);
View Full Code Here

          labelz.put(jin.label.getLabel().getOffset(), jin.label);
        } else {
          jin.label = cl;
        }
      } else if (ain instanceof TableSwitchInsnNode) {
        TableSwitchInsnNode tsin = (TableSwitchInsnNode) ain;
        LabelNode cl = labelz.get(tsin.dflt.getLabel().getOffset());
        if (cl == null) {
          labelz.put(tsin.dflt.getLabel().getOffset(), tsin.dflt);
        } else {
          tsin.dflt = cl;
View Full Code Here

            return new LineNumberNode(toint(args[1]), getLabelNode(toint(args[2])));// FIXME
          case "MULTIANEWARRAY":
            return new MultiANewArrayInsnNode(args[1], toint(args[2]));
          case "TABLESWITCH":
          case "SWITCH":
            return new TableSwitchInsnNode(toint(args[1]), toint(args[2]),
                getLabelNode(toint(args[3])), getLabelNode(toint(args[4]))); // FIXME arg4 is a
                                                                             // varargs
          case "IINC":
            return new IincInsnNode(toint(args[1]), toint(args[2]));
          case "FRAME":
View Full Code Here

          MultiANewArrayInsnNode manin = (MultiANewArrayInsnNode) ain;
          fullInsn += ' ' + manin.desc;
          fullInsn += " " + manin.dims;
          break;
        case AbstractInsnNode.TABLESWITCH_INSN:
          TableSwitchInsnNode tsin = (TableSwitchInsnNode) ain;
          fullInsn += " " + tsin.min;
          fullInsn += " " + tsin.max;
          fullInsn += ' ' + tsin.dflt.getLabel().getOffset();
          for (LabelNode ln : (List<LabelNode>) tsin.labels) {
            fullInsn += ' ' + ln.getLabel().getOffset();
View Full Code Here

        List<LabelNode> labelList = context.deserialize(jsonObject.get("labels"), List.class);
        LabelNode[] labels = new LabelNode[labelList.size()];
        for(int i=0; i < labels.length; i++){
          labels[i] = labelList.get(i);
        }
        return new TableSwitchInsnNode(min, max, dflt, labels);
    }
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.