OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1447 return current; | 1447 return current; |
1448 } | 1448 } |
1449 | 1449 |
1450 // ES5, 15.4.3.2 | 1450 // ES5, 15.4.3.2 |
1451 function ArrayIsArray(obj) { | 1451 function ArrayIsArray(obj) { |
1452 return IS_ARRAY(obj); | 1452 return IS_ARRAY(obj); |
1453 } | 1453 } |
1454 | 1454 |
1455 | 1455 |
1456 // ------------------------------------------------------------------- | 1456 // ------------------------------------------------------------------- |
| 1457 |
1457 function SetUpArray() { | 1458 function SetUpArray() { |
1458 %CheckIsBootstrapping(); | 1459 %CheckIsBootstrapping(); |
| 1460 |
1459 // Set up non-enumerable constructor property on the Array.prototype | 1461 // Set up non-enumerable constructor property on the Array.prototype |
1460 // object. | 1462 // object. |
1461 %SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM); | 1463 %SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM); |
1462 | 1464 |
1463 // Set up non-enumerable functions on the Array object. | 1465 // Set up non-enumerable functions on the Array object. |
1464 InstallFunctions($Array, DONT_ENUM, $Array( | 1466 InstallFunctions($Array, DONT_ENUM, $Array( |
1465 "isArray", ArrayIsArray | 1467 "isArray", ArrayIsArray |
1466 )); | 1468 )); |
1467 | 1469 |
1468 var specialFunctions = %SpecialArrayFunctions({}); | 1470 var specialFunctions = %SpecialArrayFunctions({}); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 )); | 1523 )); |
1522 | 1524 |
1523 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( | 1525 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( |
1524 "join", getFunction("join", ArrayJoin), | 1526 "join", getFunction("join", ArrayJoin), |
1525 "pop", getFunction("pop", ArrayPop), | 1527 "pop", getFunction("pop", ArrayPop), |
1526 "push", getFunction("push", ArrayPush) | 1528 "push", getFunction("push", ArrayPush) |
1527 )); | 1529 )); |
1528 } | 1530 } |
1529 | 1531 |
1530 SetUpArray(); | 1532 SetUpArray(); |
OLD | NEW |