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

Side by Side Diff: test/mjsunit/wasm/calls.js

Issue 1537643002: Add --enable-wasm to wasm tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « test/mjsunit/wasm/asm-wasm.js ('k') | test/mjsunit/wasm/compile-run-basic.js » ('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
6
5 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
6 8
7 var module = (function () { 9 var module = (function () {
8 var kBodySize = 5; 10 var kBodySize = 5;
9 var kNameOffset = 21 + kBodySize + 1; 11 var kNameOffset = 21 + kBodySize + 1;
10 12
11 return WASM.instantiateModule(bytes( 13 return WASM.instantiateModule(bytes(
12 // -- memory 14 // -- memory
13 kDeclMemory, 15 kDeclMemory,
14 12, 12, 1, 16 12, 12, 1,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 'f', 'l', 't', 0 // name 136 'f', 'l', 't', 0 // name
135 ); 137 );
136 138
137 var module = WASM.instantiateModule(data); 139 var module = WASM.instantiateModule(data);
138 140
139 assertEquals("function", typeof module.flt); 141 assertEquals("function", typeof module.flt);
140 assertEquals(1, module.flt(-2, -1)); 142 assertEquals(1, module.flt(-2, -1));
141 assertEquals(0, module.flt(7.3, 7.1)); 143 assertEquals(0, module.flt(7.3, 7.1));
142 assertEquals(1, module.flt(7.1, 7.3)); 144 assertEquals(1, module.flt(7.1, 7.3));
143 })(); 145 })();
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/asm-wasm.js ('k') | test/mjsunit/wasm/compile-run-basic.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698