| 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1453 } | 1453 } |
| 1454 | 1454 |
| 1455 | 1455 |
| 1456 // ------------------------------------------------------------------- | 1456 // ------------------------------------------------------------------- |
| 1457 | 1457 |
| 1458 function SetUpArray() { | 1458 function SetUpArray() { |
| 1459 %CheckIsBootstrapping(); | 1459 %CheckIsBootstrapping(); |
| 1460 | 1460 |
| 1461 // Set up non-enumerable constructor property on the Array.prototype | 1461 // Set up non-enumerable constructor property on the Array.prototype |
| 1462 // object. | 1462 // object. |
| 1463 %AddProperty($Array.prototype, "constructor", $Array, DONT_ENUM); | 1463 %AddNamedProperty($Array.prototype, "constructor", $Array, DONT_ENUM); |
| 1464 | 1464 |
| 1465 // Set up non-enumerable functions on the Array object. | 1465 // Set up non-enumerable functions on the Array object. |
| 1466 InstallFunctions($Array, DONT_ENUM, $Array( | 1466 InstallFunctions($Array, DONT_ENUM, $Array( |
| 1467 "isArray", ArrayIsArray | 1467 "isArray", ArrayIsArray |
| 1468 )); | 1468 )); |
| 1469 | 1469 |
| 1470 var specialFunctions = %SpecialArrayFunctions(); | 1470 var specialFunctions = %SpecialArrayFunctions(); |
| 1471 | 1471 |
| 1472 var getFunction = function(name, jsBuiltin, len) { | 1472 var getFunction = function(name, jsBuiltin, len) { |
| 1473 var f = jsBuiltin; | 1473 var f = jsBuiltin; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 )); | 1523 )); |
| 1524 | 1524 |
| 1525 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( | 1525 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( |
| 1526 "join", getFunction("join", ArrayJoin), | 1526 "join", getFunction("join", ArrayJoin), |
| 1527 "pop", getFunction("pop", ArrayPop), | 1527 "pop", getFunction("pop", ArrayPop), |
| 1528 "push", getFunction("push", ArrayPush) | 1528 "push", getFunction("push", ArrayPush) |
| 1529 )); | 1529 )); |
| 1530 } | 1530 } |
| 1531 | 1531 |
| 1532 SetUpArray(); | 1532 SetUpArray(); |
| OLD | NEW |