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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 "copyWithin", getFunction("copyWithin", ArrayCopyWithin, 2), | 1562 "copyWithin", getFunction("copyWithin", ArrayCopyWithin, 2), |
1563 "find", getFunction("find", ArrayFind, 1), | 1563 "find", getFunction("find", ArrayFind, 1), |
1564 "findIndex", getFunction("findIndex", ArrayFindIndex, 1), | 1564 "findIndex", getFunction("findIndex", ArrayFindIndex, 1), |
1565 "fill", getFunction("fill", ArrayFill, 1), | 1565 "fill", getFunction("fill", ArrayFill, 1), |
1566 "includes", getFunction("includes", null, 1), | 1566 "includes", getFunction("includes", null, 1), |
1567 "keys", getFunction("keys", null, 0), | 1567 "keys", getFunction("keys", null, 0), |
1568 "entries", getFunction("entries", null, 0), | 1568 "entries", getFunction("entries", null, 0), |
1569 iteratorSymbol, ArrayValues | 1569 iteratorSymbol, ArrayValues |
1570 ]); | 1570 ]); |
1571 | 1571 |
| 1572 utils.ForEachFunction = GlobalArray.prototype.forEach; |
| 1573 |
1572 %FunctionSetName(ArrayValues, "values"); | 1574 %FunctionSetName(ArrayValues, "values"); |
1573 | 1575 |
1574 %FinishArrayPrototypeSetup(GlobalArray.prototype); | 1576 %FinishArrayPrototypeSetup(GlobalArray.prototype); |
1575 | 1577 |
1576 // The internal Array prototype doesn't need to be fancy, since it's never | 1578 // The internal Array prototype doesn't need to be fancy, since it's never |
1577 // exposed to user code. | 1579 // exposed to user code. |
1578 // Adding only the functions that are actually used. | 1580 // Adding only the functions that are actually used. |
1579 utils.SetUpLockedPrototype(InternalArray, GlobalArray(), [ | 1581 utils.SetUpLockedPrototype(InternalArray, GlobalArray(), [ |
1580 "indexOf", getFunction("indexOf", null), | 1582 "indexOf", getFunction("indexOf", null), |
1581 "join", getFunction("join", ArrayJoin), | 1583 "join", getFunction("join", ArrayJoin), |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 "array_pop", ArrayPop, | 1636 "array_pop", ArrayPop, |
1635 "array_push", ArrayPush, | 1637 "array_push", ArrayPush, |
1636 "array_shift", ArrayShift, | 1638 "array_shift", ArrayShift, |
1637 "array_splice", ArraySplice, | 1639 "array_splice", ArraySplice, |
1638 "array_slice", ArraySlice, | 1640 "array_slice", ArraySlice, |
1639 "array_unshift", ArrayUnshift, | 1641 "array_unshift", ArrayUnshift, |
1640 "array_values_iterator", ArrayValues, | 1642 "array_values_iterator", ArrayValues, |
1641 ]); | 1643 ]); |
1642 | 1644 |
1643 }); | 1645 }); |
OLD | NEW |