6980978: assert(mt == t->xmeet(this)) failed: meet not commutative
authorkvn
Mon, 30 Aug 2010 11:02:53 -0700
changeset 6435 ef0a074fdf62
parent 6434 abf40e412476
child 6436 92ab86f565f8
6980978: assert(mt == t->xmeet(this)) failed: meet not commutative Summary: Fix code in TypeAryPtr::xmeet() for constant array. Reviewed-by: never
hotspot/src/share/vm/opto/type.cpp
--- a/hotspot/src/share/vm/opto/type.cpp	Fri Aug 27 17:35:08 2010 -0700
+++ b/hotspot/src/share/vm/opto/type.cpp	Mon Aug 30 11:02:53 2010 -0700
@@ -3369,7 +3369,7 @@
         tary = TypeAry::make(Type::BOTTOM, tary->_size);
       }
     }
-    bool xk;
+    bool xk = false;
     switch (tap->ptr()) {
     case AnyNull:
     case TopPTR:
@@ -3391,9 +3391,10 @@
         o = tap->const_oop();
         xk = true;
       } else {
-        xk = this->_klass_is_exact;
+        // Only precise for identical arrays
+        xk = this->_klass_is_exact && (klass() == tap->klass());
       }
-      return TypeAryPtr::make( ptr, o, tary, tap->_klass, xk, off, instance_id );
+      return TypeAryPtr::make( ptr, o, tary, lazy_klass, xk, off, instance_id );
     }
     case NotNull:
     case BotPTR: