[llvm-commits] CVS: llvm-java/docs/object-layout.txt

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Sep 10 13:15:37 PDT 2004



Changes in directory llvm-java/docs:

object-layout.txt updated: 1.3 -> 1.4
---
Log message:

Update the struct types.


---
Diffs of the changes:  (+10 -7)

Index: llvm-java/docs/object-layout.txt
diff -u llvm-java/docs/object-layout.txt:1.3 llvm-java/docs/object-layout.txt:1.4
--- llvm-java/docs/object-layout.txt:1.3	Wed Sep  8 15:10:09 2004
+++ llvm-java/docs/object-layout.txt	Fri Sep 10 15:15:27 2004
@@ -46,10 +46,13 @@
 this interface in the objects interfaces array.
 
 struct llvm_java_object_typeinfo {
-  uint depth;
-  struct llvm_java_object_vtable* vtables;
-  uint lastIface;
-  struct llvm_java_object_vtable* interfaces;
+  unsigned depth;
+  struct llvm_java_object_vtable** vtables;
+  unsigned lastIface;
+  union {
+    struct llvm_java_object_vtable** interfaces;
+    unsigned interfaceFlag;
+  };
 };
 
 The structure of llvm_java_object_typeinfo allows constant time
@@ -61,11 +64,11 @@
   if (objClazz == clazz)
     return 1;
   // we are checking against a class' typeinfo
-  if (clazz->typeinfo.interfaces != (struct llvm_java_object_vtable*)-1)
+  if (clazz->typeinfo.interfaceFlag != (unsigned)-1)
     return objClazz->typeinfo.depth > clazz->typeinfo.depth &&
-           &objClazz->typeinfo.vtables[clazz->typeinfo.depth] == clazz;
+           objClazz->typeinfo.vtables[clazz->typeinfo.depth] == clazz;
   // otherwise we are checking against an interface's typeinfo
   else
     return objClazz->typeinfo.lastIface >= clazz->typeinfo.lastIface &&
-           &objClazz->typeinfo.interfaces[clazz->typeinfo.lastIface];
+           objClazz->typeinfo.interfaces[clazz->typeinfo.lastIface];
 }






More information about the llvm-commits mailing list