311 void classfile_parse_error(const char* msg, int index, const char *name, TRAPS); |
311 void classfile_parse_error(const char* msg, int index, const char *name, TRAPS); |
312 inline void guarantee_property(bool b, const char* msg, TRAPS) { |
312 inline void guarantee_property(bool b, const char* msg, TRAPS) { |
313 if (!b) { classfile_parse_error(msg, CHECK); } |
313 if (!b) { classfile_parse_error(msg, CHECK); } |
314 } |
314 } |
315 |
315 |
316 inline void assert_property(bool b, const char* msg, TRAPS) { |
316 PRAGMA_DIAG_PUSH |
|
317 PRAGMA_FORMAT_NONLITERAL_IGNORED |
|
318 inline void assert_property(bool b, const char* msg, TRAPS) { |
317 #ifdef ASSERT |
319 #ifdef ASSERT |
318 if (!b) { |
320 if (!b) { |
319 ResourceMark rm(THREAD); |
321 ResourceMark rm(THREAD); |
320 fatal(err_msg(msg, _class_name->as_C_string())); |
322 fatal(err_msg(msg, _class_name->as_C_string())); |
321 } |
323 } |
328 ResourceMark rm(THREAD); |
330 ResourceMark rm(THREAD); |
329 fatal(err_msg(msg, index, _class_name->as_C_string())); |
331 fatal(err_msg(msg, index, _class_name->as_C_string())); |
330 } |
332 } |
331 #endif |
333 #endif |
332 } |
334 } |
|
335 PRAGMA_DIAG_POP |
333 |
336 |
334 inline void check_property(bool property, const char* msg, int index, TRAPS) { |
337 inline void check_property(bool property, const char* msg, int index, TRAPS) { |
335 if (_need_verify) { |
338 if (_need_verify) { |
336 guarantee_property(property, msg, index, CHECK); |
339 guarantee_property(property, msg, index, CHECK); |
337 } else { |
340 } else { |