| 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 //---------------------------------------------------------------------------- | 890 //---------------------------------------------------------------------------- |
| 891 | 891 |
| 892 // NOTE: Setting the prototype for Array must take place as early as | 892 // NOTE: Setting the prototype for Array must take place as early as |
| 893 // possible due to code generation for array literals. When | 893 // possible due to code generation for array literals. When |
| 894 // generating code for a array literal a boilerplate array is created | 894 // generating code for a array literal a boilerplate array is created |
| 895 // that is cloned when running the code. It is essential that the | 895 // that is cloned when running the code. It is essential that the |
| 896 // boilerplate gets the right prototype. | 896 // boilerplate gets the right prototype. |
| 897 %FunctionSetPrototype(GlobalArray, new GlobalArray(0)); | 897 %FunctionSetPrototype(GlobalArray, new GlobalArray(0)); |
| 898 | 898 |
| 899 // ---------------------------------------------------------------------------- | 899 // ---------------------------------------------------------------------------- |
| 900 // Exports |
| 900 | 901 |
| 901 $concatIterableToArray = ConcatIterableToArray; | 902 $concatIterableToArray = ConcatIterableToArray; |
| 902 $defaultNumber = DefaultNumber; | 903 $defaultNumber = DefaultNumber; |
| 903 $defaultString = DefaultString; | 904 $defaultString = DefaultString; |
| 904 $NaN = %GetRootNaN(); | 905 $NaN = %GetRootNaN(); |
| 905 $nonNumberToNumber = NonNumberToNumber; | 906 $nonNumberToNumber = NonNumberToNumber; |
| 906 $nonStringToString = NonStringToString; | 907 $nonStringToString = NonStringToString; |
| 907 $sameValue = SameValue; | 908 $sameValue = SameValue; |
| 908 $sameValueZero = SameValueZero; | 909 $sameValueZero = SameValueZero; |
| 909 $toBoolean = ToBoolean; | 910 $toBoolean = ToBoolean; |
| 910 $toInteger = ToInteger; | 911 $toInteger = ToInteger; |
| 911 $toLength = ToLength; | 912 $toLength = ToLength; |
| 912 $toName = ToName; | 913 $toName = ToName; |
| 913 $toNumber = ToNumber; | 914 $toNumber = ToNumber; |
| 914 $toPositiveInteger = ToPositiveInteger; | 915 $toPositiveInteger = ToPositiveInteger; |
| 915 $toPrimitive = ToPrimitive; | 916 $toPrimitive = ToPrimitive; |
| 916 $toString = ToString; | 917 $toString = ToString; |
| 917 | 918 |
| 919 utils.ExportToRuntime(function(to) { |
| 920 to.ToNumber = $toNumber; |
| 921 to.ToString = $toString; |
| 922 to.ToInteger = $toInteger; |
| 923 to.ToLength = $toLength; |
| 924 }); |
| 925 |
| 918 }) | 926 }) |
| OLD | NEW |