Index: src/heap.cc |
diff --git a/src/heap.cc b/src/heap.cc |
index ff31361866c54fdb004747e94652a56c5eafd473..cd8a03e3a6ddf90af03129d78a17e060f6385927 100644 |
--- a/src/heap.cc |
+++ b/src/heap.cc |
@@ -4361,10 +4361,10 @@ MaybeObject* Heap::AllocateJSArray( |
Context* global_context = isolate()->context()->global_context(); |
JSFunction* array_function = global_context->array_function(); |
Map* map = array_function->initial_map(); |
- if (elements_kind == FAST_ELEMENTS || !FLAG_smi_only_arrays) { |
- map = Map::cast(global_context->object_js_array_map()); |
- } else if (elements_kind == FAST_DOUBLE_ELEMENTS) { |
+ if (elements_kind == FAST_DOUBLE_ELEMENTS) { |
map = Map::cast(global_context->double_js_array_map()); |
+ } else if (elements_kind == FAST_ELEMENTS || !FLAG_smi_only_arrays) { |
+ map = Map::cast(global_context->object_js_array_map()); |
} else { |
ASSERT(elements_kind == FAST_SMI_ONLY_ELEMENTS); |
ASSERT(map == global_context->smi_js_array_map()); |