Index: src/crankshaft/hydrogen-instructions.h |
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h |
index 7ffb2a3a7ba10f1d03f6aa3021986cc58dd5c0c7..b2cbdab5fe108f8f6157edb241a51612b32912ca 100644 |
--- a/src/crankshaft/hydrogen-instructions.h |
+++ b/src/crankshaft/hydrogen-instructions.h |
@@ -3088,11 +3088,8 @@ class HConstant final : public HTemplateInstruction<0> { |
return double_value_; |
} |
uint64_t DoubleValueAsBits() const { |
- uint64_t bits; |
DCHECK(HasDoubleValue()); |
- STATIC_ASSERT(sizeof(bits) == sizeof(double_value_)); |
- std::memcpy(&bits, &double_value_, sizeof(bits)); |
- return bits; |
+ return bit_cast<uint64_t>(double_value_); |
} |
bool IsTheHole() const { |
if (HasDoubleValue() && DoubleValueAsBits() == kHoleNanInt64) { |