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 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 var TO_STRING; | 59 var TO_STRING; |
60 var TO_NAME; | 60 var TO_NAME; |
61 | 61 |
62 var $defaultNumber; | 62 var $defaultNumber; |
63 var $defaultString; | 63 var $defaultString; |
64 var $NaN; | 64 var $NaN; |
65 var $nonNumberToNumber; | 65 var $nonNumberToNumber; |
66 var $nonStringToString; | 66 var $nonStringToString; |
67 var $sameValue; | 67 var $sameValue; |
68 var $sameValueZero; | 68 var $sameValueZero; |
69 var $toBoolean; | |
70 var $toInteger; | 69 var $toInteger; |
71 var $toLength; | 70 var $toLength; |
72 var $toName; | 71 var $toName; |
73 var $toNumber; | 72 var $toNumber; |
74 var $toPositiveInteger; | 73 var $toPositiveInteger; |
75 var $toPrimitive; | 74 var $toPrimitive; |
76 var $toString; | 75 var $toString; |
77 | 76 |
78 (function(global, utils) { | 77 (function(global, utils) { |
79 | 78 |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 // Exports | 899 // Exports |
901 | 900 |
902 $concatIterableToArray = ConcatIterableToArray; | 901 $concatIterableToArray = ConcatIterableToArray; |
903 $defaultNumber = DefaultNumber; | 902 $defaultNumber = DefaultNumber; |
904 $defaultString = DefaultString; | 903 $defaultString = DefaultString; |
905 $NaN = %GetRootNaN(); | 904 $NaN = %GetRootNaN(); |
906 $nonNumberToNumber = NonNumberToNumber; | 905 $nonNumberToNumber = NonNumberToNumber; |
907 $nonStringToString = NonStringToString; | 906 $nonStringToString = NonStringToString; |
908 $sameValue = SameValue; | 907 $sameValue = SameValue; |
909 $sameValueZero = SameValueZero; | 908 $sameValueZero = SameValueZero; |
910 $toBoolean = ToBoolean; | |
911 $toInteger = ToInteger; | 909 $toInteger = ToInteger; |
912 $toLength = ToLength; | 910 $toLength = ToLength; |
913 $toName = ToName; | 911 $toName = ToName; |
914 $toNumber = ToNumber; | 912 $toNumber = ToNumber; |
915 $toPositiveInteger = ToPositiveInteger; | 913 $toPositiveInteger = ToPositiveInteger; |
916 $toPrimitive = ToPrimitive; | 914 $toPrimitive = ToPrimitive; |
917 $toString = ToString; | 915 $toString = ToString; |
918 | 916 |
919 utils.ExportToRuntime(function(to) { | 917 utils.ExportToRuntime(function(to) { |
920 to.ToNumber = $toNumber; | 918 to.ToNumber = ToNumber; |
921 to.ToString = $toString; | 919 to.ToString = ToString; |
922 to.ToInteger = $toInteger; | 920 to.ToInteger = ToInteger; |
923 to.ToLength = $toLength; | 921 to.ToLength = ToLength; |
924 }); | 922 }); |
925 | 923 |
| 924 utils.Export(function(to) { |
| 925 to.ToBoolean = ToBoolean; |
| 926 to.ToNumber = ToNumber; |
| 927 to.ToString = ToString; |
926 }) | 928 }) |
| 929 |
| 930 }) |
OLD | NEW |