OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 // This files contains runtime support implemented in JavaScript. | 5 // This files contains runtime support implemented in JavaScript. |
6 | 6 |
7 // CAUTION: Some of the functions specified in this file are called | 7 // CAUTION: Some of the functions specified in this file are called |
8 // directly from compiled code. These are the functions with names in | 8 // directly from compiled code. These are the functions with names in |
9 // ALL CAPS. The compiled code passes the first argument in 'this'. | 9 // ALL CAPS. The compiled code passes the first argument in 'this'. |
10 | 10 |
11 | 11 |
12 // The following declarations are shared with other native JS files. | 12 // The following declarations are shared with other native JS files. |
13 // They are all declared at this one spot to avoid redeclaration errors. | 13 // They are all declared at this one spot to avoid redeclaration errors. |
14 var $defaultString; | 14 var $defaultString; |
15 var $NaN; | 15 var $NaN; |
16 var $nonNumberToNumber; | 16 var $nonNumberToNumber; |
17 var $nonStringToString; | 17 var $nonStringToString; |
18 var $sameValue; | 18 var $sameValue; |
19 var $sameValueZero; | 19 var $sameValueZero; |
20 var $toInteger; | 20 var $toInteger; |
21 var $toLength; | 21 var $toLength; |
22 var $toNumber; | 22 var $toNumber; |
23 var $toPositiveInteger; | 23 var $toPositiveInteger; |
24 var $toPrimitive; | 24 var $toPrimitive; |
25 var $toString; | 25 var $toString; |
26 | 26 |
| 27 var harmony_tolength = false; |
| 28 |
27 (function(global, utils) { | 29 (function(global, utils) { |
28 | 30 |
29 %CheckIsBootstrapping(); | 31 %CheckIsBootstrapping(); |
30 | 32 |
31 var GlobalArray = global.Array; | 33 var GlobalArray = global.Array; |
32 var GlobalBoolean = global.Boolean; | 34 var GlobalBoolean = global.Boolean; |
33 var GlobalString = global.String; | 35 var GlobalString = global.String; |
34 var GlobalNumber = global.Number; | 36 var GlobalNumber = global.Number; |
35 var isConcatSpreadableSymbol = | 37 var isConcatSpreadableSymbol = |
36 utils.ImportNow("is_concat_spreadable_symbol"); | 38 utils.ImportNow("is_concat_spreadable_symbol"); |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 | 832 |
831 utils.Export(function(to) { | 833 utils.Export(function(to) { |
832 to.ToBoolean = ToBoolean; | 834 to.ToBoolean = ToBoolean; |
833 to.ToLength = ToLength; | 835 to.ToLength = ToLength; |
834 to.ToNumber = ToNumber; | 836 to.ToNumber = ToNumber; |
835 to.ToPrimitive = ToPrimitive; | 837 to.ToPrimitive = ToPrimitive; |
836 to.ToString = ToString; | 838 to.ToString = ToString; |
837 }); | 839 }); |
838 | 840 |
839 }) | 841 }) |
OLD | NEW |