helpful progress reporting
[IRC.git] / Robust / src / IR / Descriptor.java
index 81e327c79b3318f88a686412408ff528cb9e6a25..4d4d67b7d7d6a06576683caefa88b554b4fa92f3 100644 (file)
@@ -1,42 +1,46 @@
 package IR;
 
 /**
- * Descriptor 
+ * Descriptor
  *
  * represents a symbol in the language (var name, function name, etc).
  */
 
 public abstract class Descriptor {
 
-    protected String name;
-    protected String safename;
-    static int count=0;
-    int uniqueid;
-    
-    public Descriptor(String name) {
-       this.name = name;
-        this.safename = "__" + name + "__";
-       this.uniqueid=count++;
-    }
-
-    protected Descriptor(String name, String safename) {
-       this.name = name;
-        this.safename = safename;
-       this.uniqueid=count++;
-    }
-    
-    public String toString() {
-       return name;
-    }
-    
-    public String getSymbol() {
-       return name;
-    }
-
-    public String getSafeSymbol() {
-        return safename;
-    }
-    public int getNum() {
-       return uniqueid;
-    }
+  protected String name;
+  protected String safename;
+  static int count=0;
+  int uniqueid;
+
+  public Descriptor(String name) {
+    this.name = name;
+    this.safename = "___" + name + "___";
+    this.uniqueid=count++;
+  }
+
+  protected Descriptor(String name, String safename) {
+    this.name = name;
+    this.safename = safename;
+    this.uniqueid=count++;
+  }
+
+  public String toString() {
+    return name;
+  }
+
+  public String getSymbol() {
+    return name;
+  }
+
+  public String getSafeSymbol() {
+    return safename;
+  }
+  public int getNum() {
+    return uniqueid;
+  }
+
+  public String getCoreSafeSymbol(int num) {
+    return safename + "core" + num + "___";
+  }
 }