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

Unified Diff: src/typedarray.js

Issue 1143993003: Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed test for no-snap Created 5 years, 7 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 baf8edb99128af2a1b7a26f07107d91fd8f59daf..28d073aa2e0ab7488396fa6f65bc686f7d7c91e2 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -2,17 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-(function(global, shared, exports) {
+(function(global, utils) {
"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.
FUNCTION(1, Uint8Array, 1)
@@ -165,16 +179,16 @@ function NAMESubArray(begin, end) {
var srcLength = %_TypedArrayGetLength(this);
if (beginInt < 0) {
- beginInt = $max(0, srcLength + beginInt);
+ beginInt = MathMax(0, srcLength + beginInt);
} else {
- beginInt = $min(srcLength, beginInt);
+ beginInt = MathMin(srcLength, beginInt);
}
var endInt = IS_UNDEFINED(end) ? srcLength : end;
if (endInt < 0) {
- endInt = $max(0, srcLength + endInt);
+ endInt = MathMax(0, srcLength + endInt);
} else {
- endInt = $min(endInt, srcLength);
+ endInt = MathMin(endInt, srcLength);
}
if (endInt < beginInt) {
endInt = beginInt;
« 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