--- a/hotspot/src/share/vm/oops/instanceKlassKlass.cpp Fri Apr 11 09:56:35 2008 -0400
+++ b/hotspot/src/share/vm/oops/instanceKlassKlass.cpp Sun Apr 13 17:43:42 2008 -0400
@@ -286,17 +286,17 @@
ik->copy_static_fields(pm);
oop* loader_addr = ik->adr_class_loader();
- if (PSScavenge::should_scavenge(*loader_addr)) {
+ if (PSScavenge::should_scavenge(loader_addr)) {
pm->claim_or_forward_breadth(loader_addr);
}
oop* pd_addr = ik->adr_protection_domain();
- if (PSScavenge::should_scavenge(*pd_addr)) {
+ if (PSScavenge::should_scavenge(pd_addr)) {
pm->claim_or_forward_breadth(pd_addr);
}
oop* sg_addr = ik->adr_signers();
- if (PSScavenge::should_scavenge(*sg_addr)) {
+ if (PSScavenge::should_scavenge(sg_addr)) {
pm->claim_or_forward_breadth(sg_addr);
}
@@ -309,17 +309,17 @@
ik->push_static_fields(pm);
oop* loader_addr = ik->adr_class_loader();
- if (PSScavenge::should_scavenge(*loader_addr)) {
+ if (PSScavenge::should_scavenge(loader_addr)) {
pm->claim_or_forward_depth(loader_addr);
}
oop* pd_addr = ik->adr_protection_domain();
- if (PSScavenge::should_scavenge(*pd_addr)) {
+ if (PSScavenge::should_scavenge(pd_addr)) {
pm->claim_or_forward_depth(pd_addr);
}
oop* sg_addr = ik->adr_signers();
- if (PSScavenge::should_scavenge(*sg_addr)) {
+ if (PSScavenge::should_scavenge(sg_addr)) {
pm->claim_or_forward_depth(sg_addr);
}
@@ -602,16 +602,18 @@
// Verification
-
class VerifyFieldClosure: public OopClosure {
- public:
- void do_oop(oop* p) {
+ protected:
+ template <class T> void do_oop_work(T* p) {
guarantee(Universe::heap()->is_in(p), "should be in heap");
- guarantee((*p)->is_oop_or_null(), "should be in heap");
+ oop obj = oopDesc::load_decode_heap_oop(p);
+ guarantee(obj->is_oop_or_null(), "should be in heap");
}
+ public:
+ virtual void do_oop(oop* p) { VerifyFieldClosure::do_oop_work(p); }
+ virtual void do_oop(narrowOop* p) { VerifyFieldClosure::do_oop_work(p); }
};
-
void instanceKlassKlass::oop_verify_on(oop obj, outputStream* st) {
klassKlass::oop_verify_on(obj, st);
if (!obj->partially_loaded()) {