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; |