Index: src/compiler/js-create-lowering.cc |
diff --git a/src/compiler/js-create-lowering.cc b/src/compiler/js-create-lowering.cc |
index 19418c7aad0660a841e0d65fbba74047ffa55d6f..432b5c620b5a15cc9559af1f9d7436ca39ffca8b 100644 |
--- a/src/compiler/js-create-lowering.cc |
+++ b/src/compiler/js-create-lowering.cc |
@@ -1103,17 +1103,7 @@ Node* JSCreateLowering::AllocateElements(Node* effect, Node* control, |
ElementAccess access = IsFastDoubleElementsKind(elements_kind) |
? AccessBuilder::ForFixedDoubleArrayElement() |
: AccessBuilder::ForFixedArrayElement(); |
- Node* value; |
- if (IsFastDoubleElementsKind(elements_kind)) { |
- // Load the hole NaN pattern from the canonical location. |
- value = effect = graph()->NewNode( |
- simplified()->LoadField(AccessBuilder::ForExternalDoubleValue()), |
- jsgraph()->ExternalConstant( |
- ExternalReference::address_of_the_hole_nan()), |
- effect, control); |
- } else { |
- value = jsgraph()->TheHoleConstant(); |
- } |
+ Node* value = jsgraph()->TheHoleConstant(); |
// Actually allocate the backing store. |
AllocationBuilder a(jsgraph(), effect, control); |
@@ -1261,18 +1251,9 @@ Node* JSCreateLowering::AllocateFastLiteralElements( |
if (elements_map->instance_type() == FIXED_DOUBLE_ARRAY_TYPE) { |
Handle<FixedDoubleArray> elements = |
Handle<FixedDoubleArray>::cast(boilerplate_elements); |
- Node* the_hole_value = nullptr; |
for (int i = 0; i < elements_length; ++i) { |
if (elements->is_the_hole(i)) { |
- if (the_hole_value == nullptr) { |
- // Load the hole NaN pattern from the canonical location. |
- the_hole_value = effect = graph()->NewNode( |
- simplified()->LoadField(AccessBuilder::ForExternalDoubleValue()), |
- jsgraph()->ExternalConstant( |
- ExternalReference::address_of_the_hole_nan()), |
- effect, control); |
- } |
- elements_values[i] = the_hole_value; |
+ elements_values[i] = jsgraph()->TheHoleConstant(); |
} else { |
elements_values[i] = jsgraph()->Constant(elements->get_scalar(i)); |
} |