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

Side by Side Diff: test/mjsunit/asm/do-while-false.js

Issue 661923002: Implement graph trimming in ControlReducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use Deque. 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/cctest/compiler/test-run-jsbranches.cc ('k') | test/mjsunit/asm/if-folding.js » ('j') | 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 2014 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 Module() {
6 "use asm";
7
8 function d0() {
9 do { } while(false);
10 return 110;
11 }
12
13 function d1() {
14 do { return 111; } while(false);
15 return 112;
16 }
17
18 function d2() {
19 do { break; } while(false);
20 return 113;
21 }
22
23 function d3(a) {
24 a = a | 0;
25 do { if (a) return 114; } while(false);
26 return 115;
27 }
28
29 function d4(a) {
30 a = a | 0;
31 do { if (a) return 116; else break; } while(false);
32 return 117;
33 }
34
35 function d5(a) {
36 a = a | 0;
37 do { if (a) return 118; } while(false);
38 return 119;
39 }
40
41 function d6(a) {
42 a = a | 0;
43 do {
44 if (a == 0) return 120;
45 if (a == 1) break;
46 if (a == 2) return 122;
47 if (a == 3) continue;
48 if (a == 4) return 124;
49 } while(false);
50 return 125;
51 }
52
53 return {d0: d0, d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6};
54 }
55
56 var m = Module();
57
58 assertEquals(110, m.d0());
59
60 assertEquals(111, m.d1());
61
62 assertEquals(113, m.d2());
63
64 assertEquals(114, m.d3(1));
65 assertEquals(115, m.d3(0));
66
67 assertEquals(116, m.d4(1));
68 assertEquals(117, m.d4(0));
69
70 assertEquals(118, m.d5(1));
71 assertEquals(119, m.d5(0));
72
73 assertEquals(120, m.d6(0));
74 assertEquals(125, m.d6(1));
75 assertEquals(122, m.d6(2));
76 assertEquals(125, m.d6(3));
77 assertEquals(124, m.d6(4));
78 assertEquals(125, m.d6(5));
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-jsbranches.cc ('k') | test/mjsunit/asm/if-folding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698