зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1452491 - Split uint64_t in IonCompilationId in two 32-bit integers to avoid 8-byte alignment. r=tcampbell
This commit is contained in:
Родитель
a5e0f37fb5
Коммит
78177eb809
|
@ -1106,17 +1106,21 @@ ClassCanHaveExtraProperties(const Class* clasp);
|
|||
// constraints for IonScripts that have been invalidated/destroyed.
|
||||
class IonCompilationId
|
||||
{
|
||||
uint64_t id_;
|
||||
// Use two 32-bit integers instead of uint64_t to avoid 8-byte alignment on
|
||||
// some 32-bit platforms.
|
||||
uint32_t idLo_;
|
||||
uint32_t idHi_;
|
||||
|
||||
public:
|
||||
explicit IonCompilationId(uint64_t id)
|
||||
: id_(id)
|
||||
: idLo_(id & UINT32_MAX),
|
||||
idHi_(id >> 32)
|
||||
{}
|
||||
bool operator==(const IonCompilationId& other) const {
|
||||
return id_ == other.id_;
|
||||
return idLo_ == other.idLo_ && idHi_ == other.idHi_;
|
||||
}
|
||||
bool operator!=(const IonCompilationId& other) const {
|
||||
return id_ != other.id_;
|
||||
return !operator==(other);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче