hotspot/src/share/vm/ci/ciEnv.cpp
changeset 25325 e3af4e02b0d5
parent 24424 2658d7834c6e
child 25642 9d809ea074d9
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Jun 18 14:21:28 2014 -0700
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Thu Jun 19 11:16:10 2014 -0400
@@ -512,24 +512,9 @@
   } else {
     // Check if it's resolved if it's not a symbol constant pool entry.
     klass = KlassHandle(THREAD, ConstantPool::klass_at_if_loaded(cpool, index));
-
+    // Try to look it up by name.
   if (klass.is_null()) {
-    // The klass has not been inserted into the constant pool.
-    // Try to look it up by name.
-    {
-      // We have to lock the cpool to keep the oop from being resolved
-      // while we are accessing it.
-        MonitorLockerEx ml(cpool->lock());
-      constantTag tag = cpool->tag_at(index);
-      if (tag.is_klass()) {
-        // The klass has been inserted into the constant pool
-        // very recently.
-        klass = KlassHandle(THREAD, cpool->resolved_klass_at(index));
-      } else {
-        assert(cpool->tag_at(index).is_unresolved_klass(), "wrong tag");
-        klass_name = cpool->unresolved_klass_at(index);
-      }
-    }
+      klass_name = cpool->klass_name_at(index);
   }
   }