< prev index next >

src/hotspot/share/opto/type.cpp

Print this page

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

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

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

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