-
Notifications
You must be signed in to change notification settings - Fork 691
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm2c: group imports for a given module into a struct type.
Rather than given each import a magic name we can group imports into a single struct and pass that struct into the init function. This means that in the generated code all access to imported elements now goes via the `g_imports` struct. Note that this is not a pointer but a copy of the passed in struct, to avoid adding any extra indirection. This can be considered one step towards module instancing. It also avoids the need for name mangling since individual imports no longer live in the global namespace.
- Loading branch information
Showing
3 changed files
with
76 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters