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

Side by Side Diff: test/mjsunit/asm/infinite-loops.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/mjsunit/asm/if-reduction.js ('k') | test/mjsunit/asm/infinite-loops-taken.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 w0(a) {
9 a = a | 0;
10 if (a) while (1);
11 return 42;
12 }
13
14 function w1(a) {
15 a = a | 0;
16 while (1) return 42;
17 return 106;
18 }
19
20 function d0(a) {
21 a = a | 0;
22 if (a) do ; while(1);
23 return 42;
24 }
25
26 function d1(a) {
27 a = a | 0;
28 do return 42; while(1);
29 return 107;
30 }
31
32 function f0(a) {
33 a = a | 0;
34 if (a) for (;;) ;
35 return 42;
36 }
37
38 function f1(a) {
39 a = a | 0;
40 for(;;) return 42;
41 return 108;
42 }
43
44 return { w0: w0, w1: w1, d0: d0, d1: d1, f0: f0, f1: f1 };
45 }
46
47 var m = Module();
48 assertEquals(42, m.w0(0));
49 assertEquals(42, m.w1(0));
50 assertEquals(42, m.d0(0));
51 assertEquals(42, m.d1(0));
52 assertEquals(42, m.f0(0));
53 assertEquals(42, m.f1(0));
OLDNEW
« no previous file with comments | « test/mjsunit/asm/if-reduction.js ('k') | test/mjsunit/asm/infinite-loops-taken.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698