| 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 98a5026379fba4fac57edfc439121f6fbc8b0976..5c5df798fbc9126c780a50a2a26eb9f37a82f4f6 100644
|
| --- a/test/mjsunit/wasm/wasm-module-builder.js
|
| +++ b/test/mjsunit/wasm/wasm-module-builder.js
|
| @@ -109,6 +109,8 @@ class WasmModuleBuilder {
|
| this.table = [];
|
| this.segments = [];
|
| this.explicit = [];
|
| + this.pad = null;
|
| + return this;
|
| }
|
|
|
| addStart(start_index) {
|
| @@ -120,6 +122,11 @@ class WasmModuleBuilder {
|
| return this;
|
| }
|
|
|
| + addPadFunctionTable(size) {
|
| + this.pad = size;
|
| + return this;
|
| + }
|
| +
|
| addExplicitSection(bytes) {
|
| this.explicit.push(bytes);
|
| return this;
|
| @@ -331,6 +338,19 @@ class WasmModuleBuilder {
|
| });
|
| }
|
|
|
| + // Add an indirect function table pad section.
|
| + if (wasm.pad !== null) {
|
| + if (debug)
|
| + print("emitting indirect function table pad @ " + binary.length);
|
| + binary.emit_section(kDeclFunctionTablePad, section => {
|
| + section.emit_varint(wasm.pad);
|
| + });
|
| + }
|
| +
|
| + // End the module.
|
| + if (debug) print("emitting end @ " + binary.length);
|
| + binary.emit_section(kDeclEnd, section => {});
|
| +
|
| return binary;
|
| }
|
|
|
|
|