comparison src/share/vm/opto/type.cpp @ 1279:2432acbee618

6930035: C2 type system incorrectly handles case j.l.Object->meet(constant AryPtr) Summary: Add missing code. Reviewed-by: never
author kvn
date Thu, 25 Feb 2010 15:55:47 -0800
parents 97125851f396
children 5b29c2368d93
comparison
equal deleted inserted replaced
1278:da9559b49b84 1279:2432acbee618
2807 if( above_centerline(_ptr) ) { // if( _ptr == TopPTR || _ptr == AnyNull ) 2807 if( above_centerline(_ptr) ) { // if( _ptr == TopPTR || _ptr == AnyNull )
2808 // If 'this' (InstPtr) is above the centerline and it is Object class 2808 // If 'this' (InstPtr) is above the centerline and it is Object class
2809 // then we can subclass in the Java class hierarchy. 2809 // then we can subclass in the Java class hierarchy.
2810 if (klass()->equals(ciEnv::current()->Object_klass())) { 2810 if (klass()->equals(ciEnv::current()->Object_klass())) {
2811 // that is, tp's array type is a subtype of my klass 2811 // that is, tp's array type is a subtype of my klass
2812 return TypeAryPtr::make(ptr, tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id); 2812 return TypeAryPtr::make(ptr, (ptr == Constant ? tp->const_oop() : NULL),
2813 tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id);
2813 } 2814 }
2814 } 2815 }
2815 // The other case cannot happen, since I cannot be a subtype of an array. 2816 // The other case cannot happen, since I cannot be a subtype of an array.
2816 // The meet falls down to Object class below centerline. 2817 // The meet falls down to Object class below centerline.
2817 if( ptr == Constant ) 2818 if( ptr == Constant )
3413 if (above_centerline(tp->ptr())) { 3414 if (above_centerline(tp->ptr())) {
3414 // If 'tp' is above the centerline and it is Object class 3415 // If 'tp' is above the centerline and it is Object class
3415 // then we can subclass in the Java class hierarchy. 3416 // then we can subclass in the Java class hierarchy.
3416 if( tp->klass()->equals(ciEnv::current()->Object_klass()) ) { 3417 if( tp->klass()->equals(ciEnv::current()->Object_klass()) ) {
3417 // that is, my array type is a subtype of 'tp' klass 3418 // that is, my array type is a subtype of 'tp' klass
3418 return make( ptr, _ary, _klass, _klass_is_exact, offset, instance_id ); 3419 return make( ptr, (ptr == Constant ? const_oop() : NULL),
3420 _ary, _klass, _klass_is_exact, offset, instance_id );
3419 } 3421 }
3420 } 3422 }
3421 // The other case cannot happen, since t cannot be a subtype of an array. 3423 // The other case cannot happen, since t cannot be a subtype of an array.
3422 // The meet falls down to Object class below centerline. 3424 // The meet falls down to Object class below centerline.
3423 if( ptr == Constant ) 3425 if( ptr == Constant )