8073389: Remove the include of resourceArea.hpp from classFileParser.hpp

Reviewed-by: coleenp, dholmes
This commit is contained in:
Stefan Karlsson 2015-02-18 10:28:27 +01:00
parent e238141b5c
commit d40f08d0a3
7 changed files with 35 additions and 15 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@
#include "classfile/classFileParser.hpp" #include "classfile/classFileParser.hpp"
#include "classfile/stackMapTable.hpp" #include "classfile/stackMapTable.hpp"
#include "classfile/verifier.hpp" #include "classfile/verifier.hpp"
#include "memory/resourceArea.hpp"
// Keep these in a separate file to prevent inlining // Keep these in a separate file to prevent inlining

View file

@ -38,6 +38,7 @@
#include "memory/metadataFactory.hpp" #include "memory/metadataFactory.hpp"
#include "memory/oopFactory.hpp" #include "memory/oopFactory.hpp"
#include "memory/referenceType.hpp" #include "memory/referenceType.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.inline.hpp" #include "memory/universe.inline.hpp"
#include "oops/constantPool.hpp" #include "oops/constantPool.hpp"
#include "oops/fieldStreams.hpp" #include "oops/fieldStreams.hpp"
@ -59,6 +60,7 @@
#include "services/threadService.hpp" #include "services/threadService.hpp"
#include "utilities/array.hpp" #include "utilities/array.hpp"
#include "utilities/globalDefinitions.hpp" #include "utilities/globalDefinitions.hpp"
#include "utilities/exceptions.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include "utilities/ostream.hpp" #include "utilities/ostream.hpp"
#include "utilities/resourceHash.hpp" #include "utilities/resourceHash.hpp"
@ -313,6 +315,19 @@ inline Symbol* check_symbol_at(constantPoolHandle cp, int index) {
return NULL; return NULL;
} }
PRAGMA_DIAG_PUSH
PRAGMA_FORMAT_NONLITERAL_IGNORED
void ClassFileParser::report_assert_property_failure(const char* msg, TRAPS) {
ResourceMark rm(THREAD);
fatal(err_msg(msg, _class_name->as_C_string()));
}
void ClassFileParser::report_assert_property_failure(const char* msg, int index, TRAPS) {
ResourceMark rm(THREAD);
fatal(err_msg(msg, index, _class_name->as_C_string()));
}
PRAGMA_DIAG_POP
constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) { constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) {
ClassFileStream* cfs = stream(); ClassFileStream* cfs = stream();
constantPoolHandle nullHandle; constantPoolHandle nullHandle;

View file

@ -26,12 +26,15 @@
#define SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP #define SHARE_VM_CLASSFILE_CLASSFILEPARSER_HPP
#include "classfile/classFileStream.hpp" #include "classfile/classFileStream.hpp"
#include "memory/resourceArea.hpp" #include "classfile/symbolTable.hpp"
#include "oops/annotations.hpp"
#include "oops/constantPool.hpp"
#include "oops/typeArrayOop.hpp" #include "oops/typeArrayOop.hpp"
#include "utilities/accessFlags.hpp" #include "utilities/accessFlags.hpp"
#include "classfile/symbolTable.hpp"
class CompressedLineNumberWriteStream;
class FieldAllocationCount; class FieldAllocationCount;
class FieldInfo;
class FieldLayoutInfo; class FieldLayoutInfo;
@ -315,13 +318,13 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
if (!b) { classfile_parse_error(msg, CHECK); } if (!b) { classfile_parse_error(msg, CHECK); }
} }
PRAGMA_DIAG_PUSH void report_assert_property_failure(const char* msg, TRAPS);
PRAGMA_FORMAT_NONLITERAL_IGNORED void report_assert_property_failure(const char* msg, int index, TRAPS);
inline void assert_property(bool b, const char* msg, TRAPS) {
inline void assert_property(bool b, const char* msg, TRAPS) {
#ifdef ASSERT #ifdef ASSERT
if (!b) { if (!b) {
ResourceMark rm(THREAD); report_assert_property_failure(msg, THREAD);
fatal(err_msg(msg, _class_name->as_C_string()));
} }
#endif #endif
} }
@ -329,12 +332,10 @@ inline void assert_property(bool b, const char* msg, TRAPS) {
inline void assert_property(bool b, const char* msg, int index, TRAPS) { inline void assert_property(bool b, const char* msg, int index, TRAPS) {
#ifdef ASSERT #ifdef ASSERT
if (!b) { if (!b) {
ResourceMark rm(THREAD); report_assert_property_failure(msg, index, THREAD);
fatal(err_msg(msg, index, _class_name->as_C_string()));
} }
#endif #endif
} }
PRAGMA_DIAG_POP
inline void check_property(bool property, const char* msg, int index, TRAPS) { inline void check_property(bool property, const char* msg, int index, TRAPS) {
if (_need_verify) { if (_need_verify) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,7 @@
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "code/compressedStream.hpp" #include "code/compressedStream.hpp"
#include "code/nmethod.hpp" #include "code/nmethod.hpp"
#include "memory/resourceArea.hpp"
#include "utilities/growableArray.hpp" #include "utilities/growableArray.hpp"
#include "utilities/hashtable.hpp" #include "utilities/hashtable.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
#include "code/stubs.hpp" #include "code/stubs.hpp"
#include "interpreter/cppInterpreter.hpp" #include "interpreter/cppInterpreter.hpp"
#include "interpreter/templateInterpreter.hpp" #include "interpreter/templateInterpreter.hpp"
#include "memory/resourceArea.hpp"
#ifdef ZERO #ifdef ZERO
#ifdef TARGET_ARCH_zero #ifdef TARGET_ARCH_zero
# include "entry_zero.hpp" # include "entry_zero.hpp"

View file

@ -22,7 +22,7 @@
* *
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "services/nmtDCmd.hpp" #include "services/nmtDCmd.hpp"
#include "services/memReporter.hpp" #include "services/memReporter.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "runtime/vm_version.hpp"
#include "services/attachListener.hpp" #include "services/attachListener.hpp"
#include "services/management.hpp" #include "services/management.hpp"
#include "services/runtimeService.hpp" #include "services/runtimeService.hpp"