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