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

Side by Side Diff: test/mjsunit/wasm/gc-stress.js

Issue 2390113003: [wasm] Refactor import handling for 0xC. (Closed)
Patch Set: Fix gc stress failure Created 4 years, 2 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/mjsunit/wasm/function-prototype.js ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --expose-wasm --stress-gc
6
7 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js");
9
10 function run(f) {
11 var builder = new WasmModuleBuilder();
12 builder.addImport("f", kSig_i_i);
13 builder.addFunction("main", kSig_i_i)
14 .addBody([
15 kExprGetLocal, 0,
16 kExprCallFunction, 0])
17 .exportAs("main");
18
19 print("module");
20 var module = new WebAssembly.Module(builder.toBuffer());
21
22 for (var i = 0; i < 10; i++) {
23 print(" instance " + i);
24 var instance = new WebAssembly.Instance(module, {f: f});
25 var g = instance.exports.main;
26 for (var j = 0; j < 10; j++) {
27 assertEquals(f(j), g(j));
28 }
29 }
30 }
31
32 (function test() {
33 for (var i = 0; i < 100; i++) {
34 run(x => (x + 19));
35 run(x => (x - 18));
36 }
37 })();
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/function-prototype.js ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698