hotspot/src/share/vm/utilities/globalDefinitions.hpp
changeset 14579 7f6ce6e3dd80
parent 14487 9a40ad461ee9
child 15228 e92acc84ade3
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Nov 28 08:43:26 2012 -0800
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Wed Nov 28 17:50:21 2012 -0500
@@ -1280,4 +1280,12 @@
 
 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
 
+// Dereference vptr
+// All C++ compilers that we know of have the vtbl pointer in the first
+// word.  If there are exceptions, this function needs to be made compiler
+// specific.
+static inline void* dereference_vptr(void* addr) {
+  return *(void**)addr;
+}
+
 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP