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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 | 1492 |
1493 // Set up unscopable properties on the Array.prototype object. | 1493 // Set up unscopable properties on the Array.prototype object. |
1494 var unscopables = { | 1494 var unscopables = { |
1495 __proto__: null, | 1495 __proto__: null, |
1496 copyWithin: true, | 1496 copyWithin: true, |
1497 entries: true, | 1497 entries: true, |
1498 fill: true, | 1498 fill: true, |
1499 find: true, | 1499 find: true, |
1500 findIndex: true, | 1500 findIndex: true, |
1501 keys: true, | 1501 keys: true, |
1502 values: true, | |
1503 }; | 1502 }; |
1504 %AddNamedProperty($Array.prototype, symbolUnscopables, unscopables, | 1503 %AddNamedProperty($Array.prototype, symbolUnscopables, unscopables, |
1505 DONT_ENUM | READ_ONLY); | 1504 DONT_ENUM | READ_ONLY); |
1506 | 1505 |
1507 // Set up non-enumerable functions on the Array object. | 1506 // Set up non-enumerable functions on the Array object. |
1508 InstallFunctions($Array, DONT_ENUM, $Array( | 1507 InstallFunctions($Array, DONT_ENUM, $Array( |
1509 "isArray", ArrayIsArray | 1508 "isArray", ArrayIsArray |
1510 )); | 1509 )); |
1511 | 1510 |
1512 var specialFunctions = %SpecialArrayFunctions(); | 1511 var specialFunctions = %SpecialArrayFunctions(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 )); | 1564 )); |
1566 | 1565 |
1567 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( | 1566 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( |
1568 "join", getFunction("join", ArrayJoin), | 1567 "join", getFunction("join", ArrayJoin), |
1569 "pop", getFunction("pop", ArrayPop), | 1568 "pop", getFunction("pop", ArrayPop), |
1570 "push", getFunction("push", ArrayPush) | 1569 "push", getFunction("push", ArrayPush) |
1571 )); | 1570 )); |
1572 } | 1571 } |
1573 | 1572 |
1574 SetUpArray(); | 1573 SetUpArray(); |
OLD | NEW |