Update the guest C generator for world-based generation#396
Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom Oct 25, 2022
Merged
Update the guest C generator for world-based generation#396alexcrichton merged 1 commit intobytecodealliance:mainfrom
alexcrichton merged 1 commit intobytecodealliance:mainfrom
Conversation
Member
Author
|
This'll certainly conflict with #392 so I think it's best to hold off on merging this until that's in. |
pchickey
approved these changes
Oct 25, 2022
This commit removes the `Generator` trait impl for the C generator and adds the `WorldGenerator` trait impl to replace it. This is the equivalent of bytecodealliance#386 for the guest C generator. The generated C code is largely the same, except that the entire world is represented in one header file instead of per-interface header files as before. Additionally a tiny amount of "type sharing" is now done where all interfaces share the same string type (namespaced by the world name). More type sharing should come with a more first-class implementation of worlds. There was quite a lot of code movement within the generator as I got it working again, but at the surface level very little has changed and it should largely be the same as before.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit removes the
Generatortrait impl for the C generator and adds theWorldGeneratortrait impl to replace it. This is the equivalent of #386 for the guest C generator.The generated C code is largely the same, except that the entire world is represented in one header file instead of per-interface header files as before. Additionally a tiny amount of "type sharing" is now done where all interfaces share the same string type (namespaced by the world name). More type sharing should come with a more first-class implementation of worlds.
There was quite a lot of code movement within the generator as I got it working again, but at the surface level very little has changed and it should largely be the same as before.