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

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

Issue 1583603002: Add __init__ function to all modules created in asm-to-wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactor
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() { 7 function EmptyTest() {
8 "use asm"; 8 "use asm";
9 function caller() { 9 function caller() {
10 empty(); 10 empty();
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 } 750 }
751 default: return 0; 751 default: return 0;
752 } 752 }
753 return 0; 753 return 0;
754 } 754 }
755 755
756 return {caller:caller}; 756 return {caller:caller};
757 } 757 }
758 758
759 assertEquals(43, _WASMEXP_.asmCompileRun(TestNestedSwitch.toString())); 759 assertEquals(43, _WASMEXP_.asmCompileRun(TestNestedSwitch.toString()));
760
761 function TestInitFunctionWithNoGlobals() {
762 "use asm";
763 function caller() {
764 return 51;
765 }
766 return {caller};
767 }
768
769 var module = _WASMEXP_.instantiateModuleFromAsm(
770 TestInitFunctionWithNoGlobals.toString());
771 module.__init__();
772 assertEquals(51, module.caller());
773
774 function TestExportNameDifferentFromFunctionName() {
775 "use asm";
776 function caller() {
777 return 55;
778 }
779 return {alt_caller:caller};
780 }
781
782 var module = _WASMEXP_.instantiateModuleFromAsm(
783 TestExportNameDifferentFromFunctionName.toString());
784 module.__init__();
785 assertEquals(55, module.alt_caller());
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