Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: src/type-info.cc

Issue 11818021: Allocation Info Tracking, continued. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: A partial delta against Toon's previous review Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
« no previous file with comments | « src/runtime.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698