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

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

Issue 1574263002: [wasm] Fix empty asm.js function in ASM->WASM. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/wasm/encoder.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: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 function EmptyTest() {
8 "use asm";
9 function caller() {
10 empty();
11 return 11;
12 }
13 function empty() {
14 }
15 return {caller: caller};
16 }
17
18 assertEquals(11, WASM.asmCompileRun(EmptyTest.toString()));
19
7 function IntTest() { 20 function IntTest() {
8 "use asm"; 21 "use asm";
9 function sum(a, b) { 22 function sum(a, b) {
10 a = a|0; 23 a = a|0;
11 b = b|0; 24 b = b|0;
12 var c = (b + 1)|0 25 var c = (b + 1)|0
13 return (a + c + 1)|0; 26 return (a + c + 1)|0;
14 } 27 }
15 28
16 function caller() { 29 function caller() {
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 } 748 }
736 default: return 0; 749 default: return 0;
737 } 750 }
738 return 0; 751 return 0;
739 } 752 }
740 753
741 return {caller:caller}; 754 return {caller:caller};
742 } 755 }
743 756
744 assertEquals(43, WASM.asmCompileRun(TestNestedSwitch.toString())); 757 assertEquals(43, WASM.asmCompileRun(TestNestedSwitch.toString()));
OLDNEW
« no previous file with comments | « src/wasm/encoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698