src/share/vm/opto/type.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/type.cpp

Print this page
rev 5645 : imported patch typefixes
rev 5647 : 8027571: fatal error: meet not symmetric
Summary: meet of one constant array and one exact array not symmetric.
Reviewed-by:


3813     PTR ptr = meet_ptr(tap->ptr());
3814     int instance_id = meet_instance_id(tap->instance_id());
3815     const TypeOopPtr* speculative = meet_speculative(tap);
3816     ciKlass* lazy_klass = NULL;
3817     if (tary->_elem->isa_int()) {
3818       // Integral array element types have irrelevant lattice relations.
3819       // It is the klass that determines array layout, not the element type.
3820       if (_klass == NULL)
3821         lazy_klass = tap->_klass;
3822       else if (tap->_klass == NULL || tap->_klass == _klass) {
3823         lazy_klass = _klass;
3824       } else {
3825         // Something like byte[int+] meets char[int+].
3826         // This must fall to bottom, not (int[-128..65535])[int+].
3827         instance_id = InstanceBot;
3828         tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
3829       }
3830     } else // Non integral arrays.
3831     // Must fall to bottom if exact klasses in upper lattice
3832     // are not equal or super klass is exact.
3833     if ( above_centerline(ptr) && klass() != tap->klass() &&
3834          // meet with top[] and bottom[] are processed further down:
3835          tap ->_klass != NULL  && this->_klass != NULL   &&
3836          // both are exact and not equal:
3837         ((tap ->_klass_is_exact && this->_klass_is_exact) ||
3838          // 'tap'  is exact and super or unrelated:
3839          (tap ->_klass_is_exact && !tap->klass()->is_subtype_of(klass())) ||
3840          // 'this' is exact and super or unrelated:
3841          (this->_klass_is_exact && !klass()->is_subtype_of(tap->klass())))) {
3842       tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
3843       return make(NotNull, NULL, tary, lazy_klass, false, off, InstanceBot);
3844     }
3845 
3846     bool xk = false;
3847     switch (tap->ptr()) {
3848     case AnyNull:
3849     case TopPTR:
3850       // Compute new klass on demand, do not use tap->_klass
3851       if (below_centerline(this->_ptr)) {
3852         xk = this->_klass_is_exact;
3853       } else {




3813     PTR ptr = meet_ptr(tap->ptr());
3814     int instance_id = meet_instance_id(tap->instance_id());
3815     const TypeOopPtr* speculative = meet_speculative(tap);
3816     ciKlass* lazy_klass = NULL;
3817     if (tary->_elem->isa_int()) {
3818       // Integral array element types have irrelevant lattice relations.
3819       // It is the klass that determines array layout, not the element type.
3820       if (_klass == NULL)
3821         lazy_klass = tap->_klass;
3822       else if (tap->_klass == NULL || tap->_klass == _klass) {
3823         lazy_klass = _klass;
3824       } else {
3825         // Something like byte[int+] meets char[int+].
3826         // This must fall to bottom, not (int[-128..65535])[int+].
3827         instance_id = InstanceBot;
3828         tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
3829       }
3830     } else // Non integral arrays.
3831     // Must fall to bottom if exact klasses in upper lattice
3832     // are not equal or super klass is exact.
3833       if ((above_centerline(ptr) || ptr == Constant) && klass() != tap->klass() &&
3834           // meet with top[] and bottom[] are processed further down:
3835           tap ->_klass != NULL  && this->_klass != NULL   &&
3836           // both are exact and not equal:
3837           ((tap ->_klass_is_exact && this->_klass_is_exact) ||
3838            // 'tap'  is exact and super or unrelated:
3839            (tap ->_klass_is_exact && !tap->klass()->is_subtype_of(klass())) ||
3840            // 'this' is exact and super or unrelated:
3841            (this->_klass_is_exact && !klass()->is_subtype_of(tap->klass())))) {
3842       tary = TypeAry::make(Type::BOTTOM, tary->_size, tary->_stable);
3843       return make(NotNull, NULL, tary, lazy_klass, false, off, InstanceBot);
3844     }
3845 
3846     bool xk = false;
3847     switch (tap->ptr()) {
3848     case AnyNull:
3849     case TopPTR:
3850       // Compute new klass on demand, do not use tap->_klass
3851       if (below_centerline(this->_ptr)) {
3852         xk = this->_klass_is_exact;
3853       } else {


src/share/vm/opto/type.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File