541 TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
542 TypePtr::BOTTOM = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
543
544 TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
545 TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
546
547 const Type **fmembar = TypeTuple::fields(0);
548 TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
549
550 const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
551 fsc[0] = TypeInt::CC;
552 fsc[1] = Type::MEMORY;
553 TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
554
555 TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
556 TypeInstPtr::BOTTOM = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass());
557 TypeInstPtr::MIRROR = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
558 TypeInstPtr::MARK = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
559 false, nullptr, oopDesc::mark_offset_in_bytes());
560 TypeInstPtr::KLASS = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
561 false, nullptr, oopDesc::klass_offset_in_bytes());
562 TypeOopPtr::BOTTOM = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
563
564 TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
565
566 TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
567 TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
568
569 TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
570
571 mreg2type[Op_Node] = Type::BOTTOM;
572 mreg2type[Op_Set ] = nullptr;
573 mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
574 mreg2type[Op_RegI] = TypeInt::INT;
575 mreg2type[Op_RegP] = TypePtr::BOTTOM;
576 mreg2type[Op_RegF] = Type::FLOAT;
577 mreg2type[Op_RegD] = Type::DOUBLE;
578 mreg2type[Op_RegL] = TypeLong::LONG;
579 mreg2type[Op_RegFlags] = TypeInt::CC;
580
581 GrowableArray<ciInstanceKlass*> array_interfaces;
3508 int instance_id, const TypePtr* speculative, int inline_depth)
3509 : TypePtr(t, ptr, offset, speculative, inline_depth),
3510 _const_oop(o), _klass(k),
3511 _interfaces(interfaces),
3512 _klass_is_exact(xk),
3513 _is_ptr_to_narrowoop(false),
3514 _is_ptr_to_narrowklass(false),
3515 _is_ptr_to_boxed_value(false),
3516 _instance_id(instance_id) {
3517 #ifdef ASSERT
3518 if (klass() != nullptr && klass()->is_loaded()) {
3519 interfaces->verify_is_loaded();
3520 }
3521 #endif
3522 if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3523 (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3524 _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3525 }
3526 #ifdef _LP64
3527 if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3528 if (_offset == oopDesc::klass_offset_in_bytes()) {
3529 _is_ptr_to_narrowklass = UseCompressedClassPointers;
3530 } else if (klass() == nullptr) {
3531 // Array with unknown body type
3532 assert(this->isa_aryptr(), "only arrays without klass");
3533 _is_ptr_to_narrowoop = UseCompressedOops;
3534 } else if (this->isa_aryptr()) {
3535 _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3536 _offset != arrayOopDesc::length_offset_in_bytes());
3537 } else if (klass()->is_instance_klass()) {
3538 ciInstanceKlass* ik = klass()->as_instance_klass();
3539 if (this->isa_klassptr()) {
3540 // Perm objects don't use compressed references
3541 } else if (_offset == OffsetBot || _offset == OffsetTop) {
3542 // unsafe access
3543 _is_ptr_to_narrowoop = UseCompressedOops;
3544 } else {
3545 assert(this->isa_instptr(), "must be an instance ptr.");
3546
3547 if (klass() == ciEnv::current()->Class_klass() &&
3548 (_offset == java_lang_Class::klass_offset() ||
|
541 TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
542 TypePtr::BOTTOM = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
543
544 TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
545 TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
546
547 const Type **fmembar = TypeTuple::fields(0);
548 TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
549
550 const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
551 fsc[0] = TypeInt::CC;
552 fsc[1] = Type::MEMORY;
553 TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
554
555 TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
556 TypeInstPtr::BOTTOM = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass());
557 TypeInstPtr::MIRROR = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
558 TypeInstPtr::MARK = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
559 false, nullptr, oopDesc::mark_offset_in_bytes());
560 TypeInstPtr::KLASS = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
561 false, nullptr, Type::klass_offset());
562 TypeOopPtr::BOTTOM = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
563
564 TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
565
566 TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
567 TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
568
569 TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
570
571 mreg2type[Op_Node] = Type::BOTTOM;
572 mreg2type[Op_Set ] = nullptr;
573 mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
574 mreg2type[Op_RegI] = TypeInt::INT;
575 mreg2type[Op_RegP] = TypePtr::BOTTOM;
576 mreg2type[Op_RegF] = Type::FLOAT;
577 mreg2type[Op_RegD] = Type::DOUBLE;
578 mreg2type[Op_RegL] = TypeLong::LONG;
579 mreg2type[Op_RegFlags] = TypeInt::CC;
580
581 GrowableArray<ciInstanceKlass*> array_interfaces;
3508 int instance_id, const TypePtr* speculative, int inline_depth)
3509 : TypePtr(t, ptr, offset, speculative, inline_depth),
3510 _const_oop(o), _klass(k),
3511 _interfaces(interfaces),
3512 _klass_is_exact(xk),
3513 _is_ptr_to_narrowoop(false),
3514 _is_ptr_to_narrowklass(false),
3515 _is_ptr_to_boxed_value(false),
3516 _instance_id(instance_id) {
3517 #ifdef ASSERT
3518 if (klass() != nullptr && klass()->is_loaded()) {
3519 interfaces->verify_is_loaded();
3520 }
3521 #endif
3522 if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3523 (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3524 _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3525 }
3526 #ifdef _LP64
3527 if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3528 if (_offset == Type::klass_offset()) {
3529 _is_ptr_to_narrowklass = UseCompressedClassPointers;
3530 } else if (klass() == nullptr) {
3531 // Array with unknown body type
3532 assert(this->isa_aryptr(), "only arrays without klass");
3533 _is_ptr_to_narrowoop = UseCompressedOops;
3534 } else if (this->isa_aryptr()) {
3535 _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3536 _offset != arrayOopDesc::length_offset_in_bytes());
3537 } else if (klass()->is_instance_klass()) {
3538 ciInstanceKlass* ik = klass()->as_instance_klass();
3539 if (this->isa_klassptr()) {
3540 // Perm objects don't use compressed references
3541 } else if (_offset == OffsetBot || _offset == OffsetTop) {
3542 // unsafe access
3543 _is_ptr_to_narrowoop = UseCompressedOops;
3544 } else {
3545 assert(this->isa_instptr(), "must be an instance ptr.");
3546
3547 if (klass() == ciEnv::current()->Class_klass() &&
3548 (_offset == java_lang_Class::klass_offset() ||
|