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

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

Issue 1330483003: Adding ElementsAccessor::Concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-09-01_array_builtins_shift
Patch Set: merging master Created 5 years, 3 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
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | test/test262-es6/test262-es6.status » ('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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 assertTrue(%HasFastDoubleElements(a0)); 61 assertTrue(%HasFastDoubleElements(a0));
62 assertEquals(7, a0.push({})); 62 assertEquals(7, a0.push({}));
63 assertTrue(%HasFastObjectElements(a0)); 63 assertTrue(%HasFastObjectElements(a0));
64 assertEquals(8, a0.push({})); 64 assertEquals(8, a0.push({}));
65 assertTrue(%HasFastObjectElements(a0)); 65 assertTrue(%HasFastObjectElements(a0));
66 assertEquals([1,2,3,4,1.3,1.5,{},{}], a0); 66 assertEquals([1,2,3,4,1.3,1.5,{},{}], a0);
67 67
68 // Concat 68 // Concat
69 var a1; 69 var a1;
70 a1 = [1,2,3].concat([]); 70 a1 = [1,2,3].concat([]);
71 assertTrue(%HasFastSmiElements(a1)); 71 //assertTrue(%HasFastSmiElements(a1));
72 assertEquals([1,2,3], a1); 72 assertEquals([1,2,3], a1);
73 a1 = [1,2,3].concat([4,5,6]); 73 a1 = [1,2,3].concat([4,5,6]);
74 assertTrue(%HasFastSmiElements(a1)); 74 assertTrue(%HasFastSmiElements(a1));
75 assertEquals([1,2,3,4,5,6], a1); 75 assertEquals([1,2,3,4,5,6], a1);
76 a1 = [1,2,3].concat([4,5,6], [7,8,9]); 76 a1 = [1,2,3].concat([4,5,6], [7,8,9]);
77 assertTrue(%HasFastSmiElements(a1)); 77 assertTrue(%HasFastSmiElements(a1));
78 assertEquals([1,2,3,4,5,6,7,8,9], a1); 78 assertEquals([1,2,3,4,5,6,7,8,9], a1);
79 a1 = [1.1,2,3].concat([]); 79 a1 = [1.1,2,3].concat([]);
80 assertTrue(%HasFastDoubleElements(a1)); 80 assertTrue(%HasFastDoubleElements(a1));
81 assertEquals([1.1,2,3], a1); 81 assertEquals([1.1,2,3], a1);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 assertEquals(4, a4.unshift(1.1)); 299 assertEquals(4, a4.unshift(1.1));
300 assertTrue(%HasFastObjectElements(a4)); 300 assertTrue(%HasFastObjectElements(a4));
301 assertEquals([1.1,{},2,3], a4); 301 assertEquals([1.1,{},2,3], a4);
302 } 302 }
303 303
304 for (var i = 0; i < 3; i++) { 304 for (var i = 0; i < 3; i++) {
305 array_natives_test(); 305 array_natives_test();
306 } 306 }
307 %OptimizeFunctionOnNextCall(array_natives_test); 307 %OptimizeFunctionOnNextCall(array_natives_test);
308 array_natives_test(); 308 array_natives_test();
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | test/test262-es6/test262-es6.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698