6930035: C2 type system incorrectly handles case j.l.Object->meet(constant AryPtr)

Thu, 25 Feb 2010 15:55:47 -0800

author
kvn
date
Thu, 25 Feb 2010 15:55:47 -0800
changeset 1714
2432acbee618
parent 1713
da9559b49b84
child 1715
336c6c200f5f

6930035: C2 type system incorrectly handles case j.l.Object->meet(constant AryPtr)
Summary: Add missing code.
Reviewed-by: never

src/share/vm/opto/type.cpp file | annotate | diff | comparison | revisions
     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.

mercurial