< prev index next >

src/hotspot/share/opto/machnode.cpp

Print this page

374     if (offset == 0) {
375       return nullptr;
376     }
377     // null base, any offset means any pointer whatever
378     if (offset == Type::OffsetBot) {
379       return TypePtr::BOTTOM;
380     }
381     // %%% make offset be intptr_t
382     assert(!Universe::heap()->is_in(cast_to_oop(offset)), "must be a raw ptr");
383     return TypeRawPtr::BOTTOM;
384   }
385 
386   // base of -1 with no particular offset means all of memory
387   if (base == NodeSentinel)  return TypePtr::BOTTOM;
388 
389   const Type* t = base->bottom_type();
390   if (t->isa_narrowoop() && CompressedOops::shift() == 0) {
391     // 32-bit unscaled narrow oop can be the base of any address expression
392     t = t->make_ptr();
393   }
394   if (t->isa_narrowklass() && CompressedKlassPointers::shift() == 0) {
395     // 32-bit unscaled narrow oop can be the base of any address expression
396     t = t->make_ptr();
397   }
398   if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
399     // We cannot assert that the offset does not look oop-ish here.
400     // Depending on the heap layout the cardmark base could land
401     // inside some oopish region.  It definitely does for Win2K.
402     // The sum of cardmark-base plus shift-by-9-oop lands outside
403     // the oop-ish area but we can't assert for that statically.
404     return TypeRawPtr::BOTTOM;
405   }
406 
407   const TypePtr *tp = t->isa_ptr();
408 
409   // be conservative if we do not recognize the type
410   if (tp == nullptr) {
411     assert(false, "this path may produce not optimal code");
412     return TypePtr::BOTTOM;
413   }
414   assert(tp->base() != Type::AnyPtr, "not a bare pointer");

374     if (offset == 0) {
375       return nullptr;
376     }
377     // null base, any offset means any pointer whatever
378     if (offset == Type::OffsetBot) {
379       return TypePtr::BOTTOM;
380     }
381     // %%% make offset be intptr_t
382     assert(!Universe::heap()->is_in(cast_to_oop(offset)), "must be a raw ptr");
383     return TypeRawPtr::BOTTOM;
384   }
385 
386   // base of -1 with no particular offset means all of memory
387   if (base == NodeSentinel)  return TypePtr::BOTTOM;
388 
389   const Type* t = base->bottom_type();
390   if (t->isa_narrowoop() && CompressedOops::shift() == 0) {
391     // 32-bit unscaled narrow oop can be the base of any address expression
392     t = t->make_ptr();
393   }
394   if (t->isa_narrowklass() && UseCompressedClassPointers && CompressedKlassPointers::shift() == 0) {
395     // 32-bit unscaled narrow oop can be the base of any address expression
396     t = t->make_ptr();
397   }
398   if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
399     // We cannot assert that the offset does not look oop-ish here.
400     // Depending on the heap layout the cardmark base could land
401     // inside some oopish region.  It definitely does for Win2K.
402     // The sum of cardmark-base plus shift-by-9-oop lands outside
403     // the oop-ish area but we can't assert for that statically.
404     return TypeRawPtr::BOTTOM;
405   }
406 
407   const TypePtr *tp = t->isa_ptr();
408 
409   // be conservative if we do not recognize the type
410   if (tp == nullptr) {
411     assert(false, "this path may produce not optimal code");
412     return TypePtr::BOTTOM;
413   }
414   assert(tp->base() != Type::AnyPtr, "not a bare pointer");
< prev index next >