Beispiel #1
0
 private void installClass(CgenNode nd) {
   AbstractSymbol name = nd.getName();
   if (probe(name) != null) return;
   nds.addElement(nd);
   nodeMap.put(nd.getName(), nd);
   addId(name, nd);
 }
Beispiel #2
0
  private void codeObjInits() {
    str.println("\n# Object Initializers");
    for (Object obj : nds) {
      CgenNode nd = (CgenNode) obj;

      // code object initailzers (constructor method)
      CgenSupport.emitInitRef(nd.getName(), str);
      str.print(CgenSupport.LABEL);
      nd.codeObjInit(str);
    }
  }
Beispiel #3
0
  private void codeDispTables() {
    str.println("\n# Dispatch Tables");
    for (Object obj : nds) {
      CgenNode nd = (CgenNode) obj;

      // code class method reference
      CgenSupport.emitDispTableRef(nd.getName(), str);
      str.print(CgenSupport.LABEL);
      nd.codeDispTab(str);
    }
  }
Beispiel #4
0
  private void codeProtObjs() {
    str.println("\n# Prototype Objects");
    for (Object obj : nds) {
      CgenNode nd = (CgenNode) obj;

      // code class attributes
      str.println(CgenSupport.WORD + "-1"); // GC tag
      CgenSupport.emitProtObjRef(nd.getName(), str);
      str.print(CgenSupport.LABEL);
      nd.codeProtObj(str);
    }
  }