src/share/vm/utilities/globalDefinitions.hpp

changeset 4295
59c790074993
parent 4277
e4f764ddb06a
child 4465
203f64878aab
equal deleted inserted replaced
4294:b51dc8df86e5 4295:59c790074993
1278 #endif /* COMPILER2 */ 1278 #endif /* COMPILER2 */
1279 # endif /* ASSERT */ 1279 # endif /* ASSERT */
1280 1280
1281 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0])) 1281 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
1282 1282
1283 // Dereference vptr
1284 // All C++ compilers that we know of have the vtbl pointer in the first
1285 // word. If there are exceptions, this function needs to be made compiler
1286 // specific.
1287 static inline void* dereference_vptr(void* addr) {
1288 return *(void**)addr;
1289 }
1290
1283 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP 1291 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP

mercurial