Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 6f103faabf01081532ad2cbfb46b2db309e82a60..85a974a5a3f24548148a4ebb40b670db7fa3c139 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -2161,9 +2161,8 @@ static inline int NumberCacheHash(Handle<FixedArray> cache, |
if (number->IsSmi()) { |
return Handle<Smi>::cast(number)->value() & mask; |
} else { |
- DoubleRepresentation rep(number->Number()); |
- return |
- (static_cast<int>(rep.bits) ^ static_cast<int>(rep.bits >> 32)) & mask; |
+ int64_t bits = bit_cast<int64_t>(number->Number()); |
+ return (static_cast<int>(bits) ^ static_cast<int>(bits >> 32)) & mask; |
} |
} |