563 TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
564 TypePtr::BOTTOM = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
565
566 TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
567 TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
568
569 const Type **fmembar = TypeTuple::fields(0);
570 TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
571
572 const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
573 fsc[0] = TypeInt::CC;
574 fsc[1] = Type::MEMORY;
575 TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
576
577 TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
578 TypeInstPtr::BOTTOM = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass());
579 TypeInstPtr::MIRROR = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
580 TypeInstPtr::MARK = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
581 false, nullptr, oopDesc::mark_offset_in_bytes());
582 TypeInstPtr::KLASS = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
583 false, nullptr, oopDesc::klass_offset_in_bytes());
584 TypeOopPtr::BOTTOM = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
585
586 TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
587
588 TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
589 TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
590
591 TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
592
593 mreg2type[Op_Node] = Type::BOTTOM;
594 mreg2type[Op_Set ] = nullptr;
595 mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
596 mreg2type[Op_RegI] = TypeInt::INT;
597 mreg2type[Op_RegP] = TypePtr::BOTTOM;
598 mreg2type[Op_RegF] = Type::FLOAT;
599 mreg2type[Op_RegD] = Type::DOUBLE;
600 mreg2type[Op_RegL] = TypeLong::LONG;
601 mreg2type[Op_RegFlags] = TypeInt::CC;
602
603 GrowableArray<ciInstanceKlass*> array_interfaces;
3471 int instance_id, const TypePtr* speculative, int inline_depth)
3472 : TypePtr(t, ptr, offset, speculative, inline_depth),
3473 _const_oop(o), _klass(k),
3474 _interfaces(interfaces),
3475 _klass_is_exact(xk),
3476 _is_ptr_to_narrowoop(false),
3477 _is_ptr_to_narrowklass(false),
3478 _is_ptr_to_boxed_value(false),
3479 _instance_id(instance_id) {
3480 #ifdef ASSERT
3481 if (klass() != nullptr && klass()->is_loaded()) {
3482 interfaces->verify_is_loaded();
3483 }
3484 #endif
3485 if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3486 (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3487 _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3488 }
3489 #ifdef _LP64
3490 if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3491 if (_offset == oopDesc::klass_offset_in_bytes()) {
3492 _is_ptr_to_narrowklass = UseCompressedClassPointers;
3493 } else if (klass() == nullptr) {
3494 // Array with unknown body type
3495 assert(this->isa_aryptr(), "only arrays without klass");
3496 _is_ptr_to_narrowoop = UseCompressedOops;
3497 } else if (this->isa_aryptr()) {
3498 _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3499 _offset != arrayOopDesc::length_offset_in_bytes());
3500 } else if (klass()->is_instance_klass()) {
3501 ciInstanceKlass* ik = klass()->as_instance_klass();
3502 if (this->isa_klassptr()) {
3503 // Perm objects don't use compressed references
3504 } else if (_offset == OffsetBot || _offset == OffsetTop) {
3505 // unsafe access
3506 _is_ptr_to_narrowoop = UseCompressedOops;
3507 } else {
3508 assert(this->isa_instptr(), "must be an instance ptr.");
3509
3510 if (klass() == ciEnv::current()->Class_klass() &&
3511 (_offset == java_lang_Class::klass_offset() ||
|
563 TypePtr::NOTNULL = TypePtr::make(AnyPtr, TypePtr::NotNull, OffsetBot);
564 TypePtr::BOTTOM = TypePtr::make(AnyPtr, TypePtr::BotPTR, OffsetBot);
565
566 TypeRawPtr::BOTTOM = TypeRawPtr::make( TypePtr::BotPTR );
567 TypeRawPtr::NOTNULL= TypeRawPtr::make( TypePtr::NotNull );
568
569 const Type **fmembar = TypeTuple::fields(0);
570 TypeTuple::MEMBAR = TypeTuple::make(TypeFunc::Parms+0, fmembar);
571
572 const Type **fsc = (const Type**)shared_type_arena->AmallocWords(2*sizeof(Type*));
573 fsc[0] = TypeInt::CC;
574 fsc[1] = Type::MEMORY;
575 TypeTuple::STORECONDITIONAL = TypeTuple::make(2, fsc);
576
577 TypeInstPtr::NOTNULL = TypeInstPtr::make(TypePtr::NotNull, current->env()->Object_klass());
578 TypeInstPtr::BOTTOM = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass());
579 TypeInstPtr::MIRROR = TypeInstPtr::make(TypePtr::NotNull, current->env()->Class_klass());
580 TypeInstPtr::MARK = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
581 false, nullptr, oopDesc::mark_offset_in_bytes());
582 TypeInstPtr::KLASS = TypeInstPtr::make(TypePtr::BotPTR, current->env()->Object_klass(),
583 false, nullptr, Type::klass_offset());
584 TypeOopPtr::BOTTOM = TypeOopPtr::make(TypePtr::BotPTR, OffsetBot, TypeOopPtr::InstanceBot);
585
586 TypeMetadataPtr::BOTTOM = TypeMetadataPtr::make(TypePtr::BotPTR, nullptr, OffsetBot);
587
588 TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
589 TypeNarrowOop::BOTTOM = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
590
591 TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
592
593 mreg2type[Op_Node] = Type::BOTTOM;
594 mreg2type[Op_Set ] = nullptr;
595 mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
596 mreg2type[Op_RegI] = TypeInt::INT;
597 mreg2type[Op_RegP] = TypePtr::BOTTOM;
598 mreg2type[Op_RegF] = Type::FLOAT;
599 mreg2type[Op_RegD] = Type::DOUBLE;
600 mreg2type[Op_RegL] = TypeLong::LONG;
601 mreg2type[Op_RegFlags] = TypeInt::CC;
602
603 GrowableArray<ciInstanceKlass*> array_interfaces;
3471 int instance_id, const TypePtr* speculative, int inline_depth)
3472 : TypePtr(t, ptr, offset, speculative, inline_depth),
3473 _const_oop(o), _klass(k),
3474 _interfaces(interfaces),
3475 _klass_is_exact(xk),
3476 _is_ptr_to_narrowoop(false),
3477 _is_ptr_to_narrowklass(false),
3478 _is_ptr_to_boxed_value(false),
3479 _instance_id(instance_id) {
3480 #ifdef ASSERT
3481 if (klass() != nullptr && klass()->is_loaded()) {
3482 interfaces->verify_is_loaded();
3483 }
3484 #endif
3485 if (Compile::current()->eliminate_boxing() && (t == InstPtr) &&
3486 (offset > 0) && xk && (k != nullptr) && k->is_instance_klass()) {
3487 _is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
3488 }
3489 #ifdef _LP64
3490 if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
3491 if (_offset == Type::klass_offset()) {
3492 _is_ptr_to_narrowklass = UseCompressedClassPointers;
3493 } else if (klass() == nullptr) {
3494 // Array with unknown body type
3495 assert(this->isa_aryptr(), "only arrays without klass");
3496 _is_ptr_to_narrowoop = UseCompressedOops;
3497 } else if (this->isa_aryptr()) {
3498 _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
3499 _offset != arrayOopDesc::length_offset_in_bytes());
3500 } else if (klass()->is_instance_klass()) {
3501 ciInstanceKlass* ik = klass()->as_instance_klass();
3502 if (this->isa_klassptr()) {
3503 // Perm objects don't use compressed references
3504 } else if (_offset == OffsetBot || _offset == OffsetTop) {
3505 // unsafe access
3506 _is_ptr_to_narrowoop = UseCompressedOops;
3507 } else {
3508 assert(this->isa_instptr(), "must be an instance ptr.");
3509
3510 if (klass() == ciEnv::current()->Class_klass() &&
3511 (_offset == java_lang_Class::klass_offset() ||
|