do not use ftCall in wasm. #8065
Conversation
…in asm.js, each module has a table, so we need a special mechanism to call between them all; in wasm, they all share a single Table) [ci skip]
|
Does this change the ABI between the WASM and the JS runtime? i.e. Will wasm files produced with this change not work with the JS support files produced before this change? If not, could you increment EMSCRIPTEN_API_MINOR? |
|
About the tests failing on |
|
@kripken so the code generated is as such but it should be generating which eventually gets translated to does this look right? |
|
the problem comes when we use |
|
seems like after my fix there are tests now which says |
|
Yes, what you wrote there sounds right to me. i tagged |
should make js_calls regardless if wasm or not.
|
@kripken i believe i fixed most of the tests except test_binaryen_metadce_. does the test need rebasing? |
|
Yes, that test needs to be updated (in PRs that change the number of imports or exports to the programs it tracks). To do that, you would basically just run the failing test locally and see the value it emits, and update the test accordingly (in this PR, these changes are expected as it is adding dynCalls to the module). I did that now, so you can just apply this diff: |
|
Please also add yourself to AUTHORS. Thanks! |
|
Thanks @kripken the tests passed now. |
|
Great, thanks @waterlike86! |
|
Thanks for merging this @kripken :) Can you release a new emsdk with this PR so that we can consume it? |
|
Sure, tagged 1.38.28 now. Should be binaries in a few hours on the bots. |
|
Thanks @kripken :) We will test it out asap. |
instead, just use dynCalls normally in asm.js, each module has a table, so we need a special mechanism to call between them all; in wasm, they all share a single Table
this PR combines work from https://github.com/emscripten-core/emscripten/compare/no-ftCall-in-wasm
and #8039 into 1
see issue #7679