current += 8;
current=current.add(8);
  static void emitCDeclarationsForJavaType (String Cname, VM_Class cls) {    // How many instance fields are there?    //    VM_Field[] allFields = cls.getDeclaredFields();    int fieldCount = 0;    for (int i=0; i<allFields.length; i++)      if (!allFields[i].isStatic())        fieldCount++;    // Sort them in ascending offset order    //    SortableField [] fields = new SortableField[fieldCount];    for (int i=0, j=0; i<allFields.length; i++)      if (!allFields[i].isStatic())        fields[j++] = new SortableField(allFields[i]);    Arrays.sort(fields);    // Emit field declarations    //    p("struct " + Cname + " {\n");    // Set up cursor - scalars will waste 4 bytes on 64-bit arch    //    boolean needsAlign = VM.BuildFor64Addr;    int addrSize = VM.BuildFor32Addr ? 4 : 8;    // Header Space for objects    int startOffset = VM_ObjectModel.objectStartOffset(cls);    int current = startOffset;    for(int i = 0; current < fields[0].f.getOffsetAsInt(); i++) {      pln("  uint32_t    headerPadding" + i + ";\n");      current += 4;     }        for (int i = 0; i<fields.length; i++) {      VM_Field field = fields[i].f;      VM_TypeReference t = field.getType();      int offset = field.getOffsetAsInt();      String name = field.getName().toString();      // Align by blowing 4 bytes if needed      if (needsAlign && current + 4 == offset) {          pln("  uint32_t    padding" + i + ";");          current += 4;      }      if (current != offset)         pln("current = " + current + " and offset = " + offset + " are neither identical not differ by 4");      if (t.isIntType()) {        current += 4;        p("   uint32_t " + name + ";\n");      } else if (t.isLongType()) {        current += 8;        p("   uint64_t " + name + ";\n");      } else if (t.isWordType()) {        p("   VM_Address " + name + ";\n");        current += addrSize;      } else if (t.isArrayType() && t.getArrayElementType().isWordType()) {        p("   VM_Address * " + name + ";\n");        current += addrSize;      } else if (t.isArrayType() && t.getArrayElementType().isIntType()) {        p("   unsigned int * " + name + ";\n");        current += addrSize;      } else if (t.isReferenceType()) {        p("   JavaObject_t " + name + ";\n");        current += addrSize;      } else {        System.err.print("Unexpected field " + name.toString() + " with type " + t + "\n");        throw new RuntimeException("unexpected field type");      }    }    p("};\n");  }