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

Unified Diff: src/elements.cc

Issue 702243003: Basic array capacity feedback via allocation sites. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 6 years, 1 month 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/builtins.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index abb046725c8a0923e2ccd45aaf9826ebb9eb0453..5f768841bdefb2a903f6adcab80e487855455251 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1843,7 +1843,7 @@ MaybeHandle<Object> ArrayConstructInitializeElements(Handle<JSArray> array,
}
return array;
} else if (len == 0) {
- JSArray::Initialize(array, JSArray::kPreallocatedArrayElements);
+ JSArray::Initialize(array, JSArray::PreallocatedArrayElements());
return array;
}
}
@@ -1856,7 +1856,7 @@ MaybeHandle<Object> ArrayConstructInitializeElements(Handle<JSArray> array,
// Optimize the case where there are no parameters passed.
if (args->length() == 0) {
- JSArray::Initialize(array, JSArray::kPreallocatedArrayElements);
+ JSArray::Initialize(array, JSArray::PreallocatedArrayElements());
return array;
}
« no previous file with comments | « src/builtins.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698