Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: src/array.js

Issue 6347066: Merge bleeding_edge revisions 6524 and 6552 to 3.0 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/date.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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
164 var length2 = (length << 1) - 1; 164 var length2 = (length << 1) - 1;
165 var j = length2; 165 var j = length2;
166 var i = length; 166 var i = length;
167 elements[--j] = elements[--i]; 167 elements[--j] = elements[--i];
168 while (i > 0) { 168 while (i > 0) {
169 elements[--j] = separator; 169 elements[--j] = separator;
170 elements[--j] = elements[--i]; 170 elements[--j] = elements[--i];
171 } 171 }
172 return %StringBuilderConcat(elements, length2, ''); 172 return %StringBuilderConcat(elements, length2, '');
173 } finally { 173 } finally {
174 // Make sure to pop the visited array no matter what happens. 174 // Make sure to remove the last element of the visited array no
175 if (is_array) visited_arrays.pop(); 175 // matter what happens.
176 if (is_array) visited_arrays.length = visited_arrays.length - 1;
176 } 177 }
177 } 178 }
178 179
179 180
180 function ConvertToString(x) { 181 function ConvertToString(x) {
181 // Assumes x is a non-string. 182 // Assumes x is a non-string.
182 if (IS_NUMBER(x)) return %_NumberToString(x); 183 if (IS_NUMBER(x)) return %_NumberToString(x);
183 if (IS_BOOLEAN(x)) return x ? 'true' : 'false'; 184 if (IS_BOOLEAN(x)) return x ? 'true' : 'false';
184 return (IS_NULL_OR_UNDEFINED(x)) ? '' : %ToString(%DefaultString(x)); 185 return (IS_NULL_OR_UNDEFINED(x)) ? '' : %ToString(%DefaultString(x));
185 } 186 }
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 "lastIndexOf", getFunction("lastIndexOf", ArrayLastIndexOf, 1), 1228 "lastIndexOf", getFunction("lastIndexOf", ArrayLastIndexOf, 1),
1228 "reduce", getFunction("reduce", ArrayReduce, 1), 1229 "reduce", getFunction("reduce", ArrayReduce, 1),
1229 "reduceRight", getFunction("reduceRight", ArrayReduceRight, 1) 1230 "reduceRight", getFunction("reduceRight", ArrayReduceRight, 1)
1230 )); 1231 ));
1231 1232
1232 %FinishArrayPrototypeSetup($Array.prototype); 1233 %FinishArrayPrototypeSetup($Array.prototype);
1233 } 1234 }
1234 1235
1235 1236
1236 SetupArray(); 1237 SetupArray();
OLDNEW
« no previous file with comments | « no previous file | src/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698