Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.TableSwitchInsnNode


                } 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


                            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

                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

                            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

        LabelNode restoreLabel = new LabelNode();
        LabelNode saveLabel = new LabelNode();
        LabelNode unwindLabel = new LabelNode();
        LabelNode[] labels = new LabelNode[] { resumeLabel, restoreLabel, saveLabel,
                unwindLabel };
        new TableSwitchInsnNode(0, 3, resumeLabel, labels).accept(mv);
        genSave(mv, saveLabel);
        genUnwind(mv, unwindLabel);
        genRestore(mv, restoreLabel);
        resumeLabel.accept(mv);
    }
View Full Code Here

        LabelNode[] labels = new LabelNode[callWeavers.size() + 1];
        labels[0] = startLabel;
        for (int i = 0; i < callWeavers.size(); i++) {
            labels[i + 1] = new LabelNode();
        }
        new TableSwitchInsnNode(0, callWeavers.size(), errLabel, labels).accept(mv);
       
        errLabel.accept(mv);
        mv.visitVarInsn(ALOAD, getFiberVar());
        mv.visitMethodInsn(INVOKEVIRTUAL, FIBER_CLASS, "wrongPC", "()V");
        // Generate pass through down code, one for each pausable method
View Full Code Here

  @SuppressWarnings("unchecked")
  private static boolean sameTableSwitchInsn(AbstractInsnNode o, AbstractInsnNode n) {
    if (!(n instanceof TableSwitchInsnNode)) {
      return false;
    }
    TableSwitchInsnNode tsio = (TableSwitchInsnNode) o;
    TableSwitchInsnNode tsin = (TableSwitchInsnNode) n;
    if (sameLabels(tsio.dflt, tsin.dflt)) {
      return false;
    }
    if (tsio.min != tsin.min) {
      return false;
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

                    }
                    break;

                case AbstractInsnNode.TABLESWITCH_INSN:
                    {
                        TableSwitchInsnNode lsi = (TableSwitchInsnNode) ptr;
                        if (lsi.labels.size() <= MAX_SWITCH) break;
                        cutoff = (lsi.min + lsi.max) / 2;
                        TableSwitchInsnNode lsl = new TableSwitchInsnNode(lsi.min, cutoff-1, lsi.dflt);
                        TableSwitchInsnNode lsr = new TableSwitchInsnNode(cutoff, lsi.max, lsi.dflt);

                        lsl.labels.addAll(lsi.labels.subList(0, cutoff - lsi.min));
                        lsr.labels.addAll(lsi.labels.subList(cutoff - lsi.min, lsi.max + 1 - lsi.min));
                        left = lsl;
                        right = lsr;
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.