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

Side by Side Diff: test/mjsunit/array-natives-elements.js

Issue 656683003: Revert "Remove SmartMove, bringing Array methods further into spec compliance" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « test/mjsunit/array-functions-prototype-misc.js ('k') | test/mjsunit/array-shift2.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 assertTrue(%HasFastSmiElements(a4)); 273 assertTrue(%HasFastSmiElements(a4));
274 assertEquals([1,1,2,3], a4); 274 assertEquals([1,1,2,3], a4);
275 a4 = [1,2,3]; 275 a4 = [1,2,3];
276 a4.unshift(1.1); 276 a4.unshift(1.1);
277 // TODO(verwaest): We'll want to support double unshifting as well. 277 // TODO(verwaest): We'll want to support double unshifting as well.
278 // assertTrue(%HasFastDoubleElements(a4)); 278 // assertTrue(%HasFastDoubleElements(a4));
279 assertTrue(%HasFastObjectElements(a4)); 279 assertTrue(%HasFastObjectElements(a4));
280 assertEquals([1.1,1,2,3], a4); 280 assertEquals([1.1,1,2,3], a4);
281 a4 = [1.1,2,3]; 281 a4 = [1.1,2,3];
282 a4.unshift(1); 282 a4.unshift(1);
283 assertTrue(%HasFastDoubleElements(a4)); 283 // assertTrue(%HasFastDoubleElements(a4));
284 assertTrue(%HasFastObjectElements(a4));
284 assertEquals([1,1.1,2,3], a4); 285 assertEquals([1,1.1,2,3], a4);
285 a4 = [{},2,3]; 286 a4 = [{},2,3];
286 a4.unshift(1); 287 a4.unshift(1);
287 assertTrue(%HasFastObjectElements(a4)); 288 assertTrue(%HasFastObjectElements(a4));
288 assertEquals([1,{},2,3], a4); 289 assertEquals([1,{},2,3], a4);
289 a4 = [{},2,3]; 290 a4 = [{},2,3];
290 a4.unshift(1.1); 291 a4.unshift(1.1);
291 assertTrue(%HasFastObjectElements(a4)); 292 assertTrue(%HasFastObjectElements(a4));
292 assertEquals([1.1,{},2,3], a4); 293 assertEquals([1.1,{},2,3], a4);
293 } 294 }
294 295
295 for (var i = 0; i < 3; i++) { 296 for (var i = 0; i < 3; i++) {
296 array_natives_test(); 297 array_natives_test();
297 } 298 }
298 %OptimizeFunctionOnNextCall(array_natives_test); 299 %OptimizeFunctionOnNextCall(array_natives_test);
299 array_natives_test(); 300 array_natives_test();
OLDNEW
« no previous file with comments | « test/mjsunit/array-functions-prototype-misc.js ('k') | test/mjsunit/array-shift2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698