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

Unified Diff: src/js/typedarray.js

Issue 2306033002: [turbofan] Migrate remaining DataView builtins to C++. (Closed)
Patch Set: Created 4 years, 3 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/builtins/builtins-dataview.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index b97a9c86cea9828004520c870d4ebb0a40c73d09..fe4bba3ddd9c43b29e014fec697b8602ef5927e9 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -19,7 +19,6 @@ var GetMethod;
var GlobalArray = global.Array;
var GlobalArrayBuffer = global.ArrayBuffer;
var GlobalArrayBufferPrototype = GlobalArrayBuffer.prototype;
-var GlobalDataView = global.DataView;
var GlobalObject = global.Object;
var InnerArrayCopyWithin;
var InnerArrayEvery;
@@ -915,68 +914,4 @@ endmacro
TYPED_ARRAYS(SETUP_TYPED_ARRAY)
-// --------------------------- DataView -----------------------------
-
-macro DATA_VIEW_TYPES(FUNCTION)
- FUNCTION(Int8)
- FUNCTION(Uint8)
- FUNCTION(Int16)
- FUNCTION(Uint16)
- FUNCTION(Int32)
- FUNCTION(Uint32)
- FUNCTION(Float32)
- FUNCTION(Float64)
-endmacro
-
-
-macro DATA_VIEW_GETTER_SETTER(TYPENAME)
-function DataViewGetTYPENAMEJS(offset, little_endian) {
- if (!IS_DATAVIEW(this)) {
- throw %make_type_error(kIncompatibleMethodReceiver,
- 'DataView.getTYPENAME', this);
- }
- offset = IS_UNDEFINED(offset) ? 0 : ToIndex(offset, kInvalidDataViewAccessorOffset);
- return %DataViewGetTYPENAME(this, offset, !!little_endian);
-}
-%FunctionSetLength(DataViewGetTYPENAMEJS, 1);
-
-function DataViewSetTYPENAMEJS(offset, value, little_endian) {
- if (!IS_DATAVIEW(this)) {
- throw %make_type_error(kIncompatibleMethodReceiver,
- 'DataView.setTYPENAME', this);
- }
- offset = IS_UNDEFINED(offset) ? 0 : ToIndex(offset, kInvalidDataViewAccessorOffset);
- %DataViewSetTYPENAME(this, offset, TO_NUMBER(value), !!little_endian);
-}
-%FunctionSetLength(DataViewSetTYPENAMEJS, 2);
-endmacro
-
-DATA_VIEW_TYPES(DATA_VIEW_GETTER_SETTER)
-
-utils.InstallFunctions(GlobalDataView.prototype, DONT_ENUM, [
- "getInt8", DataViewGetInt8JS,
- "setInt8", DataViewSetInt8JS,
-
- "getUint8", DataViewGetUint8JS,
- "setUint8", DataViewSetUint8JS,
-
- "getInt16", DataViewGetInt16JS,
- "setInt16", DataViewSetInt16JS,
-
- "getUint16", DataViewGetUint16JS,
- "setUint16", DataViewSetUint16JS,
-
- "getInt32", DataViewGetInt32JS,
- "setInt32", DataViewSetInt32JS,
-
- "getUint32", DataViewGetUint32JS,
- "setUint32", DataViewSetUint32JS,
-
- "getFloat32", DataViewGetFloat32JS,
- "setFloat32", DataViewSetFloat32JS,
-
- "getFloat64", DataViewGetFloat64JS,
- "setFloat64", DataViewSetFloat64JS
-]);
-
})
« no previous file with comments | « src/builtins/builtins-dataview.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698