Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index a2d4c30a0c1428fec27a625cb86e86628e685b24..70798753bc9d5d24b745c985b44f73ca6a4394ce 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -310,7 +310,13 @@ ElementsKind TypeFeedbackOracle::GetCallNewElementsKind(CallNew* expr) { |
if (info->IsSmi()) { |
return static_cast<ElementsKind>(Smi::cast(*info)->value()); |
} else { |
- return GetInitialFastElementsKind(); |
+ // TODO(mvstanton): avoided calling GetInitialFastElementsKind() for perf |
+ // reasons. Is there a better fix? |
+ if (FLAG_packed_arrays) { |
+ return FAST_SMI_ELEMENTS; |
+ } else { |
+ return FAST_HOLEY_SMI_ELEMENTS; |
+ } |
} |
} |