8007923: Tests on references fails
authortwisti
Tue, 08 Oct 2013 19:57:28 -0700
changeset 20698 32791aebf1a4
parent 20697 2a5211252a04
child 20700 fce01c85d004
8007923: Tests on references fails Reviewed-by: kvn, iveresov
hotspot/src/share/vm/ci/ciKlass.cpp
hotspot/src/share/vm/opto/escape.cpp
--- a/hotspot/src/share/vm/ci/ciKlass.cpp	Tue Oct 08 07:08:27 2013 -0700
+++ b/hotspot/src/share/vm/ci/ciKlass.cpp	Tue Oct 08 19:57:28 2013 -0700
@@ -66,7 +66,9 @@
 // ------------------------------------------------------------------
 // ciKlass::is_subtype_of
 bool ciKlass::is_subtype_of(ciKlass* that) {
-  assert(is_loaded() && that->is_loaded(), "must be loaded");
+  assert(this->is_loaded(), err_msg("must be loaded: %s", this->name()->as_quoted_ascii()));
+  assert(that->is_loaded(), err_msg("must be loaded: %s", that->name()->as_quoted_ascii()));
+
   // Check to see if the klasses are identical.
   if (this == that) {
     return true;
@@ -83,8 +85,8 @@
 // ------------------------------------------------------------------
 // ciKlass::is_subclass_of
 bool ciKlass::is_subclass_of(ciKlass* that) {
-  assert(is_loaded() && that->is_loaded(), "must be loaded");
-  // Check to see if the klasses are identical.
+  assert(this->is_loaded(), err_msg("must be loaded: %s", this->name()->as_quoted_ascii()));
+  assert(that->is_loaded(), err_msg("must be loaded: %s", that->name()->as_quoted_ascii()));
 
   VM_ENTRY_MARK;
   Klass* this_klass = get_Klass();
--- a/hotspot/src/share/vm/opto/escape.cpp	Tue Oct 08 07:08:27 2013 -0700
+++ b/hotspot/src/share/vm/opto/escape.cpp	Tue Oct 08 19:57:28 2013 -0700
@@ -780,6 +780,7 @@
       }
     } else {  // Allocate instance
       if (cik->is_subclass_of(_compile->env()->Thread_klass()) ||
+          cik->is_subclass_of(_compile->env()->Reference_klass()) ||
          !cik->is_instance_klass() || // StressReflectiveCode
           cik->as_instance_klass()->has_finalizer()) {
         es = PointsToNode::GlobalEscape;