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

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

Issue 2535723009: [wasm][asm.js] Allow a function to be exported more than once. (Closed)
Patch Set: fix Created 4 years 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/wasm-module-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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 var foo = fround(1.25); 1668 var foo = fround(1.25);
1669 function caller() { 1669 function caller() {
1670 foo = fround(foo + fround(1.0)); 1670 foo = fround(foo + fround(1.0));
1671 foo = fround(foo + fround(1.0)); 1671 foo = fround(foo + fround(1.0));
1672 return +foo; 1672 return +foo;
1673 } 1673 }
1674 return {caller: caller}; 1674 return {caller: caller};
1675 } 1675 }
1676 1676
1677 assertWasm(3.25, TestFloatGlobals); 1677 assertWasm(3.25, TestFloatGlobals);
1678
1679
1680 (function TestExportTwice() {
1681 function asmModule() {
1682 "use asm";
1683 function foo() {
1684 return 42;
1685 }
1686 return {bar: foo, baz: foo};
1687 }
1688 var m = asmModule();
1689 assertEquals(42, m.bar());
1690 assertEquals(42, m.baz());
1691 })();
OLDNEW
« no previous file with comments | « src/wasm/wasm-module-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698