@@ -1754,12 +1754,13 @@ TNode<IntPtrT> CodeStubAssembler::LoadJSReceiverIdentityHash(
17541754 return var_hash.value();
17551755}
17561756
1757- TNode<Uint32T> CodeStubAssembler::LoadNameHashField (SloppyTNode<Name> name) {
1758- CSA_ASSERT (this , IsName (name));
1759- return LoadObjectField<Uint32T>(name, Name::kHashFieldOffset );
1757+ TNode<Uint32T> CodeStubAssembler::LoadNameHashAssumeComputed(TNode<Name> name) {
1758+ TNode<Uint32T> hash_field = LoadNameHashField(name);
1759+ CSA_ASSERT(this, IsClearWord32(hash_field, Name::kHashNotComputedMask));
1760+ return Unsigned(Word32Shr(hash_field, Int32Constant(Name::kHashShift)));
17601761}
17611762
1762- TNode<Uint32T> CodeStubAssembler::LoadNameHash (SloppyTNode <Name> name,
1763+ TNode<Uint32T> CodeStubAssembler::LoadNameHash(TNode <Name> name,
17631764 Label* if_hash_not_computed) {
17641765 TNode<Uint32T> hash_field = LoadNameHashField(name);
17651766 if (if_hash_not_computed != nullptr) {
@@ -1947,13 +1948,13 @@ TNode<T> CodeStubAssembler::LoadArrayElement(TNode<Array> array,
19471948 }
19481949}
19491950
1950- template TNode<MaybeObject>
1951+ template V8_EXPORT_PRIVATE TNode<MaybeObject>
19511952CodeStubAssembler::LoadArrayElement<TransitionArray>(TNode<TransitionArray>,
19521953 int, Node*, int,
19531954 ParameterMode,
19541955 LoadSensitivity);
19551956
1956- template TNode<MaybeObject>
1957+ template V8_EXPORT_PRIVATE TNode<MaybeObject>
19571958CodeStubAssembler::LoadArrayElement<DescriptorArray>(TNode<DescriptorArray>,
19581959 int, Node*, int,
19591960 ParameterMode,
@@ -7967,7 +7968,7 @@ void CodeStubAssembler::LookupBinary(TNode<Name> unique_name,
79677968 TNode<Uint32T> limit =
79687969 Unsigned(Int32Sub(NumberOfEntries<Array>(array), Int32Constant(1)));
79697970 TVARIABLE(Uint32T, var_high, limit);
7970- TNode<Uint32T> hash = LoadNameHashField (unique_name);
7971+ TNode<Uint32T> hash = LoadNameHashAssumeComputed (unique_name);
79717972 CSA_ASSERT(this, Word32NotEqual(hash, Int32Constant(0)));
79727973
79737974 // Assume non-empty array.
@@ -7985,7 +7986,7 @@ void CodeStubAssembler::LookupBinary(TNode<Name> unique_name,
79857986 TNode<Uint32T> sorted_key_index = GetSortedKeyIndex<Array>(array, mid);
79867987 TNode<Name> mid_name = GetKey<Array>(array, sorted_key_index);
79877988
7988- TNode<Uint32T> mid_hash = LoadNameHashField (mid_name);
7989+ TNode<Uint32T> mid_hash = LoadNameHashAssumeComputed (mid_name);
79897990
79907991 Label mid_greater(this), mid_less(this), merge(this);
79917992 Branch(Uint32GreaterThanOrEqual(mid_hash, hash), &mid_greater, &mid_less);
@@ -8012,7 +8013,7 @@ void CodeStubAssembler::LookupBinary(TNode<Name> unique_name,
80128013 TNode<Uint32T> sort_index =
80138014 GetSortedKeyIndex<Array>(array, var_low.value());
80148015 TNode<Name> current_name = GetKey<Array>(array, sort_index);
8015- TNode<Uint32T> current_hash = LoadNameHashField (current_name);
8016+ TNode<Uint32T> current_hash = LoadNameHashAssumeComputed (current_name);
80168017 GotoIf(Word32NotEqual(current_hash, hash), if_not_found);
80178018 Label next(this);
80188019 GotoIf(TaggedNotEqual(current_name, unique_name), &next);
0 commit comments