OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1500 CHECK_OBJECT_COERCIBLE(this, "Array.prototype.fill"); | 1500 CHECK_OBJECT_COERCIBLE(this, "Array.prototype.fill"); |
1501 | 1501 |
1502 var array = TO_OBJECT(this); | 1502 var array = TO_OBJECT(this); |
1503 var length = TO_LENGTH(array.length); | 1503 var length = TO_LENGTH(array.length); |
1504 | 1504 |
1505 return InnerArrayFill(value, start, end, array, length); | 1505 return InnerArrayFill(value, start, end, array, length); |
1506 } | 1506 } |
1507 | 1507 |
1508 | 1508 |
1509 function InnerArrayIncludes(searchElement, fromIndex, array, length) { | 1509 function InnerArrayIncludes(searchElement, fromIndex, array, length) { |
1510 %GlobalPrint("InnerArrayIncludes\n"); | |
caitp
2016/07/14 18:01:18
debug edit from early on in this branch, to be rem
| |
1510 if (length === 0) { | 1511 if (length === 0) { |
1511 return false; | 1512 return false; |
1512 } | 1513 } |
1513 | 1514 |
1514 var n = TO_INTEGER(fromIndex); | 1515 var n = TO_INTEGER(fromIndex); |
1515 | 1516 |
1516 var k; | 1517 var k; |
1517 if (n >= 0) { | 1518 if (n >= 0) { |
1518 k = n; | 1519 k = n; |
1519 } else { | 1520 } else { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1760 %InstallToContext([ | 1761 %InstallToContext([ |
1761 "array_pop", ArrayPop, | 1762 "array_pop", ArrayPop, |
1762 "array_push", ArrayPush, | 1763 "array_push", ArrayPush, |
1763 "array_shift", ArrayShift, | 1764 "array_shift", ArrayShift, |
1764 "array_splice", ArraySplice, | 1765 "array_splice", ArraySplice, |
1765 "array_slice", ArraySlice, | 1766 "array_slice", ArraySlice, |
1766 "array_unshift", ArrayUnshift, | 1767 "array_unshift", ArrayUnshift, |
1767 ]); | 1768 ]); |
1768 | 1769 |
1769 }); | 1770 }); |
OLD | NEW |