| 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 bfc4460d91b899d4ca640502cbfd625ef35ea1b4..f52720dba2203e7d5a3d6456c3244d0ee8b7c145 100644
|
| --- a/test/mjsunit/wasm/wasm-module-builder.js
|
| +++ b/test/mjsunit/wasm/wasm-module-builder.js
|
| @@ -36,6 +36,7 @@ function WasmModuleBuilder() {
|
| this.function_table = [];
|
| this.data_segments = [];
|
| this.explicit = [];
|
| + this.pad = null;
|
| return this;
|
| }
|
|
|
| @@ -48,6 +49,11 @@ WasmModuleBuilder.prototype.addMemory = function(min, max, exp) {
|
| return this;
|
| }
|
|
|
| +WasmModuleBuilder.prototype.addPadFunctionTable = function(size) {
|
| + this.pad = size;
|
| + return this;
|
| +}
|
| +
|
| WasmModuleBuilder.prototype.addExplicitSection = function(bytes) {
|
| this.explicit.push(bytes);
|
| return this;
|
| @@ -323,6 +329,15 @@ WasmModuleBuilder.prototype.toArray = function(debug) {
|
| });
|
| }
|
|
|
| + // Add an indirect function table pad section.
|
| + if (wasm.pad !== null) {
|
| + if (debug)
|
| + print("emitting indirect function table pad @ " + bytes.length);
|
| + emit_section(bytes, kDeclFunctionTablePad, function(bytes) {
|
| + emit_varint(bytes, wasm.pad);
|
| + });
|
| + }
|
| +
|
| // End the module.
|
| if (debug) print("emitting end @ " + bytes.length);
|
| emit_section(bytes, kDeclEnd, function(bytes) {});
|
|
|