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 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1650 DONT_ENUM); | 1650 DONT_ENUM); |
1651 | 1651 |
1652 // Set up unscopable properties on the Array.prototype object. | 1652 // Set up unscopable properties on the Array.prototype object. |
1653 var unscopables = { | 1653 var unscopables = { |
1654 __proto__: null, | 1654 __proto__: null, |
1655 copyWithin: true, | 1655 copyWithin: true, |
1656 entries: true, | 1656 entries: true, |
1657 fill: true, | 1657 fill: true, |
1658 find: true, | 1658 find: true, |
1659 findIndex: true, | 1659 findIndex: true, |
| 1660 includes: true, |
1660 keys: true, | 1661 keys: true, |
1661 }; | 1662 }; |
1662 | 1663 |
1663 %AddNamedProperty(GlobalArray.prototype, unscopablesSymbol, unscopables, | 1664 %AddNamedProperty(GlobalArray.prototype, unscopablesSymbol, unscopables, |
1664 DONT_ENUM | READ_ONLY); | 1665 DONT_ENUM | READ_ONLY); |
1665 | 1666 |
1666 %FunctionSetLength(ArrayFrom, 1); | 1667 %FunctionSetLength(ArrayFrom, 1); |
1667 | 1668 |
1668 // Set up non-enumerable functions on the Array object. | 1669 // Set up non-enumerable functions on the Array object. |
1669 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ | 1670 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1780 %InstallToContext([ | 1781 %InstallToContext([ |
1781 "array_pop", ArrayPop, | 1782 "array_pop", ArrayPop, |
1782 "array_push", ArrayPush, | 1783 "array_push", ArrayPush, |
1783 "array_shift", ArrayShift, | 1784 "array_shift", ArrayShift, |
1784 "array_splice", ArraySplice, | 1785 "array_splice", ArraySplice, |
1785 "array_slice", ArraySlice, | 1786 "array_slice", ArraySlice, |
1786 "array_unshift", ArrayUnshift, | 1787 "array_unshift", ArrayUnshift, |
1787 ]); | 1788 ]); |
1788 | 1789 |
1789 }); | 1790 }); |
OLD | NEW |