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

Unified Diff: src/messages.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/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index e366b9bbc1f74c53ab3883936040c4c4bf188a49..8ac1aa11c5d3b6377c048ae42f31ddba9d68cff2 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -614,10 +614,15 @@ function ScriptNameOrSourceURL() {
}
-SetUpLockedPrototype(Script,
- $Array("source", "name", "source_url", "source_mapping_url", "line_ends",
- "line_offset", "column_offset"),
- $Array(
+SetUpLockedPrototype(Script, [
+ "source",
+ "name",
+ "source_url",
+ "source_mapping_url",
+ "line_ends",
+ "line_offset",
+ "column_offset"
+ ], [
"lineFromPosition", ScriptLineFromPosition,
"locationFromPosition", ScriptLocationFromPosition,
"locationFromLine", ScriptLocationFromLine,
@@ -625,7 +630,7 @@ SetUpLockedPrototype(Script,
"sourceLine", ScriptSourceLine,
"lineCount", ScriptLineCount,
"nameOrSourceURL", ScriptNameOrSourceURL
- )
+ ]
);
@@ -674,10 +679,8 @@ function SourceLocationSourceText() {
SetUpLockedPrototype(SourceLocation,
- $Array("script", "position", "line", "column", "start", "end"),
- $Array(
- "sourceText", SourceLocationSourceText
- )
+ ["script", "position", "line", "column", "start", "end"],
+ ["sourceText", SourceLocationSourceText]
);
@@ -720,8 +723,8 @@ function SourceSliceSourceText() {
}
SetUpLockedPrototype(SourceSlice,
- $Array("script", "from_line", "to_line", "from_position", "to_position"),
- $Array("sourceText", SourceSliceSourceText)
+ ["script", "from_line", "to_line", "from_position", "to_position"],
+ ["sourceText", SourceSliceSourceText]
);
@@ -952,7 +955,7 @@ function CallSiteToString() {
return line;
}
-SetUpLockedPrototype(CallSite, $Array("receiver", "fun", "pos"), $Array(
+SetUpLockedPrototype(CallSite, ["receiver", "fun", "pos"], [
"getThis", CallSiteGetThis,
"getTypeName", CallSiteGetTypeName,
"isToplevel", CallSiteIsToplevel,
@@ -969,7 +972,7 @@ SetUpLockedPrototype(CallSite, $Array("receiver", "fun", "pos"), $Array(
"getPosition", CallSiteGetPosition,
"isConstructor", CallSiteIsConstructor,
"toString", CallSiteToString
-));
+]);
function FormatEvalOrigin(script) {
« no previous file with comments | « src/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698