| Index: src/typedarray.js
|
| diff --git a/src/typedarray.js b/src/typedarray.js
|
| index 28d073aa2e0ab7488396fa6f65bc686f7d7c91e2..dfcbb6a8da48106674dae2c3604790911aef365c 100644
|
| --- a/src/typedarray.js
|
| +++ b/src/typedarray.js
|
| @@ -15,17 +15,6 @@
|
| var GlobalArrayBuffer = global.ArrayBuffer;
|
| var GlobalDataView = global.DataView;
|
| var GlobalObject = global.Object;
|
| -
|
| -var MathMax;
|
| -var MathMin;
|
| -
|
| -utils.Import(function(from) {
|
| - MathMax = from.MathMax;
|
| - MathMin = from.MathMin;
|
| -});
|
| -
|
| -// -------------------------------------------------------------------
|
| -
|
|
|
| macro TYPED_ARRAYS(FUNCTION)
|
| // arrayIds below should be synchronized with Runtime_TypedArrayInitialize.
|
| @@ -45,6 +34,14 @@
|
| endmacro
|
|
|
| TYPED_ARRAYS(DECLARE_GLOBALS)
|
| +
|
| +var MathMax;
|
| +var MathMin;
|
| +
|
| +utils.Import(function(from) {
|
| + MathMax = from.MathMax;
|
| + MathMin = from.MathMin;
|
| +});
|
|
|
| // --------------- Typed Arrays ---------------------
|
|
|
| @@ -326,16 +323,16 @@
|
| %AddNamedProperty(GlobalNAME.prototype,
|
| "BYTES_PER_ELEMENT", ELEMENT_SIZE,
|
| READ_ONLY | DONT_ENUM | DONT_DELETE);
|
| - $installGetter(GlobalNAME.prototype, "buffer", NAME_GetBuffer);
|
| - $installGetter(GlobalNAME.prototype, "byteOffset", NAME_GetByteOffset,
|
| - DONT_ENUM | DONT_DELETE);
|
| - $installGetter(GlobalNAME.prototype, "byteLength", NAME_GetByteLength,
|
| - DONT_ENUM | DONT_DELETE);
|
| - $installGetter(GlobalNAME.prototype, "length", NAME_GetLength,
|
| - DONT_ENUM | DONT_DELETE);
|
| - $installGetter(GlobalNAME.prototype, symbolToStringTag,
|
| - TypedArrayGetToStringTag);
|
| - $installFunctions(GlobalNAME.prototype, DONT_ENUM, [
|
| + utils.InstallGetter(GlobalNAME.prototype, "buffer", NAME_GetBuffer);
|
| + utils.InstallGetter(GlobalNAME.prototype, "byteOffset", NAME_GetByteOffset,
|
| + DONT_ENUM | DONT_DELETE);
|
| + utils.InstallGetter(GlobalNAME.prototype, "byteLength", NAME_GetByteLength,
|
| + DONT_ENUM | DONT_DELETE);
|
| + utils.InstallGetter(GlobalNAME.prototype, "length", NAME_GetLength,
|
| + DONT_ENUM | DONT_DELETE);
|
| + utils.InstallGetter(GlobalNAME.prototype, symbolToStringTag,
|
| + TypedArrayGetToStringTag);
|
| + utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [
|
| "subarray", NAMESubArray,
|
| "set", TypedArraySet
|
| ]);
|
| @@ -441,11 +438,13 @@
|
| %AddNamedProperty(GlobalDataView.prototype, symbolToStringTag, "DataView",
|
| READ_ONLY|DONT_ENUM);
|
|
|
| -$installGetter(GlobalDataView.prototype, "buffer", DataViewGetBufferJS);
|
| -$installGetter(GlobalDataView.prototype, "byteOffset", DataViewGetByteOffset);
|
| -$installGetter(GlobalDataView.prototype, "byteLength", DataViewGetByteLength);
|
| -
|
| -$installFunctions(GlobalDataView.prototype, DONT_ENUM, [
|
| +utils.InstallGetter(GlobalDataView.prototype, "buffer", DataViewGetBufferJS);
|
| +utils.InstallGetter(GlobalDataView.prototype, "byteOffset",
|
| + DataViewGetByteOffset);
|
| +utils.InstallGetter(GlobalDataView.prototype, "byteLength",
|
| + DataViewGetByteLength);
|
| +
|
| +utils.InstallFunctions(GlobalDataView.prototype, DONT_ENUM, [
|
| "getInt8", DataViewGetInt8JS,
|
| "setInt8", DataViewSetInt8JS,
|
|
|
|
|