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

Unified Diff: src/typedarray.js

Issue 1144163002: Revert of Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 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;
« 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