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

Unified Diff: src/harmony-array.js

Issue 1065863003: Use array literals instead of array constructor in native javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and fix Created 5 years, 8 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/date.js ('k') | src/harmony-array-includes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-array.js
diff --git a/src/harmony-array.js b/src/harmony-array.js
index 5152a557dd51c50e1527b0e4562da25b4666666b..cdd63be41611c1c17ad85eab60ede0fababa7868 100644
--- a/src/harmony-array.js
+++ b/src/harmony-array.js
@@ -211,10 +211,10 @@ function ArrayOf() {
function HarmonyArrayExtendSymbolPrototype() {
%CheckIsBootstrapping();
- InstallConstants(global.Symbol, $Array(
+ InstallConstants(global.Symbol, [
// TODO(dslomov, caitp): Move to symbol.js when shipping
- "isConcatSpreadable", symbolIsConcatSpreadable
- ));
+ "isConcatSpreadable", symbolIsConcatSpreadable
+ ]);
}
HarmonyArrayExtendSymbolPrototype();
@@ -225,17 +225,17 @@ function HarmonyArrayExtendArrayPrototype() {
%FunctionSetLength(ArrayFrom, 1);
// Set up non-enumerable functions on the Array object.
- InstallFunctions($Array, DONT_ENUM, $Array(
+ InstallFunctions($Array, DONT_ENUM, [
"from", ArrayFrom,
"of", ArrayOf
- ));
+ ]);
// Set up the non-enumerable functions on the Array prototype object.
- InstallFunctions($Array.prototype, DONT_ENUM, $Array(
+ InstallFunctions($Array.prototype, DONT_ENUM, [
"find", ArrayFind,
"findIndex", ArrayFindIndex,
"fill", ArrayFill
- ));
+ ]);
}
HarmonyArrayExtendArrayPrototype();
« no previous file with comments | « src/date.js ('k') | src/harmony-array-includes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698