diff --git a/src/mono/wasm/runtime/jiterpreter-interp-entry.ts b/src/mono/wasm/runtime/jiterpreter-interp-entry.ts index f15bb676d8d11c..9ef4563a02f625 100644 --- a/src/mono/wasm/runtime/jiterpreter-interp-entry.ts +++ b/src/mono/wasm/runtime/jiterpreter-interp-entry.ts @@ -298,7 +298,7 @@ function flush_wasm_entry_trampoline_jit_queue() { for (let i = 0; i < trampImports.length; i++) builder.markImportAsUsed(trampImports[i][0]); - builder._generateImportSection(); + builder._generateImportSection(false); // Function section builder.beginSection(3); diff --git a/src/mono/wasm/runtime/jiterpreter-jit-call.ts b/src/mono/wasm/runtime/jiterpreter-jit-call.ts index 8c98c06577669b..4f859c627121fd 100644 --- a/src/mono/wasm/runtime/jiterpreter-jit-call.ts +++ b/src/mono/wasm/runtime/jiterpreter-jit-call.ts @@ -404,7 +404,7 @@ export function mono_interp_flush_jitcall_queue(): void { for (let i = 0; i < trampImports.length; i++) builder.markImportAsUsed(trampImports[i][0]); - builder._generateImportSection(); + builder._generateImportSection(false); // Function section builder.beginSection(3); diff --git a/src/mono/wasm/runtime/jiterpreter-support.ts b/src/mono/wasm/runtime/jiterpreter-support.ts index aec7214d040197..5aed1ad286feec 100644 --- a/src/mono/wasm/runtime/jiterpreter-support.ts +++ b/src/mono/wasm/runtime/jiterpreter-support.ts @@ -242,7 +242,7 @@ export class WasmBuilder { const result: any = { c: this.getConstants(), m: { h: (Module).asm.memory }, - f: { f: getWasmFunctionTable() }, + // f: { f: getWasmFunctionTable() }, }; const importsToEmit = this.getImportsToEmit(); @@ -520,6 +520,9 @@ export class WasmBuilder { const importsToEmit = this.getImportsToEmit(); this.lockImports = true; + if (includeFunctionTable !== false) + throw new Error("function table imports are disabled"); + // Import section this.beginSection(2); this.appendULeb( @@ -687,7 +690,9 @@ export class WasmBuilder { this.endSection(); } - call_indirect(functionTypeName: string, tableIndex: number) { + call_indirect(/* functionTypeName: string, tableIndex: number */) { + throw new Error("call_indirect unavailable"); + /* const type = this.functionTypes[functionTypeName]; if (!type) throw new Error("No function type named " + functionTypeName); @@ -695,6 +700,7 @@ export class WasmBuilder { this.appendU8(WasmOpcode.call_indirect); this.appendULeb(typeIndex); this.appendULeb(tableIndex); + */ } callImport(name: string) { diff --git a/src/mono/wasm/runtime/jiterpreter.ts b/src/mono/wasm/runtime/jiterpreter.ts index f04f0b8f4800bb..bd52a8e166c875 100644 --- a/src/mono/wasm/runtime/jiterpreter.ts +++ b/src/mono/wasm/runtime/jiterpreter.ts @@ -837,7 +837,7 @@ function generate_wasm( } ); - builder.emitImportsAndFunctions(); + builder.emitImportsAndFunctions(false); if (!keep) { if (ti && (ti.abortReason === "end-of-body"))