Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index 6921bb653f8a97c905fcc0800736c5044e6e38d4..85a3fd01766d23aa84f0bee8cfd371e867a56443 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -49,6 +49,7 @@ |
#include "snapshot.h" |
#include "store-buffer.h" |
#include "utils/random-number-generator.h" |
+#include "v8conversions.h" |
#include "v8threads.h" |
#include "v8utils.h" |
#include "vm-state-inl.h" |
@@ -3660,6 +3661,7 @@ Heap::RootListIndex Heap::RootIndexForExternalArrayType( |
} |
} |
+ |
Heap::RootListIndex Heap::RootIndexForEmptyExternalArray( |
ElementsKind elementsKind) { |
switch (elementsKind) { |
@@ -3694,16 +3696,11 @@ ExternalArray* Heap::EmptyExternalArrayForMap(Map* map) { |
} |
- |
- |
MaybeObject* Heap::NumberFromDouble(double value, PretenureFlag pretenure) { |
// We need to distinguish the minus zero value and this cannot be |
// done after conversion to int. Doing this by comparing bit |
// patterns is faster than using fpclassify() et al. |
- static const DoubleRepresentation minus_zero(-0.0); |
- |
- DoubleRepresentation rep(value); |
- if (rep.bits == minus_zero.bits) { |
+ if (IsMinusZero(value)) { |
return AllocateHeapNumber(-0.0, pretenure); |
} |