home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / asm / Label.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.6 KB  |  75 lines

  1. package sun.tools.asm;
  2.  
  3. import sun.tools.java.FieldDefinition;
  4.  
  5. public final class Label extends Instruction {
  6.    static int labelCount;
  7.    // $FF: renamed from: ID int
  8.    int field_0;
  9.    int depth;
  10.    FieldDefinition[] locals;
  11.  
  12.    public Label() {
  13.       super(0, -1, (Object)null);
  14.       this.field_0 = ++labelCount;
  15.    }
  16.  
  17.    Label getDestination() {
  18.       Label var1 = this;
  19.       if (super.next != null && super.next != this && this.depth == 0) {
  20.          this.depth = 1;
  21.          switch (super.next.opc) {
  22.             case -1:
  23.                var1 = ((Label)super.next).getDestination();
  24.                break;
  25.             case 18:
  26.             case 19:
  27.                if (super.next.value instanceof Integer) {
  28.                   Instruction var2 = super.next.next;
  29.                   if (var2.opc == -1) {
  30.                      var2 = ((Label)var2).getDestination().next;
  31.                   }
  32.  
  33.                   if (var2.opc == 153) {
  34.                      if ((Integer)super.next.value == 0) {
  35.                         var1 = (Label)var2.value;
  36.                      } else {
  37.                         var1 = new Label();
  38.                         var1.next = var2.next;
  39.                         var2.next = var1;
  40.                      }
  41.  
  42.                      var1 = var1.getDestination();
  43.                   } else if (var2.opc == 154) {
  44.                      if ((Integer)super.next.value == 0) {
  45.                         var1 = new Label();
  46.                         var1.next = var2.next;
  47.                         var2.next = var1;
  48.                      } else {
  49.                         var1 = (Label)var2.value;
  50.                      }
  51.  
  52.                      var1 = var1.getDestination();
  53.                   }
  54.                }
  55.                break;
  56.             case 167:
  57.                var1 = ((Label)super.next.value).getDestination();
  58.          }
  59.  
  60.          this.depth = 0;
  61.       }
  62.  
  63.       return var1;
  64.    }
  65.  
  66.    public String toString() {
  67.       String var1 = "$" + this.field_0 + ":";
  68.       if (super.value != null) {
  69.          var1 = var1 + " stack=" + super.value;
  70.       }
  71.  
  72.       return var1;
  73.    }
  74. }
  75.