changeset 49398:93fe2fc5c093

8199472: Fix non-PCH build after JDK-8199319 Reviewed-by: stefank, coleenp
author simonis
date Wed, 14 Mar 2018 12:12:00 +0100
parents 2956d0ece7a9
children 43a2159878d3
files src/hotspot/share/classfile/classListParser.cpp src/hotspot/share/classfile/classLoaderData.cpp src/hotspot/share/classfile/stringTable.cpp src/hotspot/share/classfile/systemDictionaryShared.cpp src/hotspot/share/classfile/verificationType.cpp src/hotspot/share/code/icBuffer.cpp src/hotspot/share/code/location.cpp src/hotspot/share/compiler/oopMap.cpp src/hotspot/share/memory/oopFactory.cpp src/hotspot/share/oops/arrayKlass.cpp src/hotspot/share/oops/instanceKlass.cpp src/hotspot/share/oops/instanceKlass.hpp src/hotspot/share/oops/klass.cpp src/hotspot/share/runtime/handles.hpp src/hotspot/share/runtime/handles.inline.hpp src/hotspot/share/runtime/jniHandles.cpp src/hotspot/share/services/diagnosticFramework.cpp src/hotspot/share/services/memoryService.cpp
diffstat 18 files changed, 38 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/classListParser.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/classfile/classListParser.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -34,6 +34,7 @@
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/fieldType.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "utilities/defaultStream.hpp"
 #include "utilities/hashtable.inline.hpp"
--- a/src/hotspot/share/classfile/classLoaderData.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/classfile/classLoaderData.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -68,6 +68,7 @@
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.hpp"
 #include "runtime/mutex.hpp"
--- a/src/hotspot/share/classfile/stringTable.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/classfile/stringTable.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -39,6 +39,7 @@
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "services/diagnosticCommand.hpp"
 #include "utilities/hashtable.inline.hpp"
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -49,6 +49,7 @@
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
--- a/src/hotspot/share/classfile/verificationType.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/classfile/verificationType.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 #include "classfile/systemDictionaryShared.hpp"
 #include "classfile/verificationType.hpp"
 #include "classfile/verifier.hpp"
+#include "runtime/handles.inline.hpp"
 
 VerificationType VerificationType::from_tag(u1 tag) {
   switch (tag) {
--- a/src/hotspot/share/code/icBuffer.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/code/icBuffer.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -35,6 +35,7 @@
 #include "memory/universe.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/stubRoutines.hpp"
 
--- a/src/hotspot/share/code/location.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/code/location.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "code/debugInfo.hpp"
 #include "code/location.hpp"
+#include "runtime/handles.inline.hpp"
 
 void Location::print_on(outputStream* st) const {
   if(type() == invalid) {
--- a/src/hotspot/share/compiler/oopMap.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/compiler/oopMap.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
 #include "runtime/frame.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/signature.hpp"
 #include "utilities/align.hpp"
 #ifdef COMPILER1
--- a/src/hotspot/share/memory/oopFactory.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/memory/oopFactory.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -36,6 +36,7 @@
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayOop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 
 
 typeArrayOop oopFactory::new_charArray(const char* utf8_str, TRAPS) {
--- a/src/hotspot/share/oops/arrayKlass.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/oops/arrayKlass.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -37,6 +37,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 
 int ArrayKlass::static_size(int header_size) {
   // size of an array klass object
--- a/src/hotspot/share/oops/instanceKlass.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1014,6 +1014,10 @@
   return i;
 }
 
+instanceHandle InstanceKlass::allocate_instance_handle(TRAPS) {
+  return instanceHandle(THREAD, allocate_instance(THREAD));
+}
+
 void InstanceKlass::check_valid_for_instantiation(bool throwError, TRAPS) {
   if (is_interface() || is_abstract()) {
     ResourceMark rm(THREAD);
--- a/src/hotspot/share/oops/instanceKlass.hpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/oops/instanceKlass.hpp	Wed Mar 14 12:12:00 2018 +0100
@@ -911,7 +911,7 @@
   instanceOop allocate_instance(TRAPS);
 
   // additional member function to return a handle
-  instanceHandle allocate_instance_handle(TRAPS)      { return instanceHandle(THREAD, allocate_instance(THREAD)); }
+  instanceHandle allocate_instance_handle(TRAPS);
 
   objArrayOop allocate_objArray(int n, int length, TRAPS);
   // Helper function
--- a/src/hotspot/share/oops/klass.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/oops/klass.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -39,6 +39,7 @@
 #include "oops/klass.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "trace/traceMacros.hpp"
 #include "utilities/macros.hpp"
--- a/src/hotspot/share/runtime/handles.hpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/runtime/handles.hpp	Wed Mar 14 12:12:00 2018 +0100
@@ -72,7 +72,7 @@
  public:
   // Constructors
   Handle()                                       { _handle = NULL; }
-  Handle(Thread* thread, oop obj);
+  inline Handle(Thread* thread, oop obj);
 
   // General access
   oop     operator () () const                   { return obj(); }
@@ -108,9 +108,7 @@
    public:                                       \
     /* Constructors */                           \
     type##Handle ()                              : Handle()                 {} \
-    type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
-      assert(is_null() || ((oop)obj)->is_a(), "illegal type");                \
-    }                                                                         \
+    inline type##Handle (Thread* thread, type##Oop obj); \
     \
     /* Operators for ease of use */              \
     type##Oop    operator () () const            { return obj(); } \
--- a/src/hotspot/share/runtime/handles.inline.hpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/runtime/handles.inline.hpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,17 @@
   }
 }
 
+// Inline constructors for Specific Handles for different oop types
+#define DEF_HANDLE_CONSTR(type, is_a)                   \
+inline type##Handle::type##Handle (Thread* thread, type##Oop obj) : Handle(thread, (oop)obj) { \
+  assert(is_null() || ((oop)obj)->is_a(), "illegal type");                \
+}
+
+DEF_HANDLE_CONSTR(instance , is_instance_noinline )
+DEF_HANDLE_CONSTR(array    , is_array_noinline    )
+DEF_HANDLE_CONSTR(objArray , is_objArray_noinline )
+DEF_HANDLE_CONSTR(typeArray, is_typeArray_noinline)
+
 // Constructor for metadata handles
 #define DEF_METADATA_HANDLE_FN(name, type) \
 inline name##Handle::name##Handle(type* obj) : _value(obj), _thread(NULL) {       \
--- a/src/hotspot/share/runtime/jniHandles.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/runtime/jniHandles.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -27,6 +27,7 @@
 #include "logging/log.hpp"
 #include "memory/iterator.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/jniHandles.inline.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/thread.inline.hpp"
--- a/src/hotspot/share/services/diagnosticFramework.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/services/diagnosticFramework.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "services/diagnosticArgument.hpp"
--- a/src/hotspot/share/services/memoryService.cpp	Wed Mar 14 07:27:19 2018 -0400
+++ b/src/hotspot/share/services/memoryService.cpp	Wed Mar 14 12:12:00 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 #include "memory/memRegion.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/globals.hpp"
+#include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
 #include "services/classLoadingService.hpp"
 #include "services/lowMemoryDetector.hpp"