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

Unified Diff: test/mjsunit/wasm/wasm-module-builder.js

Issue 2414053002: [wasm] Implement Table#set and Table#grow (Closed)
Patch Set: Avoid lossy int conversion 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/wasm/table.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/wasm-module-builder.js
diff --git a/test/mjsunit/wasm/wasm-module-builder.js b/test/mjsunit/wasm/wasm-module-builder.js
index 94ecebe4684d38b1ee98e4424218d83041c0523f..5c5f6e205b7723a30549488a50d89a148f18d781 100644
--- a/test/mjsunit/wasm/wasm-module-builder.js
+++ b/test/mjsunit/wasm/wasm-module-builder.js
@@ -87,7 +87,7 @@ class WasmFunctionBuilder {
}
exportAs(name) {
- this.module.exports.push({name: name, kind: kExternalFunction, index: this.index});
+ this.module.addExport(name, this.index);
return this;
}
@@ -206,6 +206,11 @@ class WasmModuleBuilder {
return this;
}
+ addExport(name, index) {
+ this.exports.push({name: name, kind: kExternalFunction, index: index});
+ return this;
+ }
+
addDataSegment(addr, data, is_global = false) {
this.segments.push({addr: addr, data: data, is_global: is_global});
return this.segments.length - 1;
« no previous file with comments | « test/mjsunit/wasm/table.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698