hotspot/src/share/vm/classfile/classFileParser.hpp
changeset 24424 2658d7834c6e
parent 24322 c2978d1578e3
child 25507 37c0bd9e16a0
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   310   void classfile_parse_error(const char* msg, int index, const char *name, TRAPS);
   310   void classfile_parse_error(const char* msg, int index, const char *name, TRAPS);
   311   inline void guarantee_property(bool b, const char* msg, TRAPS) {
   311   inline void guarantee_property(bool b, const char* msg, TRAPS) {
   312     if (!b) { classfile_parse_error(msg, CHECK); }
   312     if (!b) { classfile_parse_error(msg, CHECK); }
   313   }
   313   }
   314 
   314 
   315   inline void assert_property(bool b, const char* msg, TRAPS) {
   315 PRAGMA_DIAG_PUSH
       
   316 PRAGMA_FORMAT_NONLITERAL_IGNORED
       
   317 inline void assert_property(bool b, const char* msg, TRAPS) {
   316 #ifdef ASSERT
   318 #ifdef ASSERT
   317     if (!b) {
   319     if (!b) {
   318       ResourceMark rm(THREAD);
   320       ResourceMark rm(THREAD);
   319       fatal(err_msg(msg, _class_name->as_C_string()));
   321       fatal(err_msg(msg, _class_name->as_C_string()));
   320     }
   322     }
   327       ResourceMark rm(THREAD);
   329       ResourceMark rm(THREAD);
   328       fatal(err_msg(msg, index, _class_name->as_C_string()));
   330       fatal(err_msg(msg, index, _class_name->as_C_string()));
   329     }
   331     }
   330 #endif
   332 #endif
   331   }
   333   }
       
   334 PRAGMA_DIAG_POP
   332 
   335 
   333   inline void check_property(bool property, const char* msg, int index, TRAPS) {
   336   inline void check_property(bool property, const char* msg, int index, TRAPS) {
   334     if (_need_verify) {
   337     if (_need_verify) {
   335       guarantee_property(property, msg, index, CHECK);
   338       guarantee_property(property, msg, index, CHECK);
   336     } else {
   339     } else {