src/hotspot/share/ci/ciEnv.cpp
changeset 49658 8237a91c1cca
parent 49594 898ef81cbc0e
child 50113 caf115bb98ad
--- a/src/hotspot/share/ci/ciEnv.cpp	Tue Apr 03 10:27:46 2018 +0200
+++ b/src/hotspot/share/ci/ciEnv.cpp	Tue Apr 03 13:15:27 2018 +0200
@@ -541,7 +541,7 @@
     // Calculate accessibility the hard way.
     if (!k->is_loaded()) {
       is_accessible = false;
-    } else if (k->loader() != accessor->loader() &&
+    } else if (!oopDesc::equals(k->loader(), accessor->loader()) &&
                get_klass_by_name_impl(accessor, cpool, k->name(), true) == NULL) {
       // Loaded only remotely.  Not linked yet.
       is_accessible = false;
@@ -592,7 +592,7 @@
     index = cpool->object_to_cp_index(cache_index);
     oop obj = cpool->resolved_references()->obj_at(cache_index);
     if (obj != NULL) {
-      if (obj == Universe::the_null_sentinel()) {
+      if (oopDesc::equals(obj, Universe::the_null_sentinel())) {
         return ciConstant(T_OBJECT, get_object(NULL));
       }
       BasicType bt = T_OBJECT;