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