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

Side by Side Diff: test/mjsunit/regress/regress-599710.js

Issue 1863123002: [crankshaft] Make infinite loop preserve control flow. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Flags: --allow-natives-syntax
6
7 var f1 = function() { while (1) { } }
8
9 function g1() {
10 var s = "hey";
11 f1 = function() { return true; }
12 if (f1()) { return s; }
13 }
14
15 %OptimizeFunctionOnNextCall(g1);
16 assertEquals("hey", g1());
17
18 var f2 = function() { do { } while (1); }
19
20 function g2() {
21 var s = "hey";
22 f2 = function() { return true; }
23 if (f2()) { return s; }
24 }
25
26 %OptimizeFunctionOnNextCall(g2);
27 assertEquals("hey", g2());
28
29 var f3 = function() { for (;;); }
30
31 function g3() {
32 var s = "hey";
33 f3 = function() { return true; }
34 if (f3()) { return s; }
35 }
36
37 %OptimizeFunctionOnNextCall(g3);
38 assertEquals("hey", g3());
39
40 var f4 = function() { for (;;); }
41
42 function g4() {
43 var s = "hey";
44 f4 = function() { return true; }
45 while (f4()) { return s; }
46 }
47
48 %OptimizeFunctionOnNextCall(g4);
49 assertEquals("hey", g4());
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698