comparison src/share/vm/opto/type.cpp @ 2354:83f08886981c

7026631: field _klass is incorrectly set for dual type of TypeAryPtr::OOPS Summary: add missing check this->dual() != TypeAryPtr::OOPS into TypeAryPtr::klass(). Reviewed-by: never
author kvn
date Fri, 11 Mar 2011 07:50:51 -0800
parents 8e72cd29b15d
children c7f3d0b4570f
comparison
equal deleted inserted replaced
2353:1c0cf339481b 2354:83f08886981c
3779 if( _klass ) return _klass; // Return cached value, if possible 3779 if( _klass ) return _klass; // Return cached value, if possible
3780 3780
3781 // Oops, need to compute _klass and cache it 3781 // Oops, need to compute _klass and cache it
3782 ciKlass* k_ary = compute_klass(); 3782 ciKlass* k_ary = compute_klass();
3783 3783
3784 if( this != TypeAryPtr::OOPS ) { 3784 if( this != TypeAryPtr::OOPS && this->dual() != TypeAryPtr::OOPS ) {
3785 // The _klass field acts as a cache of the underlying 3785 // The _klass field acts as a cache of the underlying
3786 // ciKlass for this array type. In order to set the field, 3786 // ciKlass for this array type. In order to set the field,
3787 // we need to cast away const-ness. 3787 // we need to cast away const-ness.
3788 // 3788 //
3789 // IMPORTANT NOTE: we *never* set the _klass field for the 3789 // IMPORTANT NOTE: we *never* set the _klass field for the