# HG changeset patch # User stefank # Date 1424247757 -3600 # Node ID db7ae483ecb2850dd08c99278add46ce41085b5e # Parent 1b732f2836ce9e251f595d7fba9fc1f7b56204e2 8073388: Get rid of the depenecy from handles.hpp to oop.inline.hpp Reviewed-by: mgerdin, coleenp diff -r 1b732f2836ce -r db7ae483ecb2 hotspot/src/share/vm/ci/ciKlass.hpp --- a/hotspot/src/share/vm/ci/ciKlass.hpp Wed Feb 18 08:57:29 2015 +0100 +++ b/hotspot/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 // diff -r 1b732f2836ce -r db7ae483ecb2 hotspot/src/share/vm/classfile/classLoaderExt.hpp --- a/hotspot/src/share/vm/classfile/classLoaderExt.hpp Wed Feb 18 08:57:29 2015 +0100 +++ b/hotspot/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: diff -r 1b732f2836ce -r db7ae483ecb2 hotspot/src/share/vm/memory/genRemSet.cpp --- a/hotspot/src/share/vm/memory/genRemSet.cpp Wed Feb 18 08:57:29 2015 +0100 +++ b/hotspot/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 diff -r 1b732f2836ce -r db7ae483ecb2 hotspot/src/share/vm/runtime/handles.cpp --- a/hotspot/src/share/vm/runtime/handles.cpp Wed Feb 18 08:57:29 2015 +0100 +++ b/hotspot/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 diff -r 1b732f2836ce -r db7ae483ecb2 hotspot/src/share/vm/runtime/handles.hpp --- a/hotspot/src/share/vm/runtime/handles.hpp Wed Feb 18 08:57:29 2015 +0100 +++ b/hotspot/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)); };