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

Side by Side Diff: test/mjsunit/regress/wasm/regression-5863.js

Issue 2640403004: [wasm] Instance exports object should be iterable (Closed)
Patch Set: Created 3 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/wasm-module.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
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
titzer 2017/01/20 09:12:02 Can you move this file into test/mjsunit/wasm ? I
gdeepti 2017/01/20 18:12:10 Moved to test/mjsunit/wasm/instantiate-module-basi
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
6
7 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js");
9
10 (function TestIterableExports() {
11 let builder = new WasmModuleBuilder;
12 builder.addExport("a", builder.addFunction("", kSig_v_v).addBody([]));
13 builder.addExport("b", builder.addFunction("", kSig_v_v).addBody([]));
14 builder.addExport("c", builder.addFunction("", kSig_v_v).addBody([]));
15 builder.addExport("d", builder.addFunction("", kSig_v_v).addBody([]));
16 builder.addExport("e", builder.addGlobal(kWasmI32, false));
17
18 let module = new WebAssembly.Module(builder.toBuffer());
19 let instance = new WebAssembly.Instance(module);
20
21 let exports_count = 0;
22 for (var e in instance.exports) ++exports_count;
23
24 assertEquals(5, exports_count);
25 })();
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698