--- a/hotspot/src/share/vm/memory/universe.cpp Wed Nov 28 08:43:26 2012 -0800
+++ b/hotspot/src/share/vm/memory/universe.cpp Wed Nov 28 17:50:21 2012 -0500
@@ -425,14 +425,10 @@
// from MetaspaceObj, because the latter does not have virtual functions.
// If the metadata type has a vtable, it cannot be shared in the read-only
// section of the CDS archive, because the vtable pointer is patched.
-static inline void* dereference(void* addr) {
- return *(void**)addr;
-}
-
static inline void add_vtable(void** list, int* n, void* o, int count) {
guarantee((*n) < count, "vtable list too small");
- void* vtable = dereference(o);
- assert(dereference(vtable) != NULL, "invalid vtable");
+ void* vtable = dereference_vptr(o);
+ assert(*(void**)(vtable) != NULL, "invalid vtable");
list[(*n)++] = vtable;
}