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

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

Issue 1742073002: [wasm] Properly plumb the origin of the WASM module from asm.js translation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/cctest/wasm/wasm-run-utils.h ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('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 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 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 var x = 0; 1533 var x = 0;
1534 x = HEAP32[0] & -1; 1534 x = HEAP32[0] & -1;
1535 return x | 0; 1535 return x | 0;
1536 } 1536 }
1537 return {func: func}; 1537 return {func: func};
1538 } 1538 }
1539 1539
1540 var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString()); 1540 var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString());
1541 assertEquals(0, m.func()); 1541 assertEquals(0, m.func());
1542 })(); 1542 })();
1543
1544 (function TestOutOfBoundsConversion() {
1545 function asmModule($a,$b,$c){'use asm';
1546 function aaa() {
1547 var f = 0.0;
1548 var a = 0;
1549 f = 5616315000.000001;
1550 a = ~~f >>>0;
1551 return a | 0;
1552 }
1553 return { main : aaa };
1554 }
1555 var wasm = _WASMEXP_.instantiateModuleFromAsm(asmModule.toString());
1556 assertEquals(1321347704, wasm.main());
1557 })();
OLDNEW
« no previous file with comments | « test/cctest/wasm/wasm-run-utils.h ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698