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

Side by Side Diff: test/mjsunit/wasm/asm-wasm.js

Issue 2693993002: [asm-wasm] Fix continue target of do-while loops (Closed)
Patch Set: Fix comment 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 | « src/asmjs/asm-wasm-builder.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
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 // Flags: --validate-asm --allow-natives-syntax 5 // Flags: --validate-asm --allow-natives-syntax
6 6
7 var stdlib = this; 7 var stdlib = this;
8 8
9 function assertValidAsm(func) { 9 function assertValidAsm(func) {
10 assertTrue(%IsAsmWasmCode(func)); 10 assertTrue(%IsAsmWasmCode(func));
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 return ret|0; 404 return ret|0;
405 } 405 }
406 406
407 return {caller: caller}; 407 return {caller: caller};
408 } 408 }
409 409
410 assertWasm(20, TestContinueInNamedWhile); 410 assertWasm(20, TestContinueInNamedWhile);
411 411
412 412
413 function TestContinueInDoWhileFalse() {
414 "use asm";
415
416 function caller() {
417 do {
418 continue;
419 } while (false);
420 return 47;
421 }
422
423 return {caller: caller};
424 }
425
426 assertWasm(47, TestContinueInDoWhileFalse);
427
428
413 function TestNot() { 429 function TestNot() {
414 "use asm"; 430 "use asm";
415 431
416 function caller() { 432 function caller() {
417 var a = 0; 433 var a = 0;
418 a = !(2 > 3); 434 a = !(2 > 3);
419 return a | 0; 435 return a | 0;
420 } 436 }
421 437
422 return {caller:caller}; 438 return {caller:caller};
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 "use asm"; 1752 "use asm";
1737 function foo() { 1753 function foo() {
1738 return 42; 1754 return 42;
1739 } 1755 }
1740 return {bar: foo, baz: foo}; 1756 return {bar: foo, baz: foo};
1741 } 1757 }
1742 var m = asmModule(); 1758 var m = asmModule();
1743 assertEquals(42, m.bar()); 1759 assertEquals(42, m.bar());
1744 assertEquals(42, m.baz()); 1760 assertEquals(42, m.baz());
1745 })(); 1761 })();
OLDNEW
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698