Commit bc532e5f authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ic] Fix normalization cache lookup with elements kind

The map in the cache is the LHS, not the RHS.

Change-Id: Idf6b4fafc8c62aea5b8f5f55258241939cf9829d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1667410Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62289}
parent ccf0d802
......@@ -2428,10 +2428,10 @@ bool Map::EquivalentToForNormalization(const Map other,
mode == CLEAR_INOBJECT_PROPERTIES ? 0 : other.GetInObjectProperties();
// Make sure the elements_kind bits are in bit_field2.
DCHECK_EQ(this->elements_kind(), Map::ElementsKindBits::decode(bit_field2()));
int adjusted_bit_field2 =
Map::ElementsKindBits::update(bit_field2(), elements_kind);
int adjusted_other_bit_field2 =
Map::ElementsKindBits::update(other.bit_field2(), elements_kind);
return CheckEquivalent(*this, other) &&
adjusted_bit_field2 == other.bit_field2() &&
bit_field2() == adjusted_other_bit_field2 &&
GetInObjectProperties() == properties &&
JSObject::GetEmbedderFieldCount(*this) ==
JSObject::GetEmbedderFieldCount(other);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment