2453 // directly manipulates the addresses of oops. Rather, it only has a pointer |
2453 // directly manipulates the addresses of oops. Rather, it only has a pointer |
2454 // to a handle at compile time. This handle is embedded in the generated |
2454 // to a handle at compile time. This handle is embedded in the generated |
2455 // code and dereferenced at the time the nmethod is made. Until that time, |
2455 // code and dereferenced at the time the nmethod is made. Until that time, |
2456 // it is not reasonable to do arithmetic with the addresses of oops (we don't |
2456 // it is not reasonable to do arithmetic with the addresses of oops (we don't |
2457 // have access to the addresses!). This does not seem to currently happen, |
2457 // have access to the addresses!). This does not seem to currently happen, |
2458 // but this assertion here is to help prevent its occurrance. |
2458 // but this assertion here is to help prevent its occurence. |
2459 tty->print_cr("Found oop constant with non-zero offset"); |
2459 tty->print_cr("Found oop constant with non-zero offset"); |
2460 ShouldNotReachHere(); |
2460 ShouldNotReachHere(); |
2461 } |
2461 } |
2462 |
2462 |
2463 return (intptr_t)const_oop()->encoding(); |
2463 return (intptr_t)const_oop()->encoding(); |
2759 case NotNull: |
2759 case NotNull: |
2760 case BotPTR: // Fall down to object klass |
2760 case BotPTR: // Fall down to object klass |
2761 // LCA is object_klass, but if we subclass from the top we can do better |
2761 // LCA is object_klass, but if we subclass from the top we can do better |
2762 if( above_centerline(_ptr) ) { // if( _ptr == TopPTR || _ptr == AnyNull ) |
2762 if( above_centerline(_ptr) ) { // if( _ptr == TopPTR || _ptr == AnyNull ) |
2763 // If 'this' (InstPtr) is above the centerline and it is Object class |
2763 // If 'this' (InstPtr) is above the centerline and it is Object class |
2764 // then we can subclass in the Java class heirarchy. |
2764 // then we can subclass in the Java class hierarchy. |
2765 if (klass()->equals(ciEnv::current()->Object_klass())) { |
2765 if (klass()->equals(ciEnv::current()->Object_klass())) { |
2766 // that is, tp's array type is a subtype of my klass |
2766 // that is, tp's array type is a subtype of my klass |
2767 return TypeAryPtr::make(ptr, tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id); |
2767 return TypeAryPtr::make(ptr, tp->ary(), tp->klass(), tp->klass_is_exact(), offset, instance_id); |
2768 } |
2768 } |
2769 } |
2769 } |
3020 } |
3020 } |
3021 |
3021 |
3022 |
3022 |
3023 //------------------------------xdual------------------------------------------ |
3023 //------------------------------xdual------------------------------------------ |
3024 // Dual: do NOT dual on klasses. This means I do NOT understand the Java |
3024 // Dual: do NOT dual on klasses. This means I do NOT understand the Java |
3025 // inheritence mechanism. |
3025 // inheritance mechanism. |
3026 const Type *TypeInstPtr::xdual() const { |
3026 const Type *TypeInstPtr::xdual() const { |
3027 return new TypeInstPtr( dual_ptr(), klass(), klass_is_exact(), const_oop(), dual_offset(), dual_instance_id() ); |
3027 return new TypeInstPtr( dual_ptr(), klass(), klass_is_exact(), const_oop(), dual_offset(), dual_instance_id() ); |
3028 } |
3028 } |
3029 |
3029 |
3030 //------------------------------eq--------------------------------------------- |
3030 //------------------------------eq--------------------------------------------- |
3174 jint max_hi = max_array_length(elem()->basic_type()); |
3174 jint max_hi = max_array_length(elem()->basic_type()); |
3175 //if (index_not_size) --max_hi; // type of a valid array index, FTR |
3175 //if (index_not_size) --max_hi; // type of a valid array index, FTR |
3176 bool chg = false; |
3176 bool chg = false; |
3177 if (lo < min_lo) { lo = min_lo; chg = true; } |
3177 if (lo < min_lo) { lo = min_lo; chg = true; } |
3178 if (hi > max_hi) { hi = max_hi; chg = true; } |
3178 if (hi > max_hi) { hi = max_hi; chg = true; } |
3179 // Negative length arrays will produce weird intermediate dead fath-path code |
3179 // Negative length arrays will produce weird intermediate dead fast-path code |
3180 if (lo > hi) |
3180 if (lo > hi) |
3181 return TypeInt::ZERO; |
3181 return TypeInt::ZERO; |
3182 if (!chg) |
3182 if (!chg) |
3183 return size; |
3183 return size; |
3184 return TypeInt::make(lo, hi, Type::WidenMin); |
3184 return TypeInt::make(lo, hi, Type::WidenMin); |
3356 case NotNull: |
3356 case NotNull: |
3357 case BotPTR: // Fall down to object klass |
3357 case BotPTR: // Fall down to object klass |
3358 // LCA is object_klass, but if we subclass from the top we can do better |
3358 // LCA is object_klass, but if we subclass from the top we can do better |
3359 if (above_centerline(tp->ptr())) { |
3359 if (above_centerline(tp->ptr())) { |
3360 // If 'tp' is above the centerline and it is Object class |
3360 // If 'tp' is above the centerline and it is Object class |
3361 // then we can subclass in the Java class heirarchy. |
3361 // then we can subclass in the Java class hierarchy. |
3362 if( tp->klass()->equals(ciEnv::current()->Object_klass()) ) { |
3362 if( tp->klass()->equals(ciEnv::current()->Object_klass()) ) { |
3363 // that is, my array type is a subtype of 'tp' klass |
3363 // that is, my array type is a subtype of 'tp' klass |
3364 return make( ptr, _ary, _klass, _klass_is_exact, offset, instance_id ); |
3364 return make( ptr, _ary, _klass, _klass_is_exact, offset, instance_id ); |
3365 } |
3365 } |
3366 } |
3366 } |