< prev index next >

src/share/vm/utilities/globalDefinitions.hpp

Print this page




1405 
1406 
1407 // Enable zap-a-lot if in debug version.
1408 
1409 # ifdef ASSERT
1410 # ifdef COMPILER2
1411 #   define ENABLE_ZAP_DEAD_LOCALS
1412 #endif /* COMPILER2 */
1413 # endif /* ASSERT */
1414 
1415 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
1416 
1417 // Dereference vptr
1418 // All C++ compilers that we know of have the vtbl pointer in the first
1419 // word.  If there are exceptions, this function needs to be made compiler
1420 // specific.
1421 static inline void* dereference_vptr(const void* addr) {
1422   return *(void**)addr;
1423 }
1424 


1425 #ifndef PRODUCT
1426 
1427 // For unit testing only
1428 class GlobalDefinitions {
1429 public:
1430   static void test_globals();
1431 };
1432 
1433 #endif // PRODUCT
1434 
1435 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP


1405 
1406 
1407 // Enable zap-a-lot if in debug version.
1408 
1409 # ifdef ASSERT
1410 # ifdef COMPILER2
1411 #   define ENABLE_ZAP_DEAD_LOCALS
1412 #endif /* COMPILER2 */
1413 # endif /* ASSERT */
1414 
1415 #define ARRAY_SIZE(array) (sizeof(array)/sizeof((array)[0]))
1416 
1417 // Dereference vptr
1418 // All C++ compilers that we know of have the vtbl pointer in the first
1419 // word.  If there are exceptions, this function needs to be made compiler
1420 // specific.
1421 static inline void* dereference_vptr(const void* addr) {
1422   return *(void**)addr;
1423 }
1424 
1425 NORETURN_ATTRIBUTE(void noreturn_function());
1426 
1427 #ifndef PRODUCT
1428 
1429 // For unit testing only
1430 class GlobalDefinitions {
1431 public:
1432   static void test_globals();
1433 };
1434 
1435 #endif // PRODUCT
1436 
1437 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP
< prev index next >