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

Unified Diff: src/harmony-array.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/generator.js ('k') | src/harmony-array-includes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-array.js
diff --git a/src/harmony-array.js b/src/harmony-array.js
index 00a1fa07eed3c69390bf6753bacf4b6dfbe897ea..93f32a82b299b3a54729650a2497c88c9fafe5df 100644
--- a/src/harmony-array.js
+++ b/src/harmony-array.js
@@ -8,25 +8,14 @@
var $innerArrayFindIndex;
var $arrayFrom;
-(function(global, utils) {
+(function(global, exports) {
'use strict';
%CheckIsBootstrapping();
-
-// -------------------------------------------------------------------
-// Imports
var GlobalArray = global.Array;
var GlobalSymbol = global.Symbol;
-
-var MathMax;
-var MathMin;
-
-utils.Import(function(from) {
- MathMax = from.MathMax;
- MathMin = from.MathMin;
-});
// -------------------------------------------------------------------
@@ -34,28 +23,28 @@
target = TO_INTEGER(target);
var to;
if (target < 0) {
- to = MathMax(length + target, 0);
- } else {
- to = MathMin(target, length);
+ to = $max(length + target, 0);
+ } else {
+ to = $min(target, length);
}
start = TO_INTEGER(start);
var from;
if (start < 0) {
- from = MathMax(length + start, 0);
- } else {
- from = MathMin(start, length);
+ from = $max(length + start, 0);
+ } else {
+ from = $min(start, length);
}
end = IS_UNDEFINED(end) ? length : TO_INTEGER(end);
var final;
if (end < 0) {
- final = MathMax(length + end, 0);
- } else {
- final = MathMin(end, length);
- }
-
- var count = MathMin(final - from, length - to);
+ final = $max(length + end, 0);
+ } else {
+ final = $min(end, length);
+ }
+
+ var count = $min(final - from, length - to);
var direction = 1;
if (from < to && to < (from + count)) {
direction = -1;
« no previous file with comments | « src/generator.js ('k') | src/harmony-array-includes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698