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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // This file relies on the fact that the following declarations have been made | 7 // This file relies on the fact that the following declarations have been made |
8 // in runtime.js: | 8 // in runtime.js: |
9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
10 | 10 |
(...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 | 1473 |
1474 // Set up unscopable properties on the Array.prototype object. | 1474 // Set up unscopable properties on the Array.prototype object. |
1475 var unscopables = { | 1475 var unscopables = { |
1476 __proto__: null, | 1476 __proto__: null, |
1477 copyWithin: true, | 1477 copyWithin: true, |
1478 entries: true, | 1478 entries: true, |
1479 fill: true, | 1479 fill: true, |
1480 find: true, | 1480 find: true, |
1481 findIndex: true, | 1481 findIndex: true, |
1482 keys: true, | 1482 keys: true, |
1483 values: true, | |
1484 }; | 1483 }; |
1485 %AddNamedProperty($Array.prototype, symbolUnscopables, unscopables, | 1484 %AddNamedProperty($Array.prototype, symbolUnscopables, unscopables, |
1486 DONT_ENUM | READ_ONLY); | 1485 DONT_ENUM | READ_ONLY); |
1487 | 1486 |
1488 // Set up non-enumerable functions on the Array object. | 1487 // Set up non-enumerable functions on the Array object. |
1489 InstallFunctions($Array, DONT_ENUM, $Array( | 1488 InstallFunctions($Array, DONT_ENUM, $Array( |
1490 "isArray", ArrayIsArray | 1489 "isArray", ArrayIsArray |
1491 )); | 1490 )); |
1492 | 1491 |
1493 var specialFunctions = %SpecialArrayFunctions(); | 1492 var specialFunctions = %SpecialArrayFunctions(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 )); | 1545 )); |
1547 | 1546 |
1548 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( | 1547 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( |
1549 "join", getFunction("join", ArrayJoin), | 1548 "join", getFunction("join", ArrayJoin), |
1550 "pop", getFunction("pop", ArrayPop), | 1549 "pop", getFunction("pop", ArrayPop), |
1551 "push", getFunction("push", ArrayPush) | 1550 "push", getFunction("push", ArrayPush) |
1552 )); | 1551 )); |
1553 } | 1552 } |
1554 | 1553 |
1555 SetUpArray(); | 1554 SetUpArray(); |
OLD | NEW |