From fcf830142be4a93ae88c71adb935edb06f8966cb Mon Sep 17 00:00:00 2001 From: kvn Date: Mon, 30 Aug 2010 11:02:53 -0700 Subject: [PATCH] 6980978: assert(mt == t->xmeet(this)) failed: meet not commutative Summary: Fix code in TypeAryPtr::xmeet() for constant array. Reviewed-by: never --- src/share/vm/opto/type.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp index a4c282470..284159974 100644 --- a/src/share/vm/opto/type.cpp +++ b/src/share/vm/opto/type.cpp @@ -3369,7 +3369,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const { tary = TypeAry::make(Type::BOTTOM, tary->_size); } } - bool xk; + bool xk = false; switch (tap->ptr()) { case AnyNull: case TopPTR: @@ -3391,9 +3391,10 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const { 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: -- GitLab