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) { | 5 (function(global, utils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
11 // ------------------------------------------------------------------- | 11 // ------------------------------------------------------------------- |
12 // Imports | 12 // Imports |
13 | 13 |
14 var Delete; | 14 var Delete; |
15 var GlobalArray = global.Array; | 15 var GlobalArray = global.Array; |
16 var InternalArray = utils.InternalArray; | 16 var InternalArray = utils.InternalArray; |
17 var InternalPackedArray = utils.InternalPackedArray; | 17 var InternalPackedArray = utils.InternalPackedArray; |
18 var MathMin; | 18 var MathMin; |
19 var ObjectHasOwnProperty; | 19 var ObjectHasOwnProperty; |
20 var ObjectIsFrozen; | 20 var ObjectIsFrozen; |
21 var ObjectIsSealed; | 21 var ObjectIsSealed; |
22 var ObjectToString; | 22 var ObjectToString; |
23 var ToNumber; | 23 var ToNumber; |
24 var ToString; | 24 var ToString; |
| 25 var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); |
25 | 26 |
26 utils.Import(function(from) { | 27 utils.Import(function(from) { |
27 Delete = from.Delete; | 28 Delete = from.Delete; |
28 MathMin = from.MathMin; | 29 MathMin = from.MathMin; |
29 ObjectHasOwnProperty = from.ObjectHasOwnProperty; | 30 ObjectHasOwnProperty = from.ObjectHasOwnProperty; |
30 ObjectIsFrozen = from.ObjectIsFrozen; | 31 ObjectIsFrozen = from.ObjectIsFrozen; |
31 ObjectIsSealed = from.ObjectIsSealed; | 32 ObjectIsSealed = from.ObjectIsSealed; |
32 ObjectToString = from.ObjectToString; | 33 ObjectToString = from.ObjectToString; |
33 ToNumber = from.ToNumber; | 34 ToNumber = from.ToNumber; |
34 ToString = from.ToString; | 35 ToString = from.ToString; |
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1603 var unscopables = { | 1604 var unscopables = { |
1604 __proto__: null, | 1605 __proto__: null, |
1605 copyWithin: true, | 1606 copyWithin: true, |
1606 entries: true, | 1607 entries: true, |
1607 fill: true, | 1608 fill: true, |
1608 find: true, | 1609 find: true, |
1609 findIndex: true, | 1610 findIndex: true, |
1610 keys: true, | 1611 keys: true, |
1611 }; | 1612 }; |
1612 | 1613 |
1613 %AddNamedProperty(GlobalArray.prototype, symbolUnscopables, unscopables, | 1614 %AddNamedProperty(GlobalArray.prototype, unscopablesSymbol, unscopables, |
1614 DONT_ENUM | READ_ONLY); | 1615 DONT_ENUM | READ_ONLY); |
1615 | 1616 |
1616 // Set up non-enumerable functions on the Array object. | 1617 // Set up non-enumerable functions on the Array object. |
1617 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ | 1618 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ |
1618 "isArray", ArrayIsArray | 1619 "isArray", ArrayIsArray |
1619 ]); | 1620 ]); |
1620 | 1621 |
1621 var specialFunctions = %SpecialArrayFunctions(); | 1622 var specialFunctions = %SpecialArrayFunctions(); |
1622 | 1623 |
1623 var getFunction = function(name, jsBuiltin, len) { | 1624 var getFunction = function(name, jsBuiltin, len) { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 "array_concat", ArrayConcatJS, | 1709 "array_concat", ArrayConcatJS, |
1709 "array_pop", ArrayPop, | 1710 "array_pop", ArrayPop, |
1710 "array_push", ArrayPush, | 1711 "array_push", ArrayPush, |
1711 "array_shift", ArrayShift, | 1712 "array_shift", ArrayShift, |
1712 "array_splice", ArraySplice, | 1713 "array_splice", ArraySplice, |
1713 "array_slice", ArraySlice, | 1714 "array_slice", ArraySlice, |
1714 "array_unshift", ArrayUnshift, | 1715 "array_unshift", ArrayUnshift, |
1715 ]); | 1716 ]); |
1716 | 1717 |
1717 }); | 1718 }); |
OLD | NEW |