Index: src/typedarray.js |
diff --git a/src/typedarray.js b/src/typedarray.js |
index 28d073aa2e0ab7488396fa6f65bc686f7d7c91e2..baf8edb99128af2a1b7a26f07107d91fd8f59daf 100644 |
--- a/src/typedarray.js |
+++ b/src/typedarray.js |
@@ -2,30 +2,16 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-(function(global, utils) { |
+(function(global, shared, exports) { |
"use strict"; |
%CheckIsBootstrapping(); |
- |
-// ------------------------------------------------------------------- |
-// Imports |
var GlobalArray = global.Array; |
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. |
@@ -179,16 +165,16 @@ |
var srcLength = %_TypedArrayGetLength(this); |
if (beginInt < 0) { |
- beginInt = MathMax(0, srcLength + beginInt); |
- } else { |
- beginInt = MathMin(srcLength, beginInt); |
+ beginInt = $max(0, srcLength + beginInt); |
+ } else { |
+ beginInt = $min(srcLength, beginInt); |
} |
var endInt = IS_UNDEFINED(end) ? srcLength : end; |
if (endInt < 0) { |
- endInt = MathMax(0, srcLength + endInt); |
- } else { |
- endInt = MathMin(endInt, srcLength); |
+ endInt = $max(0, srcLength + endInt); |
+ } else { |
+ endInt = $min(endInt, srcLength); |
} |
if (endInt < beginInt) { |
endInt = beginInt; |