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

Unified Diff: src/collection-iterator.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/collection.js ('k') | src/date.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection-iterator.js
diff --git a/src/collection-iterator.js b/src/collection-iterator.js
index c1a9a2767365cab880dbc1fa212026f69e1ed970..6f944f3c4ab55aa5a538b03af05f931a0e63b2c5 100644
--- a/src/collection-iterator.js
+++ b/src/collection-iterator.js
@@ -70,9 +70,9 @@ function SetUpSetIterator() {
%SetCode(SetIterator, SetIteratorConstructor);
%FunctionSetPrototype(SetIterator, new $Object());
%FunctionSetInstanceClassName(SetIterator, 'Set Iterator');
- InstallFunctions(SetIterator.prototype, DONT_ENUM, $Array(
+ InstallFunctions(SetIterator.prototype, DONT_ENUM, [
'next', SetIteratorNextJS
- ));
+ ]);
%FunctionSetName(SetIteratorSymbolIterator, '[Symbol.iterator]');
%AddNamedProperty(SetIterator.prototype, symbolIterator,
@@ -87,11 +87,11 @@ SetUpSetIterator();
function ExtendSetPrototype() {
%CheckIsBootstrapping();
- InstallFunctions($Set.prototype, DONT_ENUM, $Array(
+ InstallFunctions($Set.prototype, DONT_ENUM, [
'entries', SetEntries,
'keys', SetValues,
'values', SetValues
- ));
+ ]);
%AddNamedProperty($Set.prototype, symbolIterator, SetValues, DONT_ENUM);
}
@@ -169,9 +169,9 @@ function SetUpMapIterator() {
%SetCode(MapIterator, MapIteratorConstructor);
%FunctionSetPrototype(MapIterator, new $Object());
%FunctionSetInstanceClassName(MapIterator, 'Map Iterator');
- InstallFunctions(MapIterator.prototype, DONT_ENUM, $Array(
+ InstallFunctions(MapIterator.prototype, DONT_ENUM, [
'next', MapIteratorNextJS
- ));
+ ]);
%FunctionSetName(MapIteratorSymbolIterator, '[Symbol.iterator]');
%AddNamedProperty(MapIterator.prototype, symbolIterator,
@@ -186,11 +186,11 @@ SetUpMapIterator();
function ExtendMapPrototype() {
%CheckIsBootstrapping();
- InstallFunctions($Map.prototype, DONT_ENUM, $Array(
+ InstallFunctions($Map.prototype, DONT_ENUM, [
'entries', MapEntries,
'keys', MapKeys,
'values', MapValues
- ));
+ ]);
%AddNamedProperty($Map.prototype, symbolIterator, MapEntries, DONT_ENUM);
}
« no previous file with comments | « src/collection.js ('k') | src/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698