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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 if (typeof x != typeof y) return false; | 937 if (typeof x != typeof y) return false; |
938 if (IS_NUMBER(x)) { | 938 if (IS_NUMBER(x)) { |
939 if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true; | 939 if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) return true; |
940 } | 940 } |
941 return x === y; | 941 return x === y; |
942 } | 942 } |
943 | 943 |
944 function ConcatIterableToArray(target, iterable) { | 944 function ConcatIterableToArray(target, iterable) { |
945 var index = target.length; | 945 var index = target.length; |
946 for (var element of iterable) { | 946 for (var element of iterable) { |
947 %AddElement(target, index++, element, NONE); | 947 %AddElement(target, index++, element); |
948 } | 948 } |
949 return target; | 949 return target; |
950 } | 950 } |
951 | 951 |
952 | 952 |
953 /* --------------------------------- | 953 /* --------------------------------- |
954 - - - U t i l i t i e s - - - | 954 - - - U t i l i t i e s - - - |
955 --------------------------------- | 955 --------------------------------- |
956 */ | 956 */ |
957 | 957 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 $toLength = ToLength; | 1041 $toLength = ToLength; |
1042 $toName = ToName; | 1042 $toName = ToName; |
1043 $toNumber = ToNumber; | 1043 $toNumber = ToNumber; |
1044 $toObject = ToObject; | 1044 $toObject = ToObject; |
1045 $toPositiveInteger = ToPositiveInteger; | 1045 $toPositiveInteger = ToPositiveInteger; |
1046 $toPrimitive = ToPrimitive; | 1046 $toPrimitive = ToPrimitive; |
1047 $toString = ToString; | 1047 $toString = ToString; |
1048 $toUint32 = ToUint32; | 1048 $toUint32 = ToUint32; |
1049 | 1049 |
1050 }) | 1050 }) |
OLD | NEW |