< prev index next >

src/hotspot/share/opto/type.cpp

Print this page

 558   TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
 559   TypePtr::BOTTOM  = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
 560 
 561   TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
 562   TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
 563 
 564   const Type **fmembar = TypeTuple::fields(0);
 565   TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
 566 
 567   const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
 568   fsc[0] = TypeInt::CC;
 569   fsc[1] = Type::MEMORY;
 570   TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
 571 
 572   TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
 573   TypeInstPtr::BOTTOM  = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass());
 574   TypeInstPtr::MIRROR  = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
 575   TypeInstPtr::MARK    = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass(),
 576                                            false, nullptr, oopDesc::mark_offset_in_bytes());
 577   TypeInstPtr::KLASS   = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass(),
 578                                            false, nullptr, oopDesc::klass_offset_in_bytes());
 579   TypeOopPtr::BOTTOM  = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
 580 
 581   TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
 582 
 583   TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
 584   TypeNarrowOop::BOTTOM   = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
 585 
 586   TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
 587 
 588   mreg2type[Op_Node] = Type::BOTTOM;
 589   mreg2type[Op_Set ] = nullptr;
 590   mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
 591   mreg2type[Op_RegI] = TypeInt::INT;
 592   mreg2type[Op_RegP] = TypePtr::BOTTOM;
 593   mreg2type[Op_RegF] = Type::FLOAT;
 594   mreg2type[Op_RegD] = Type::DOUBLE;
 595   mreg2type[Op_RegL] = TypeLong::LONG;
 596   mreg2type[Op_RegFlags] = TypeInt::CC;
 597 
 598   GrowableArray<ciInstanceKlass*> array_interfaces;

3433                        int instance_id, const TypePtr* speculative, int inline_depth)
3434   : TypePtr(t, ptr, offset, speculative, inline_depth),
3435     _const_oop(o), _klass(k),
3436     _interfaces(interfaces),
3437     _klass_is_exact(xk),
3438     _is_ptr_to_narrowoop(false),
3439     _is_ptr_to_narrowklass(false),
3440     _is_ptr_to_boxed_value(false),
3441     _instance_id(instance_id) {
3442 #ifdef ASSERT
3443   if (klass() != nullptr && klass()->is_loaded()) {
3444     interfaces->verify_is_loaded();
3445   }
3446 #endif
3447   if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3448       (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3449     _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3450   }
3451 #ifdef _LP64
3452   if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3453     if (_offset == oopDesc::klass_offset_in_bytes()) {
3454       _is_ptr_to_narrowklass = UseCompressedClassPointers;
3455     } else if (klass() == nullptr) {
3456       // Array with unknown body type
3457       assert(this->isa_aryptr(), "only arrays without klass");
3458       _is_ptr_to_narrowoop = UseCompressedOops;
3459     } else if (this->isa_aryptr()) {
3460       _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3461                              _offset != arrayOopDesc::length_offset_in_bytes());
3462     } else if (klass()->is_instance_klass()) {
3463       ciInstanceKlass* ik = klass()->as_instance_klass();
3464       if (this->isa_klassptr()) {
3465         // Perm objects don't use compressed references
3466       } else if (_offset == OffsetBot || _offset == OffsetTop) {
3467         // unsafe access
3468         _is_ptr_to_narrowoop = UseCompressedOops;
3469       } else {
3470         assert(this->isa_instptr(), "must be an instance ptr.");
3471 
3472         if (klass() == ciEnv::current()->Class_klass() &&
3473             (_offset == java_lang_Class::klass_offset() ||

 558   TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
 559   TypePtr::BOTTOM  = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
 560 
 561   TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
 562   TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
 563 
 564   const Type **fmembar = TypeTuple::fields(0);
 565   TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
 566 
 567   const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
 568   fsc[0] = TypeInt::CC;
 569   fsc[1] = Type::MEMORY;
 570   TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
 571 
 572   TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
 573   TypeInstPtr::BOTTOM  = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass());
 574   TypeInstPtr::MIRROR  = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
 575   TypeInstPtr::MARK    = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass(),
 576                                            false, nullptr, oopDesc::mark_offset_in_bytes());
 577   TypeInstPtr::KLASS   = TypeInstPtr::make(TypePtr::BotPTR,  current->env()->Object_klass(),
 578                                            false, nullptr, Type::klass_offset());
 579   TypeOopPtr::BOTTOM  = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
 580 
 581   TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
 582 
 583   TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
 584   TypeNarrowOop::BOTTOM   = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
 585 
 586   TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
 587 
 588   mreg2type[Op_Node] = Type::BOTTOM;
 589   mreg2type[Op_Set ] = nullptr;
 590   mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
 591   mreg2type[Op_RegI] = TypeInt::INT;
 592   mreg2type[Op_RegP] = TypePtr::BOTTOM;
 593   mreg2type[Op_RegF] = Type::FLOAT;
 594   mreg2type[Op_RegD] = Type::DOUBLE;
 595   mreg2type[Op_RegL] = TypeLong::LONG;
 596   mreg2type[Op_RegFlags] = TypeInt::CC;
 597 
 598   GrowableArray<ciInstanceKlass*> array_interfaces;

3433                        int instance_id, const TypePtr* speculative, int inline_depth)
3434   : TypePtr(t, ptr, offset, speculative, inline_depth),
3435     _const_oop(o), _klass(k),
3436     _interfaces(interfaces),
3437     _klass_is_exact(xk),
3438     _is_ptr_to_narrowoop(false),
3439     _is_ptr_to_narrowklass(false),
3440     _is_ptr_to_boxed_value(false),
3441     _instance_id(instance_id) {
3442 #ifdef ASSERT
3443   if (klass() != nullptr && klass()->is_loaded()) {
3444     interfaces->verify_is_loaded();
3445   }
3446 #endif
3447   if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3448       (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3449     _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3450   }
3451 #ifdef _LP64
3452   if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3453     if (_offset == Type::klass_offset()) {
3454       _is_ptr_to_narrowklass = UseCompressedClassPointers;
3455     } else if (klass() == nullptr) {
3456       // Array with unknown body type
3457       assert(this->isa_aryptr(), "only arrays without klass");
3458       _is_ptr_to_narrowoop = UseCompressedOops;
3459     } else if (this->isa_aryptr()) {
3460       _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3461                              _offset != arrayOopDesc::length_offset_in_bytes());
3462     } else if (klass()->is_instance_klass()) {
3463       ciInstanceKlass* ik = klass()->as_instance_klass();
3464       if (this->isa_klassptr()) {
3465         // Perm objects don't use compressed references
3466       } else if (_offset == OffsetBot || _offset == OffsetTop) {
3467         // unsafe access
3468         _is_ptr_to_narrowoop = UseCompressedOops;
3469       } else {
3470         assert(this->isa_instptr(), "must be an instance ptr.");
3471 
3472         if (klass() == ciEnv::current()->Class_klass() &&
3473             (_offset == java_lang_Class::klass_offset() ||
< prev index next >