Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import wasm memory and table? #684

Closed
kripken opened this issue Aug 28, 2016 · 3 comments
Closed

Import wasm memory and table? #684

kripken opened this issue Aug 28, 2016 · 3 comments

Comments

@kripken
Copy link
Member

kripken commented Aug 28, 2016

In 0xc the wasm memory can be imported. This is useful for

  • General emscripten integration, e.g. the filesystem initialization code can write to memory, so letting wasm import an existing memory avoids us needing the current mergeMemory hack we do (see src/js/wasm.js-post.js).
  • Dynamic linking will also want to import memory, so always importing memory makes things simpler and more consistent.

Practically speaking, this should just need a few changes in src/js/wasm.js-post.js and then for asm2wasm and s2wasm to emit modules that import instead of export memory.

@kripken
Copy link
Member Author

kripken commented Aug 28, 2016

Similar logic motivates importing the table as well.

@kripken kripken changed the title Import wasm memory? Import wasm memory and table? Aug 28, 2016
kripken added a commit that referenced this issue Aug 28, 2016
@kripken
Copy link
Member Author

kripken commented Aug 28, 2016

Memory and table importing implemented in 6c12d22 and f5a0be6 on the stack branch.

kripken added a commit that referenced this issue Aug 30, 2016
kripken added a commit that referenced this issue Sep 7, 2016
@kripken
Copy link
Member Author

kripken commented Nov 24, 2016

This was done.

@kripken kripken closed this as completed Nov 24, 2016
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

No branches or pull requests

1 participant