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

Side by Side Diff: src/harmony-array.js

Issue 1384443002: [es6] Fix missing bits for full @@toPrimitive support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cctest. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 6
7 'use strict'; 7 'use strict';
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GetIterator; 14 var GetIterator;
15 var GetMethod; 15 var GetMethod;
16 var GlobalArray = global.Array; 16 var GlobalArray = global.Array;
17 var iteratorSymbol = utils.ImportNow("iterator_symbol"); 17 var iteratorSymbol = utils.ImportNow("iterator_symbol");
18 var MathMax; 18 var MathMax;
19 var MathMin; 19 var MathMin;
20 var ObjectIsFrozen; 20 var ObjectIsFrozen;
21 var ObjectDefineProperty; 21 var ObjectDefineProperty;
22 var ToNumber;
23 22
24 utils.Import(function(from) { 23 utils.Import(function(from) {
25 GetIterator = from.GetIterator; 24 GetIterator = from.GetIterator;
26 GetMethod = from.GetMethod; 25 GetMethod = from.GetMethod;
27 MathMax = from.MathMax; 26 MathMax = from.MathMax;
28 MathMin = from.MathMin; 27 MathMin = from.MathMin;
29 ObjectIsFrozen = from.ObjectIsFrozen; 28 ObjectIsFrozen = from.ObjectIsFrozen;
30 ObjectDefineProperty = from.ObjectDefineProperty; 29 ObjectDefineProperty = from.ObjectDefineProperty;
31 ToNumber = from.ToNumber;
32 }); 30 });
33 31
34 // ------------------------------------------------------------------- 32 // -------------------------------------------------------------------
35 33
36 function InnerArrayCopyWithin(target, start, end, array, length) { 34 function InnerArrayCopyWithin(target, start, end, array, length) {
37 target = TO_INTEGER(target); 35 target = TO_INTEGER(target);
38 var to; 36 var to;
39 if (target < 0) { 37 if (target < 0) {
40 to = MathMax(length + target, 0); 38 to = MathMax(length + target, 0);
41 } else { 39 } else {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 289
292 utils.Export(function(to) { 290 utils.Export(function(to) {
293 to.ArrayFrom = ArrayFrom; 291 to.ArrayFrom = ArrayFrom;
294 to.InnerArrayCopyWithin = InnerArrayCopyWithin; 292 to.InnerArrayCopyWithin = InnerArrayCopyWithin;
295 to.InnerArrayFill = InnerArrayFill; 293 to.InnerArrayFill = InnerArrayFill;
296 to.InnerArrayFind = InnerArrayFind; 294 to.InnerArrayFind = InnerArrayFind;
297 to.InnerArrayFindIndex = InnerArrayFindIndex; 295 to.InnerArrayFindIndex = InnerArrayFindIndex;
298 }); 296 });
299 297
300 }) 298 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698