--- old/src/hotspot/share/code/relocInfo.cpp 2018-03-22 16:37:32.796885875 +0100 +++ new/src/hotspot/share/code/relocInfo.cpp 2018-03-22 16:37:32.596885882 +0100 @@ -28,6 +28,7 @@ #include "code/nmethod.hpp" #include "code/relocInfo.hpp" #include "memory/resourceArea.hpp" +#include "oops/compressedOops.inline.hpp" #include "runtime/stubCodeGenerator.hpp" #include "utilities/copy.hpp" #include "oops/oop.inline.hpp" @@ -307,7 +308,7 @@ void Relocation::const_set_data_value(address x) { #ifdef _LP64 if (format() == relocInfo::narrow_oop_in_const) { - *(narrowOop*)addr() = oopDesc::encode_heap_oop((oop) x); + *(narrowOop*)addr() = CompressedOops::encode((oop) x); } else { #endif *(address*)addr() = x; @@ -319,7 +320,7 @@ void Relocation::const_verify_data_value(address x) { #ifdef _LP64 if (format() == relocInfo::narrow_oop_in_const) { - guarantee(*(narrowOop*)addr() == oopDesc::encode_heap_oop((oop) x), "must agree"); + guarantee(*(narrowOop*)addr() == CompressedOops::encode((oop) x), "must agree"); } else { #endif guarantee(*(address*)addr() == x, "must agree");