Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index ca83a109915f2b2b3e8560e665ed3a2557492132..77f85b2fcc7a154814d8bd410bbc31e246347028 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -9589,6 +9589,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_MoveArrayContents) { |
if (new_elements->map() == isolate->heap()->fixed_array_map() || |
new_elements->map() == isolate->heap()->fixed_cow_array_map()) { |
maybe_new_map = to->map()->GetFastElementsMap(); |
+ } else if (new_elements->map() == |
+ isolate->heap()->fixed_double_array_map()) { |
+ maybe_new_map = to->map()->GetFastDoubleElementsMap(); |
} else { |
maybe_new_map = to->map()->GetSlowElementsMap(); |
} |
@@ -9676,12 +9679,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArrayKeys) { |
} |
return *isolate->factory()->NewJSArrayWithElements(keys); |
} else { |
- ASSERT(array->HasFastElements()); |
+ ASSERT(array->HasFastElements() || array->HasFastDoubleElements()); |
Handle<FixedArray> single_interval = isolate->factory()->NewFixedArray(2); |
// -1 means start of array. |
single_interval->set(0, Smi::FromInt(-1)); |
+ FixedArrayBase* elements = FixedArrayBase::cast(array->elements()); |
uint32_t actual_length = |
- static_cast<uint32_t>(FixedArray::cast(array->elements())->length()); |
+ static_cast<uint32_t>(elements->length()); |
uint32_t min_length = actual_length < length ? actual_length : length; |
Handle<Object> length_object = |
isolate->factory()->NewNumber(static_cast<double>(min_length)); |