feat: multi-value support (and tuples too i suppose)#3016
Draft
JairusSW wants to merge 6 commits intoAssemblyScript:mainfrom
Draft
feat: multi-value support (and tuples too i suppose)#3016JairusSW wants to merge 6 commits intoAssemblyScript:mainfrom
JairusSW wants to merge 6 commits intoAssemblyScript:mainfrom
Conversation
a single vs multiple return types
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.
Fixes #1633
This PR adds basic support for the Multi Value Proposal. Some of the major changes are:
TupleTypeNodeto the ASTTupleTypeNode--enable multi-valueto cli and featuresreturnType: Type, we now generally acceptreturnTypes: Type[]across the boardresolveReturnTypes()method that essentially walks all types within the tuple and delegates it toresolveType()I need to add some more tests and probably should wait until binaryen is updated before taking this off draft
I did notice that running
wat2wasmon generated.watwill not compile because binaryen uses atupletype that is not in the WAT spec. I'm assuming that the output of--textFileshouldn't necessarily need to be valid WAT?I intentionally tried to modify as little as possible in this PR while still making it somewhat complete. If you have time while it's still in draft phase, I'd appreciate some basic feedback to make sure I'm going in the right direction here rather than correcting something later on which just requires more time for everyone.
Here's a sort of roadmap for this PR:
binaryenunchecked()??Let me know if there's anything i missed here