Skip to content

Add offset parameter to BinaryenSetFunctionTable#2380

Merged
kripken merged 2 commits intoWebAssembly:masterfrom
dcodeIO:setfunctiontable-offset
Oct 11, 2019
Merged

Add offset parameter to BinaryenSetFunctionTable#2380
kripken merged 2 commits intoWebAssembly:masterfrom
dcodeIO:setfunctiontable-offset

Conversation

@dcodeIO
Copy link
Copy Markdown
Contributor

@dcodeIO dcodeIO commented Oct 11, 2019

This PR adds an offset parameter to BinaryenSetFunctionTable so table elements can start at the value of an (imported constant) global. Previously, the offset was fixed to zero. As usual this is a breaking change to the C-API but backwards compatible when using the JS-API.

Background is that we are currently experimenting with a preliminary dynamic linking mechanism, for example to have a shared runtime that not every module has to ship on its own, and this is a missing building block.

Copy link
Copy Markdown
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dcodeIO!

Seems worth the risk of breakage, as the JS API is compatible, and in C it would not compile. (And for the ABI level there's the changelog.)

@kripken kripken merged commit 4e80fde into WebAssembly:master Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants