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

Unified Diff: src/symbol.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/string-iterator.js ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/symbol.js
diff --git a/src/symbol.js b/src/symbol.js
index 7a80815229b8f83e27f639b8084b9540f9e96776..4ea77979c237c85ef15cb663be18ac4cfa127746 100644
--- a/src/symbol.js
+++ b/src/symbol.js
@@ -18,7 +18,6 @@ var $symbolToString;
%CheckIsBootstrapping();
-var GlobalArray = global.Array;
var GlobalObject = global.Object;
var GlobalSymbol = global.Symbol;
@@ -84,7 +83,7 @@ function ObjectGetOwnPropertySymbols(obj) {
%SetCode(GlobalSymbol, SymbolConstructor);
%FunctionSetPrototype(GlobalSymbol, new GlobalObject());
-InstallConstants(GlobalSymbol, GlobalArray(
+InstallConstants(GlobalSymbol, [
// TODO(rossberg): expose when implemented.
// "hasInstance", symbolHasInstance,
// "isConcatSpreadable", symbolIsConcatSpreadable,
@@ -94,26 +93,26 @@ InstallConstants(GlobalSymbol, GlobalArray(
// Move here when shipping
// "toStringTag", symbolToStringTag,
"unscopables", symbolUnscopables
-));
+]);
-InstallFunctions(GlobalSymbol, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalSymbol, DONT_ENUM, [
"for", SymbolFor,
"keyFor", SymbolKeyFor
-));
+]);
%AddNamedProperty(
GlobalSymbol.prototype, "constructor", GlobalSymbol, DONT_ENUM);
%AddNamedProperty(
GlobalSymbol.prototype, symbolToStringTag, "Symbol", DONT_ENUM | READ_ONLY);
-InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, [
"toString", SymbolToString,
"valueOf", SymbolValueOf
-));
+]);
-InstallFunctions(GlobalObject, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalObject, DONT_ENUM, [
"getOwnPropertySymbols", ObjectGetOwnPropertySymbols
-));
+]);
$symbolToString = SymbolToString;
« no previous file with comments | « src/string-iterator.js ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698