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

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

Issue 2663243002: [asm] Fix lots of invalid asm.js tests (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « test/mjsunit/asm/do-while.js ('k') | test/mjsunit/asm/float32array-negative-offset.js » ('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 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function Module() { 5 function Module() {
6 "use asm"; 6 "use asm";
7 7
8 function d0() { 8 function d0() {
9 do { } while(false); 9 do { } while(false);
10 return 110; 10 return 110;
(...skipping 23 matching lines...) Expand all
34 34
35 function d5(a) { 35 function d5(a) {
36 a = a | 0; 36 a = a | 0;
37 do { if (a) return 118; } while(false); 37 do { if (a) return 118; } while(false);
38 return 119; 38 return 119;
39 } 39 }
40 40
41 function d6(a) { 41 function d6(a) {
42 a = a | 0; 42 a = a | 0;
43 do { 43 do {
44 if (a == 0) return 120; 44 if ((a | 0) == 0) return 120;
45 if (a == 1) break; 45 if ((a | 0) == 1) break;
46 if (a == 2) return 122; 46 if ((a | 0) == 2) return 122;
47 if (a == 3) continue; 47 if ((a | 0) == 3) continue;
48 if (a == 4) return 124; 48 if ((a | 0) == 4) return 124;
49 } while(false); 49 } while(false);
50 return 125; 50 return 125;
51 } 51 }
52 52
53 return {d0: d0, d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6}; 53 return {d0: d0, d1: d1, d2: d2, d3: d3, d4: d4, d5: d5, d6: d6};
54 } 54 }
55 55
56 var m = Module(); 56 var m = Module();
57 57
58 assertEquals(110, m.d0()); 58 assertEquals(110, m.d0());
(...skipping 10 matching lines...) Expand all
69 69
70 assertEquals(118, m.d5(1)); 70 assertEquals(118, m.d5(1));
71 assertEquals(119, m.d5(0)); 71 assertEquals(119, m.d5(0));
72 72
73 assertEquals(120, m.d6(0)); 73 assertEquals(120, m.d6(0));
74 assertEquals(125, m.d6(1)); 74 assertEquals(125, m.d6(1));
75 assertEquals(122, m.d6(2)); 75 assertEquals(122, m.d6(2));
76 assertEquals(125, m.d6(3)); 76 assertEquals(125, m.d6(3));
77 assertEquals(124, m.d6(4)); 77 assertEquals(124, m.d6(4));
78 assertEquals(125, m.d6(5)); 78 assertEquals(125, m.d6(5));
OLDNEW
« no previous file with comments | « test/mjsunit/asm/do-while.js ('k') | test/mjsunit/asm/float32array-negative-offset.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698