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

Side by Side Diff: test/mjsunit/array-push13.js

Issue 2497243002: [stubs] Port builtin for Array.push fast-case from Crankshaft to TF (Closed)
Patch Set: Cleanup Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 function __f_17(__v_9) {
6 var __v_10 = 0;
Jakob Kummerow 2016/11/23 17:17:06 nit: unused variable
danno 2016/11/29 14:40:00 Done.
7 for (var count = 0; count < 20000; ++count) {
8 if (count < 100) {
9 __v_9.push(3);
10 } else if (count < 2500) {
11 __v_9.push(2.5);
12 } else {
13 __v_9.push(undefined);
Jakob Kummerow 2016/11/23 17:17:06 nit: I'd push some recognizable sentinel. Maybe |t
danno 2016/11/29 14:40:00 Done.
14 }
15 }
16 return __v_9;
17 }
18
19 let a = __f_17([]);
20 assertEquals(a[0], 3);
21 assertEquals(a[10], 3);
22 assertEquals(a[2499], 2.5);
23 assertEquals(a[10000], undefined);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698