[llvm-commits] CVS: llvm-java/docs/object-layout.txt
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Sep 10 13:21:27 PDT 2004
Changes in directory llvm-java/docs:
object-layout.txt updated: 1.4 -> 1.5
---
Log message:
Update to how typeinfo is implemented.
---
Diffs of the changes: (+6 -4)
Index: llvm-java/docs/object-layout.txt
diff -u llvm-java/docs/object-layout.txt:1.4 llvm-java/docs/object-layout.txt:1.5
--- llvm-java/docs/object-layout.txt:1.4 Fri Sep 10 15:15:27 2004
+++ llvm-java/docs/object-layout.txt Fri Sep 10 15:21:16 2004
@@ -43,15 +43,17 @@
used to differentiate between class typeinfo's and interface
typeinfo's. More specifically if interfaces == -1 then this typeinfo
is for an interface and the lastIface field is the unique number of
-this interface in the objects interfaces array.
+this interface in the objects interfaces array. The field lastIface is
+the max index of all implemented interfaces. For a class that doesn't
+implement any it is -1.
struct llvm_java_object_typeinfo {
unsigned depth;
struct llvm_java_object_vtable** vtables;
- unsigned lastIface;
+ int lastIface;
union {
struct llvm_java_object_vtable** interfaces;
- unsigned interfaceFlag;
+ int interfaceFlag;
};
};
@@ -64,7 +66,7 @@
if (objClazz == clazz)
return 1;
// we are checking against a class' typeinfo
- if (clazz->typeinfo.interfaceFlag != (unsigned)-1)
+ if (clazz->typeinfo.interfaceFlag != -1)
return objClazz->typeinfo.depth > clazz->typeinfo.depth &&
objClazz->typeinfo.vtables[clazz->typeinfo.depth] == clazz;
// otherwise we are checking against an interface's typeinfo
More information about the llvm-commits
mailing list