зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382745 - Improve the hashing of StackShape, especially on 64-bit systems; r=jandem
This commit is contained in:
Родитель
a34dfc464b
Коммит
8f4879f93e
|
@ -1488,15 +1488,9 @@ struct StackShape
|
||||||
}
|
}
|
||||||
|
|
||||||
HashNumber hash() const {
|
HashNumber hash() const {
|
||||||
HashNumber hash = uintptr_t(base);
|
HashNumber hash = HashId(propid);
|
||||||
|
return mozilla::AddToHash(hash,
|
||||||
/* Accumulate from least to most random so the low bits are most random. */
|
mozilla::HashGeneric(base, attrs, slot_, rawGetter, rawSetter));
|
||||||
hash = mozilla::RotateLeft(hash, 4) ^ attrs;
|
|
||||||
hash = mozilla::RotateLeft(hash, 4) ^ slot_;
|
|
||||||
hash = mozilla::RotateLeft(hash, 4) ^ HashId(propid);
|
|
||||||
hash = mozilla::RotateLeft(hash, 4) ^ uintptr_t(rawGetter);
|
|
||||||
hash = mozilla::RotateLeft(hash, 4) ^ uintptr_t(rawSetter);
|
|
||||||
return hash;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Traceable implementation.
|
// Traceable implementation.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче