Examples of visitTableSwitchInsn()


Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

          labels[i] = labelForInvalidTypes;
          hasAnyBadTypeLabel = true;
        }
      }
      Label defaultLabel = new Label();
      mv.visitTableSwitchInsn(0, labels.length - 1, defaultLabel, labels);

      for (int i = 0, n = labels.length; i < n; i++) {
        Field field = fields.get(i);
        if (!labels[i].equals(labelForInvalidTypes)) {
          mv.visitLabel(labels[i]);
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

    public void testIllegalTableSwitchParameters1() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(1, 0, new Label(), new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

    public void testIllegalTableSwitchParameters2() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(0, 1, null, new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

    public void testIllegalTableSwitchParameters3() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(0, 1, new Label(), null);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

    public void testIllegalTableSwitchParameters4() {
        MethodVisitor mv = new CheckMethodAdapter(new EmptyVisitor());
        mv.visitCode();
        try {
            mv.visitTableSwitchInsn(0, 1, new Label(), new Label[0]);
            fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

        // tableswitch
        Label l1 = new Label();
        Label l2 = new Label();
        Label l3 = new Label();
        mv.visitVarInsn(ILOAD, 1);
        mv.visitTableSwitchInsn(0, 2, l3, new Label[] { l1, l2, l3 });
        mv.visitLabel(l1);
        mv.visitInsn(ICONST_1);
        mv.visitVarInsn(ISTORE, 7);
        mv.visitJumpInsn(GOTO, l3);
        mv.visitLabel(l2);
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

            mv.visitVarInsn(ILOAD, 2);
            Label[] labels = new Label[n];
            for (int i = 0; i < n; i++)
              labels[i] = new Label();
            Label defaultLabel = new Label();
            mv.visitTableSwitchInsn(0, labels.length - 1, defaultLabel, labels);

            StringBuilder buffer = new StringBuilder(128);
            for (int i = 0; i < n; i++) {
              mv.visitLabel(labels[i]);
              if (i == 0)
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

      maxStack--;
      Label[] labels = new Label[fields.size()];
      for (int i = 0, n = labels.length; i < n; i++)
        labels[i] = new Label();
      Label defaultLabel = new Label();
      mv.visitTableSwitchInsn(0, labels.length - 1, defaultLabel, labels);

      for (int i = 0, n = labels.length; i < n; i++) {
        Field field = fields.get(i);
        Type fieldType = Type.getType(field.getType());
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

        for (int i = 0; i < commonEntry.length; i++) {
            localEntryCode(v, i, commonEntry[i]);
        }
        v.visitInsn(Opcodes.SWAP);
        int firstj = firstJump.get(fno);
        v.visitTableSwitchInsn(firstj, firstj + entryPts.length - 1, entryTrampolineLabels[0] /*XXX*/, entryTrampolineLabels);

        int stash = nlocal;
        int scratch = nlocal+1;

        // emit salient tryblocks
View Full Code Here

Examples of org.objectweb.asm.MethodVisitor.visitTableSwitchInsn()

      maxStack--;
      Label[] labels = new Label[fields.size()];
      for (int i = 0, n = labels.length; i < n; i++)
        labels[i] = new Label();
      Label defaultLabel = new Label();
      mv.visitTableSwitchInsn(0, labels.length - 1, defaultLabel, labels);

      for (int i = 0, n = labels.length; i < n; i++) {
        Field field = fields.get(i);

        mv.visitLabel(labels[i]);
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.