mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8073388: Get rid of the depenecy from handles.hpp to oop.inline.hpp
Reviewed-by: mgerdin, coleenp
This commit is contained in:
parent
2e888853a1
commit
0241e477f1
5 changed files with 17 additions and 5 deletions
|
@ -26,6 +26,7 @@
|
||||||
#define SHARE_VM_CI_CIKLASS_HPP
|
#define SHARE_VM_CI_CIKLASS_HPP
|
||||||
|
|
||||||
#include "ci/ciType.hpp"
|
#include "ci/ciType.hpp"
|
||||||
|
#include "oops/klass.hpp"
|
||||||
|
|
||||||
// ciKlass
|
// ciKlass
|
||||||
//
|
//
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
#define SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP
|
#define SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP
|
||||||
|
|
||||||
#include "classfile/classLoader.hpp"
|
#include "classfile/classLoader.hpp"
|
||||||
|
#include "oops/instanceKlass.hpp"
|
||||||
|
#include "runtime/handles.hpp"
|
||||||
|
|
||||||
class ClassLoaderExt: public ClassLoader { // AllStatic
|
class ClassLoaderExt: public ClassLoader { // AllStatic
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "classfile/classLoaderData.hpp"
|
#include "classfile/classLoaderData.hpp"
|
||||||
#include "memory/cardTableRS.hpp"
|
#include "memory/cardTableRS.hpp"
|
||||||
#include "memory/genRemSet.hpp"
|
#include "memory/genRemSet.hpp"
|
||||||
|
#include "oops/klass.hpp"
|
||||||
|
|
||||||
// This kind of "BarrierSet" allows a "CollectedHeap" to detect and
|
// This kind of "BarrierSet" allows a "CollectedHeap" to detect and
|
||||||
// enumerate ref fields that have been modified (since the last
|
// enumerate ref fields that have been modified (since the last
|
||||||
|
|
|
@ -214,4 +214,8 @@ ResetNoHandleMark::~ResetNoHandleMark() {
|
||||||
area->_no_handle_mark_nesting = _no_handle_mark_nesting;
|
area->_no_handle_mark_nesting = _no_handle_mark_nesting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool instanceKlassHandle::is_instanceKlass(const Klass* k) {
|
||||||
|
return k->oop_is_instance();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,7 +25,11 @@
|
||||||
#ifndef SHARE_VM_RUNTIME_HANDLES_HPP
|
#ifndef SHARE_VM_RUNTIME_HANDLES_HPP
|
||||||
#define 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
|
// In order to preserve oops during garbage collection, they should be
|
||||||
|
@ -201,16 +205,16 @@ class instanceKlassHandle : public KlassHandle {
|
||||||
/* Constructors */
|
/* Constructors */
|
||||||
instanceKlassHandle () : KlassHandle() {}
|
instanceKlassHandle () : KlassHandle() {}
|
||||||
instanceKlassHandle (const Klass* k) : KlassHandle(k) {
|
instanceKlassHandle (const Klass* k) : KlassHandle(k) {
|
||||||
assert(k == NULL || k->oop_is_instance(),
|
assert(k == NULL || is_instanceKlass(k), "illegal type");
|
||||||
"illegal type");
|
|
||||||
}
|
}
|
||||||
instanceKlassHandle (Thread* thread, const Klass* k) : KlassHandle(thread, k) {
|
instanceKlassHandle (Thread* thread, const Klass* k) : KlassHandle(thread, k) {
|
||||||
assert(k == NULL || k->oop_is_instance(),
|
assert(k == NULL || is_instanceKlass(k), "illegal type");
|
||||||
"illegal type");
|
|
||||||
}
|
}
|
||||||
/* Access to klass part */
|
/* Access to klass part */
|
||||||
InstanceKlass* operator () () const { return (InstanceKlass*)obj(); }
|
InstanceKlass* operator () () const { return (InstanceKlass*)obj(); }
|
||||||
InstanceKlass* operator -> () const { return (InstanceKlass*)obj(); }
|
InstanceKlass* operator -> () const { return (InstanceKlass*)obj(); }
|
||||||
|
|
||||||
|
debug_only(bool is_instanceKlass(const Klass* k));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue