< prev index next >

src/share/vm/utilities/debug.hpp

Print this page
rev 8476 : [mq]: unique


 206 void report_should_not_reach_here(const char* file, int line);
 207 void report_unimplemented(const char* file, int line);
 208 void report_untested(const char* file, int line, const char* message);
 209 
 210 void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2);
 211 
 212 // Compile-time asserts.  Cond must be a compile-time constant expression that
 213 // is convertible to bool.  STATIC_ASSERT() can be used anywhere a declaration
 214 // may appear.
 215 //
 216 // Implementation Note: STATIC_ASSERT_FAILURE<true> provides a value member
 217 // rather than type member that could be used directly in the typedef, because
 218 // a type member would require conditional use of "typename", depending on
 219 // whether Cond is dependent or not.  The use of a value member leads to the
 220 // use of an array type.
 221 
 222 template<bool x> struct STATIC_ASSERT_FAILURE;
 223 template<> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
 224 
 225 #define STATIC_ASSERT(Cond) \
 226   typedef char STATIC_ASSERT_DUMMY_TYPE[ STATIC_ASSERT_FAILURE< (Cond) >::value ]

 227 
 228 // out of shared space reporting
 229 enum SharedSpaceType {
 230   SharedReadOnly,
 231   SharedReadWrite,
 232   SharedMiscData,
 233   SharedMiscCode
 234 };
 235 
 236 void report_out_of_shared_space(SharedSpaceType space_type);
 237 
 238 void report_insufficient_metaspace(size_t required_size);
 239 
 240 // out of memory reporting
 241 void report_java_out_of_memory(const char* message);
 242 
 243 // Support for self-destruct
 244 bool is_error_reported();
 245 void set_error_reported();
 246 




 206 void report_should_not_reach_here(const char* file, int line);
 207 void report_unimplemented(const char* file, int line);
 208 void report_untested(const char* file, int line, const char* message);
 209 
 210 void warning(const char* format, ...) ATTRIBUTE_PRINTF(1, 2);
 211 
 212 // Compile-time asserts.  Cond must be a compile-time constant expression that
 213 // is convertible to bool.  STATIC_ASSERT() can be used anywhere a declaration
 214 // may appear.
 215 //
 216 // Implementation Note: STATIC_ASSERT_FAILURE<true> provides a value member
 217 // rather than type member that could be used directly in the typedef, because
 218 // a type member would require conditional use of "typename", depending on
 219 // whether Cond is dependent or not.  The use of a value member leads to the
 220 // use of an array type.
 221 
 222 template<bool x> struct STATIC_ASSERT_FAILURE;
 223 template<> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
 224 
 225 #define STATIC_ASSERT(Cond) \
 226   typedef char PASTE_TOKENS(STATIC_ASSERT_DUMMY_TYPE_, __LINE__)[ \
 227     STATIC_ASSERT_FAILURE< (Cond) >::value ]
 228 
 229 // out of shared space reporting
 230 enum SharedSpaceType {
 231   SharedReadOnly,
 232   SharedReadWrite,
 233   SharedMiscData,
 234   SharedMiscCode
 235 };
 236 
 237 void report_out_of_shared_space(SharedSpaceType space_type);
 238 
 239 void report_insufficient_metaspace(size_t required_size);
 240 
 241 // out of memory reporting
 242 void report_java_out_of_memory(const char* message);
 243 
 244 // Support for self-destruct
 245 bool is_error_reported();
 246 void set_error_reported();
 247 


< prev index next >