From da01ed78f16d6793dfe09f70016efba904bcaf4f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 29 Mar 2016 21:20:33 -0700 Subject: add explicit function types for indirect call targtets in s2wasm --- src/s2wasm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/s2wasm.h b/src/s2wasm.h index 07262d012..5460bf467 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -1305,6 +1305,12 @@ class S2WasmBuilder { block->finalize(); } } + + // ensure an explicit function type for indirect call targets + for (auto& name : wasm.table.names) { + auto* func = wasm.functionsMap[name]; + func->type = ensureFunctionType(getSig(func), &wasm, allocator)->name; + } } template -- cgit v1.2.3