| 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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 function ConvertToLocaleString(e) { | 165 function ConvertToLocaleString(e) { |
| 166 if (typeof(e) === 'string') return e; | 166 if (typeof(e) === 'string') return e; |
| 167 if (e == null) return ''; | 167 if (e == null) return ''; |
| 168 else { | 168 else { |
| 169 // e_obj's toLocaleString might be overwritten, check if it is a function. | 169 // e_obj's toLocaleString might be overwritten, check if it is a function. |
| 170 // Call ToString if toLocaleString is not a function. | 170 // Call ToString if toLocaleString is not a function. |
| 171 // See issue 877615. | 171 // See issue 877615. |
| 172 var e_obj = ToObject(e); | 172 var e_obj = ToObject(e); |
| 173 if (IS_FUNCTION(e_obj.toLocaleString)) | 173 if (IS_FUNCTION(e_obj.toLocaleString)) |
| 174 return e_obj.toLocaleString(); | 174 return ToString(e_obj.toLocaleString()); |
| 175 else | 175 else |
| 176 return ToString(e); | 176 return ToString(e); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 | 180 |
| 181 // This function implements the optimized splice implementation that can use | 181 // This function implements the optimized splice implementation that can use |
| 182 // special array operations to handle sparse arrays in a sensible fashion. | 182 // special array operations to handle sparse arrays in a sensible fashion. |
| 183 function SmartSlice(array, start_i, del_count, len, deleted_elements) { | 183 function SmartSlice(array, start_i, del_count, len, deleted_elements) { |
| 184 // Move deleted elements to a new array (the return value from splice). | 184 // Move deleted elements to a new array (the return value from splice). |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 ArrayIndexOf: 1, | 1143 ArrayIndexOf: 1, |
| 1144 ArrayLastIndexOf: 1, | 1144 ArrayLastIndexOf: 1, |
| 1145 ArrayPush: 1, | 1145 ArrayPush: 1, |
| 1146 ArrayReduce: 1, | 1146 ArrayReduce: 1, |
| 1147 ArrayReduceRight: 1 | 1147 ArrayReduceRight: 1 |
| 1148 }); | 1148 }); |
| 1149 } | 1149 } |
| 1150 | 1150 |
| 1151 | 1151 |
| 1152 SetupArray(); | 1152 SetupArray(); |
| OLD | NEW |