Examples of LookupSwitchInsnNode


Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

        for (int i = 0; i < cwList.size(); i++) {
            labels[i] = new LabelNode();
            keys[i] = callWeavers.indexOf(cwList.get(i)) + 1;
        }
       
        new LookupSwitchInsnNode(resumeLabel, keys, labels).accept(mv);
        int i = 0;
        for (CallWeaver cw: cwList) {
            if (i > 0) {
                // This is the jump (to normal exception handling) for the previous
                // switch case.
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

  @SuppressWarnings("unchecked")
  private static boolean sameLookupSwitchInsn(AbstractInsnNode o, AbstractInsnNode n) {
    if (!(n instanceof LookupSwitchInsnNode)) {
      return false;
    }
    LookupSwitchInsnNode lsio = (LookupSwitchInsnNode) o;
    LookupSwitchInsnNode lsin = (LookupSwitchInsnNode) n;
    if (sameLabels(lsio.dflt, lsin.dflt)) {
      return false;
    }
    List<Integer> keyso = lsio.keys;
    List<Integer> keysn = lsin.keys;
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

                    destidx = instructions.indexOf(l);
                    markSubroutineWalkDFS(sub, destidx, anyvisited);
                }
            }
            if (node.getType() == AbstractInsnNode.LOOKUPSWITCH_INSN) {
                LookupSwitchInsnNode lsnode = (LookupSwitchInsnNode) node;
                int destidx = instructions.indexOf(lsnode.dflt);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
                for (int i = lsnode.labels.size() - 1; i >= 0; --i) {
                    LabelNode l = lsnode.labels.get(i);
                    destidx = instructions.indexOf(l);
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

            AbstractInsnNode left = null, right = null;

            switch (ptr.getType()) {
                case AbstractInsnNode.LOOKUPSWITCH_INSN:
                    {
                        LookupSwitchInsnNode lsi = (LookupSwitchInsnNode) ptr;
                        if (lsi.labels.size() <= MAX_SWITCH) break;
                        LookupSwitchInsnNode lsl = new LookupSwitchInsnNode(lsi.dflt, new int[0], new LabelNode[0]);
                        LookupSwitchInsnNode lsr = new LookupSwitchInsnNode(lsi.dflt, new int[0], new LabelNode[0]);

                        int lsisz = lsi.labels.size();
                        lsl.keys.addAll(lsi.keys.subList(0, lsisz / 2));
                        lsr.keys.addAll(lsi.keys.subList(lsisz / 2, lsisz));
                        lsl.labels.addAll(lsi.labels.subList(0, lsisz / 2));
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

                    for (int i = 0; i  < tsi.labels.size(); i++)
                        succTemp.add(new ControlEdge(insnNo, insnMap.get(tsi.labels.get(i)), null));
                    break;

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

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

                    TableSwitchInsnNode si = (TableSwitchInsnNode) ai;
                    return 16 + si.labels.size() * 4;
                }
            case AbstractInsnNode.LOOKUPSWITCH_INSN:
                {
                    LookupSwitchInsnNode si = (LookupSwitchInsnNode) ai;
                    return 12 + si.labels.size() * 8;
                }
            case AbstractInsnNode.MULTIANEWARRAY_INSN:
                return 4;
            default:
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

                    v.visitTableSwitchInsn(si.min, si.max, mapLabel(si.dflt, begin, insnLabels, exitTrampolineLabels), mapped);
                    break;
                }
            case AbstractInsnNode.LOOKUPSWITCH_INSN:
                {
                    LookupSwitchInsnNode si = (LookupSwitchInsnNode)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);
                    int[] keys = new int[si.keys.size()];
                    for (int i = 0; i < keys.length; i++)
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

                    destidx = instructions.indexOf(l);
                    markSubroutineWalkDFS(sub, destidx, anyvisited);
                }
            }
            if (node.getType() == AbstractInsnNode.LOOKUPSWITCH_INSN) {
                LookupSwitchInsnNode lsnode = (LookupSwitchInsnNode) node;
                int destidx = instructions.indexOf(lsnode.dflt);
                markSubroutineWalkDFS(sub, destidx, anyvisited);
                for (int i = lsnode.labels.size() - 1; i >= 0; --i) {
                    LabelNode l = lsnode.labels.get(i);
                    destidx = instructions.indexOf(l);
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

        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;
      case 12:
        LookupSwitchInsnNode lsinsn = (LookupSwitchInsnNode) insn;
        Label[] lslables = new Label[lsinsn.labels.size()];
        for (int i = 0; i < lslables.length; i++)
          lslables[i] = lsinsn.labels.get(i).getLabel();
        int[] lskeys = new int[lsinsn.keys.size()];
        for (int i = 0; i < lskeys.length; i++)
View Full Code Here

Examples of org.objectweb.asm.tree.LookupSwitchInsnNode

          TableSwitchInsnNode tsinsn = (TableSwitchInsnNode) insn;
          for (LabelNode label : tsinsn.labels)
            controlFlowLabels.add(label);
          break;
        case 12:
          LookupSwitchInsnNode lsinsn = (LookupSwitchInsnNode) insn;
          for (LabelNode label : lsinsn.labels)
            controlFlowLabels.add(label);
          break;
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.