@@ -4612,6 +4612,8 @@ bool Heap::SharedHeapContains(Tagged<HeapObject> value) const {
46124612 if (shared_allocation_space_) {
46134613 if (shared_allocation_space_->Contains (value)) return true ;
46144614 if (shared_lo_allocation_space_->Contains (value)) return true ;
4615+ if (shared_trusted_allocation_space_->Contains (value)) return true ;
4616+ if (shared_trusted_lo_allocation_space_->Contains (value)) return true ;
46154617 }
46164618
46174619 return false ;
@@ -4647,6 +4649,8 @@ bool Heap::InSpace(Tagged<HeapObject> value, AllocationSpace space) const {
46474649 return shared_space_->Contains (value);
46484650 case TRUSTED_SPACE:
46494651 return trusted_space_->Contains (value);
4652+ case SHARED_TRUSTED_SPACE:
4653+ return shared_trusted_space_->Contains (value);
46504654 case LO_SPACE:
46514655 return lo_space_->Contains (value);
46524656 case CODE_LO_SPACE:
@@ -4655,6 +4659,8 @@ bool Heap::InSpace(Tagged<HeapObject> value, AllocationSpace space) const {
46554659 return new_lo_space_->Contains (value);
46564660 case SHARED_LO_SPACE:
46574661 return shared_lo_space_->Contains (value);
4662+ case SHARED_TRUSTED_LO_SPACE:
4663+ return shared_trusted_lo_space_->Contains (value);
46584664 case TRUSTED_LO_SPACE:
46594665 return trusted_lo_space_->Contains (value);
46604666 case RO_SPACE:
@@ -4681,6 +4687,8 @@ bool Heap::InSpaceSlow(Address addr, AllocationSpace space) const {
46814687 return shared_space_->ContainsSlow (addr);
46824688 case TRUSTED_SPACE:
46834689 return trusted_space_->ContainsSlow (addr);
4690+ case SHARED_TRUSTED_SPACE:
4691+ return shared_trusted_space_->ContainsSlow (addr);
46844692 case LO_SPACE:
46854693 return lo_space_->ContainsSlow (addr);
46864694 case CODE_LO_SPACE:
@@ -4689,6 +4697,8 @@ bool Heap::InSpaceSlow(Address addr, AllocationSpace space) const {
46894697 return new_lo_space_->ContainsSlow (addr);
46904698 case SHARED_LO_SPACE:
46914699 return shared_lo_space_->ContainsSlow (addr);
4700+ case SHARED_TRUSTED_LO_SPACE:
4701+ return shared_trusted_lo_space_->ContainsSlow (addr);
46924702 case TRUSTED_LO_SPACE:
46934703 return trusted_lo_space_->ContainsSlow (addr);
46944704 case RO_SPACE:
@@ -4708,7 +4718,9 @@ bool Heap::IsValidAllocationSpace(AllocationSpace space) {
47084718 case CODE_LO_SPACE:
47094719 case SHARED_LO_SPACE:
47104720 case TRUSTED_SPACE:
4721+ case SHARED_TRUSTED_SPACE:
47114722 case TRUSTED_LO_SPACE:
4723+ case SHARED_TRUSTED_LO_SPACE:
47124724 case RO_SPACE:
47134725 return true ;
47144726 default :
@@ -5981,24 +5993,36 @@ void Heap::SetUpSpaces(LinearAllocationArea& new_allocation_info,
59815993 code_lo_space_ =
59825994 static_cast <CodeLargeObjectSpace*>(space_[CODE_LO_SPACE].get ());
59835995
5996+ space_[TRUSTED_SPACE] = std::make_unique<TrustedSpace>(this );
5997+ trusted_space_ = static_cast <TrustedSpace*>(space_[TRUSTED_SPACE].get ());
5998+
5999+ space_[TRUSTED_LO_SPACE] = std::make_unique<TrustedLargeObjectSpace>(this );
6000+ trusted_lo_space_ =
6001+ static_cast <TrustedLargeObjectSpace*>(space_[TRUSTED_LO_SPACE].get ());
6002+
59846003 if (isolate ()->is_shared_space_isolate ()) {
59856004 space_[SHARED_LO_SPACE] = std::make_unique<SharedLargeObjectSpace>(this );
59866005 shared_lo_space_ =
59876006 static_cast <SharedLargeObjectSpace*>(space_[SHARED_LO_SPACE].get ());
6007+
6008+ space_[SHARED_TRUSTED_SPACE] = std::make_unique<SharedTrustedSpace>(this );
6009+ shared_trusted_space_ =
6010+ static_cast <SharedTrustedSpace*>(space_[SHARED_TRUSTED_SPACE].get ());
6011+
6012+ space_[SHARED_TRUSTED_LO_SPACE] =
6013+ std::make_unique<SharedTrustedLargeObjectSpace>(this );
6014+ shared_trusted_lo_space_ = static_cast <SharedTrustedLargeObjectSpace*>(
6015+ space_[SHARED_TRUSTED_LO_SPACE].get ());
59886016 }
59896017
59906018 if (isolate ()->has_shared_space ()) {
59916019 Heap* heap = isolate ()->shared_space_isolate ()->heap ();
59926020 shared_allocation_space_ = heap->shared_space_ ;
59936021 shared_lo_allocation_space_ = heap->shared_lo_space_ ;
5994- }
5995-
5996- space_[TRUSTED_SPACE] = std::make_unique<TrustedSpace>(this );
5997- trusted_space_ = static_cast <TrustedSpace*>(space_[TRUSTED_SPACE].get ());
59986022
5999- space_[TRUSTED_LO_SPACE] = std::make_unique<TrustedLargeObjectSpace>( this ) ;
6000- trusted_lo_space_ =
6001- static_cast <TrustedLargeObjectSpace*>(space_[TRUSTED_LO_SPACE]. get ());
6023+ shared_trusted_allocation_space_ = heap-> shared_trusted_space_ ;
6024+ shared_trusted_lo_allocation_space_ = heap-> shared_trusted_lo_space_ ;
6025+ }
60026026
60036027 main_thread_local_heap ()->SetUpMainThread (new_allocation_info,
60046028 old_allocation_info);
@@ -7214,11 +7238,14 @@ bool Heap::AllowedToBeMigrated(Tagged<Map> map, Tagged<HeapObject> obj,
72147238 return dst == SHARED_SPACE;
72157239 case TRUSTED_SPACE:
72167240 return dst == TRUSTED_SPACE;
7241+ case SHARED_TRUSTED_SPACE:
7242+ return dst == SHARED_TRUSTED_SPACE;
72177243 case LO_SPACE:
72187244 case CODE_LO_SPACE:
72197245 case NEW_LO_SPACE:
72207246 case SHARED_LO_SPACE:
72217247 case TRUSTED_LO_SPACE:
7248+ case SHARED_TRUSTED_LO_SPACE:
72227249 case RO_SPACE:
72237250 return false ;
72247251 }
0 commit comments