< prev index next >

src/hotspot/share/opto/type.cpp

Print this page

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

3690                        int instance_id, const TypePtr* speculative, int inline_depth)
3691   : TypePtr(t, ptr, offset, speculative, inline_depth),
3692     _const_oop(o), _klass(k),
3693     _interfaces(interfaces),
3694     _klass_is_exact(xk),
3695     _is_ptr_to_narrowoop(false),
3696     _is_ptr_to_narrowklass(false),
3697     _is_ptr_to_boxed_value(false),
3698     _instance_id(instance_id) {
3699 #ifdef ASSERT
3700   if (klass() != nullptr && klass()->is_loaded()) {
3701     interfaces->verify_is_loaded();
3702   }
3703 #endif
3704   if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3705       (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3706     _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3707   }
3708 #ifdef _LP64
3709   if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3710     if (_offset == oopDesc::klass_offset_in_bytes()) {
3711       _is_ptr_to_narrowklass = UseCompressedClassPointers;
3712     } else if (klass() == nullptr) {
3713       // Array with unknown body type
3714       assert(this->isa_aryptr(), "only arrays without klass");
3715       _is_ptr_to_narrowoop = UseCompressedOops;
3716     } else if (this->isa_aryptr()) {
3717       _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3718                              _offset != arrayOopDesc::length_offset_in_bytes());
3719     } else if (klass()->is_instance_klass()) {
3720       ciInstanceKlass* ik = klass()->as_instance_klass();
3721       if (this->isa_klassptr()) {
3722         // Perm objects don't use compressed references
3723       } else if (_offset == OffsetBot || _offset == OffsetTop) {
3724         // unsafe access
3725         _is_ptr_to_narrowoop = UseCompressedOops;
3726       } else {
3727         assert(this->isa_instptr(), "must be an instance ptr.");
3728 
3729         if (klass() == ciEnv::current()->Class_klass() &&
3730             (_offset == java_lang_Class::klass_offset() ||

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

3690                        int instance_id, const TypePtr* speculative, int inline_depth)
3691   : TypePtr(t, ptr, offset, speculative, inline_depth),
3692     _const_oop(o), _klass(k),
3693     _interfaces(interfaces),
3694     _klass_is_exact(xk),
3695     _is_ptr_to_narrowoop(false),
3696     _is_ptr_to_narrowklass(false),
3697     _is_ptr_to_boxed_value(false),
3698     _instance_id(instance_id) {
3699 #ifdef ASSERT
3700   if (klass() != nullptr && klass()->is_loaded()) {
3701     interfaces->verify_is_loaded();
3702   }
3703 #endif
3704   if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3705       (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3706     _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3707   }
3708 #ifdef _LP64
3709   if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3710     if (_offset == Type::klass_offset()) {
3711       _is_ptr_to_narrowklass = UseCompressedClassPointers;
3712     } else if (klass() == nullptr) {
3713       // Array with unknown body type
3714       assert(this->isa_aryptr(), "only arrays without klass");
3715       _is_ptr_to_narrowoop = UseCompressedOops;
3716     } else if (this->isa_aryptr()) {
3717       _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3718                              _offset != arrayOopDesc::length_offset_in_bytes());
3719     } else if (klass()->is_instance_klass()) {
3720       ciInstanceKlass* ik = klass()->as_instance_klass();
3721       if (this->isa_klassptr()) {
3722         // Perm objects don't use compressed references
3723       } else if (_offset == OffsetBot || _offset == OffsetTop) {
3724         // unsafe access
3725         _is_ptr_to_narrowoop = UseCompressedOops;
3726       } else {
3727         assert(this->isa_instptr(), "must be an instance ptr.");
3728 
3729         if (klass() == ciEnv::current()->Class_klass() &&
3730             (_offset == java_lang_Class::klass_offset() ||
< prev index next >