[PATCH] D44427: [WebAssembly] Add export/import for function pointer table

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 13 07:11:08 PDT 2018


ncw created this revision.
ncw added reviewers: sbc100, sunfish.
Herald added subscribers: llvm-commits, aheejin, jgravelle-google, dschuff, jfb.

This enables callback-style programming where the JavaScript environment can call back into the Wasm environment using a function pointer received from the module.

Currently Emscripten post-processes the Wasm file to add stub functions to enable this. Alon was concerned that when the function table was exported, performance might suffer? I'll do some quick tests to confirm this.


Repository:
  rL LLVM

https://reviews.llvm.org/D44427

Files:
  test/wasm/alias.ll
  test/wasm/call-indirect.ll
  test/wasm/comdats.ll
  test/wasm/cxx-mangling.ll
  test/wasm/entry.ll
  test/wasm/export.ll
  test/wasm/import-table.test
  test/wasm/load-undefined.test
  test/wasm/local-symbols.ll
  test/wasm/locals-duplicate.test
  test/wasm/undefined-weak-call.ll
  test/wasm/visibility-hidden.ll
  test/wasm/weak-alias-overide.ll
  test/wasm/weak-alias.ll
  test/wasm/weak-symbols.ll
  test/wasm/weak-undefined.ll
  wasm/Config.h
  wasm/Driver.cpp
  wasm/Options.td
  wasm/Writer.cpp
  wasm/WriterUtils.cpp
  wasm/WriterUtils.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44427.138179.patch
Type: text/x-patch
Size: 16172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180313/ef10e570/attachment-0001.bin>


More information about the llvm-commits mailing list