Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index c72ba1f9000371dd2c764b7678b11d2c94abef43..5cc791515bc128b4ab788a9fa3e9bc39efb9817b 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -209,23 +209,21 @@ static MaybeObject* ArrayCodeGenericCommon(Arguments* args, |
MaybeObject* maybe_array = array->Initialize(0); |
if (maybe_array->IsFailure()) return maybe_array; |
- if (FLAG_optimize_constructed_arrays) { |
- AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(array); |
- ElementsKind to_kind = array->GetElementsKind(); |
- if (info != NULL && info->GetElementsKindPayload(&to_kind)) { |
- if (IsMoreGeneralElementsKindTransition(array->GetElementsKind(), |
- to_kind)) { |
- // We have advice that we should change the elements kind |
- if (FLAG_trace_track_allocation_sites) { |
- PrintF("AllocationSiteInfo: pre-transitioning array %p(%s->%s)\n", |
- reinterpret_cast<void*>(array), |
- ElementsKindToString(array->GetElementsKind()), |
- ElementsKindToString(to_kind)); |
- } |
- |
- maybe_array = array->TransitionElementsKind(to_kind); |
- if (maybe_array->IsFailure()) return maybe_array; |
+ AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(array); |
+ ElementsKind to_kind = array->GetElementsKind(); |
+ if (info != NULL && info->GetElementsKindPayload(&to_kind)) { |
+ if (IsMoreGeneralElementsKindTransition(array->GetElementsKind(), |
+ to_kind)) { |
+ // We have advice that we should change the elements kind |
+ if (FLAG_trace_track_allocation_sites) { |
+ PrintF("AllocationSiteInfo: pre-transitioning array %p(%s->%s)\n", |
+ reinterpret_cast<void*>(array), |
+ ElementsKindToString(array->GetElementsKind()), |
+ ElementsKindToString(to_kind)); |
} |
+ |
+ maybe_array = array->TransitionElementsKind(to_kind); |
+ if (maybe_array->IsFailure()) return maybe_array; |
} |
} |