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

Unified Diff: src/typedarray.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/third_party/fdlibm/fdlibm.js ('k') | src/uri.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index ac7e6c8520e1674ed8e443c0f659df37e746bc5b..1faa051cce7bda0b1dc5b4eeaaa43f7ccacabbea 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -322,10 +322,10 @@ macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE)
DONT_ENUM | DONT_DELETE);
InstallGetter(global.NAME.prototype, symbolToStringTag,
TypedArrayGetToStringTag);
- InstallFunctions(global.NAME.prototype, DONT_ENUM, $Array(
- "subarray", NAMESubArray,
- "set", TypedArraySet
- ));
+ InstallFunctions(global.NAME.prototype, DONT_ENUM, [
+ "subarray", NAMESubArray,
+ "set", TypedArraySet
+ ]);
endmacro
TYPED_ARRAYS(SETUP_TYPED_ARRAY)
@@ -455,31 +455,31 @@ function SetupDataView() {
InstallGetter($DataView.prototype, "byteOffset", DataViewGetByteOffset);
InstallGetter($DataView.prototype, "byteLength", DataViewGetByteLength);
- InstallFunctions($DataView.prototype, DONT_ENUM, $Array(
- "getInt8", DataViewGetInt8JS,
- "setInt8", DataViewSetInt8JS,
+ InstallFunctions($DataView.prototype, DONT_ENUM, [
+ "getInt8", DataViewGetInt8JS,
+ "setInt8", DataViewSetInt8JS,
- "getUint8", DataViewGetUint8JS,
- "setUint8", DataViewSetUint8JS,
+ "getUint8", DataViewGetUint8JS,
+ "setUint8", DataViewSetUint8JS,
- "getInt16", DataViewGetInt16JS,
- "setInt16", DataViewSetInt16JS,
+ "getInt16", DataViewGetInt16JS,
+ "setInt16", DataViewSetInt16JS,
- "getUint16", DataViewGetUint16JS,
- "setUint16", DataViewSetUint16JS,
+ "getUint16", DataViewGetUint16JS,
+ "setUint16", DataViewSetUint16JS,
- "getInt32", DataViewGetInt32JS,
- "setInt32", DataViewSetInt32JS,
+ "getInt32", DataViewGetInt32JS,
+ "setInt32", DataViewSetInt32JS,
- "getUint32", DataViewGetUint32JS,
- "setUint32", DataViewSetUint32JS,
+ "getUint32", DataViewGetUint32JS,
+ "setUint32", DataViewSetUint32JS,
- "getFloat32", DataViewGetFloat32JS,
- "setFloat32", DataViewSetFloat32JS,
+ "getFloat32", DataViewGetFloat32JS,
+ "setFloat32", DataViewSetFloat32JS,
- "getFloat64", DataViewGetFloat64JS,
- "setFloat64", DataViewSetFloat64JS
- ));
+ "getFloat64", DataViewGetFloat64JS,
+ "setFloat64", DataViewSetFloat64JS
+ ]);
}
SetupDataView();
« no previous file with comments | « src/third_party/fdlibm/fdlibm.js ('k') | src/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698