changeset 8033:a1676462e072

8073388: Get rid of the depenecy from handles.hpp to oop.inline.hpp Reviewed-by: mgerdin, coleenp
author stefank
date Wed, 18 Feb 2015 09:22:37 +0100
parents 2f392e90f258
children 45dc3d4c5c24
files src/share/vm/ci/ciKlass.hpp src/share/vm/classfile/classLoaderExt.hpp src/share/vm/memory/genRemSet.cpp src/share/vm/runtime/handles.cpp src/share/vm/runtime/handles.hpp
diffstat 5 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/ci/ciKlass.hpp	Wed Feb 18 08:57:29 2015 +0100
+++ b/src/share/vm/ci/ciKlass.hpp	Wed Feb 18 09:22:37 2015 +0100
@@ -26,6 +26,7 @@
 #define SHARE_VM_CI_CIKLASS_HPP
 
 #include "ci/ciType.hpp"
+#include "oops/klass.hpp"
 
 // ciKlass
 //
--- a/src/share/vm/classfile/classLoaderExt.hpp	Wed Feb 18 08:57:29 2015 +0100
+++ b/src/share/vm/classfile/classLoaderExt.hpp	Wed Feb 18 09:22:37 2015 +0100
@@ -26,6 +26,8 @@
 #define SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP
 
 #include "classfile/classLoader.hpp"
+#include "oops/instanceKlass.hpp"
+#include "runtime/handles.hpp"
 
 class ClassLoaderExt: public ClassLoader { // AllStatic
 public:
--- a/src/share/vm/memory/genRemSet.cpp	Wed Feb 18 08:57:29 2015 +0100
+++ b/src/share/vm/memory/genRemSet.cpp	Wed Feb 18 09:22:37 2015 +0100
@@ -26,6 +26,7 @@
 #include "classfile/classLoaderData.hpp"
 #include "memory/cardTableRS.hpp"
 #include "memory/genRemSet.hpp"
+#include "oops/klass.hpp"
 
 // This kind of "BarrierSet" allows a "CollectedHeap" to detect and
 // enumerate ref fields that have been modified (since the last
--- a/src/share/vm/runtime/handles.cpp	Wed Feb 18 08:57:29 2015 +0100
+++ b/src/share/vm/runtime/handles.cpp	Wed Feb 18 09:22:37 2015 +0100
@@ -214,4 +214,8 @@
   area->_no_handle_mark_nesting = _no_handle_mark_nesting;
 }
 
+bool instanceKlassHandle::is_instanceKlass(const Klass* k) {
+  return k->oop_is_instance();
+}
+
 #endif
--- a/src/share/vm/runtime/handles.hpp	Wed Feb 18 08:57:29 2015 +0100
+++ b/src/share/vm/runtime/handles.hpp	Wed Feb 18 09:22:37 2015 +0100
@@ -25,7 +25,11 @@
 #ifndef SHARE_VM_RUNTIME_HANDLES_HPP
 #define SHARE_VM_RUNTIME_HANDLES_HPP
 
-#include "oops/klass.hpp"
+#include "oops/oop.hpp"
+#include "oops/oopsHierarchy.hpp"
+
+class InstanceKlass;
+class Klass;
 
 //------------------------------------------------------------------------------------------------------------------------
 // In order to preserve oops during garbage collection, they should be
@@ -201,16 +205,16 @@
   /* Constructors */
   instanceKlassHandle () : KlassHandle() {}
   instanceKlassHandle (const Klass* k) : KlassHandle(k) {
-    assert(k == NULL || k->oop_is_instance(),
-           "illegal type");
+    assert(k == NULL || is_instanceKlass(k), "illegal type");
   }
   instanceKlassHandle (Thread* thread, const Klass* k) : KlassHandle(thread, k) {
-    assert(k == NULL || k->oop_is_instance(),
-           "illegal type");
+    assert(k == NULL || is_instanceKlass(k), "illegal type");
   }
   /* Access to klass part */
   InstanceKlass*       operator () () const { return (InstanceKlass*)obj(); }
   InstanceKlass*       operator -> () const { return (InstanceKlass*)obj(); }
+
+  debug_only(bool is_instanceKlass(const Klass* k));
 };