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

Unified Diff: src/string.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/snapshot/serialize.cc ('k') | src/string-iterator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index 0f29cd1dc147ca7c8fc6b24c4d965af32754a734..030d507af3a158453534e26250d55389908b3c24 100644
--- a/src/string.js
+++ b/src/string.js
@@ -10,7 +10,6 @@ var $stringSubstring;
%CheckIsBootstrapping();
-var GlobalArray = global.Array;
var GlobalRegExp = global.RegExp;
var GlobalString = global.String;
@@ -1125,14 +1124,14 @@ function StringRaw(callSite) {
GlobalString.prototype, "constructor", GlobalString, DONT_ENUM);
// Set up the non-enumerable functions on the String object.
-InstallFunctions(GlobalString, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalString, DONT_ENUM, [
"fromCharCode", StringFromCharCode,
"fromCodePoint", StringFromCodePoint,
"raw", StringRaw
-));
+]);
// Set up the non-enumerable functions on the String prototype object.
-InstallFunctions(GlobalString.prototype, DONT_ENUM, GlobalArray(
+InstallFunctions(GlobalString.prototype, DONT_ENUM, [
"valueOf", StringValueOf,
"toString", StringToString,
"charAt", StringCharAtJS,
@@ -1175,7 +1174,7 @@ InstallFunctions(GlobalString.prototype, DONT_ENUM, GlobalArray(
"strike", StringStrike,
"sub", StringSub,
"sup", StringSup
-));
+]);
$stringCharAt = StringCharAtJS;
$stringIndexOf = StringIndexOfJS;
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698