--- a/src/hotspot/share/oops/klass.cpp Fri Mar 23 12:55:39 2018 +0100
+++ b/src/hotspot/share/oops/klass.cpp Thu Mar 15 21:24:10 2018 +0100
@@ -35,6 +35,7 @@
#include "memory/metaspaceShared.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
+#include "oops/compressedOops.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klass.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -569,7 +570,7 @@
oop Klass::archived_java_mirror_raw() {
assert(DumpSharedSpaces, "called only during runtime");
assert(has_raw_archived_mirror(), "must have raw archived mirror");
- return oopDesc::decode_heap_oop(_archived_mirror);
+ return CompressedOops::decode(_archived_mirror);
}
// Used at CDS runtime to get the archived mirror from shared class. Uses GC barrier.
@@ -582,7 +583,7 @@
// No GC barrier
void Klass::set_archived_java_mirror_raw(oop m) {
assert(DumpSharedSpaces, "called only during runtime");
- _archived_mirror = oopDesc::encode_heap_oop(m);
+ _archived_mirror = CompressedOops::encode(m);
}
#endif // INCLUDE_CDS_JAVA_HEAP