1.1 --- a/src/share/vm/opto/type.cpp Thu Feb 25 11:38:50 2010 -0800 1.2 +++ b/src/share/vm/opto/type.cpp Thu Feb 25 15:55:47 2010 -0800 1.3 @@ -2809,7 +2809,8 @@ 1.4 // then we can subclass in the Java class hierarchy. 1.5 if (klass()->equals(ciEnv::current()->Object_klass())) { 1.6 // that is, tp's array type is a subtype of my klass 1.7 - return TypeAryPtr::make(ptr, tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id); 1.8 + return TypeAryPtr::make(ptr, (ptr == Constant ? tp->const_oop() : NULL), 1.9 + tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id); 1.10 } 1.11 } 1.12 // The other case cannot happen, since I cannot be a subtype of an array. 1.13 @@ -3415,7 +3416,8 @@ 1.14 // then we can subclass in the Java class hierarchy. 1.15 if( tp->klass()->equals(ciEnv::current()->Object_klass()) ) { 1.16 // that is, my array type is a subtype of 'tp' klass 1.17 - return make( ptr, _ary, _klass, _klass_is_exact, offset, instance_id ); 1.18 + return make( ptr, (ptr == Constant ? const_oop() : NULL), 1.19 + _ary, _klass, _klass_is_exact, offset, instance_id ); 1.20 } 1.21 } 1.22 // The other case cannot happen, since t cannot be a subtype of an array.