Skip to content

feat: multi-value returns#3021

Draft
JairusSW wants to merge 6 commits intoAssemblyScript:mainfrom
JairusSW:main
Draft

feat: multi-value returns#3021
JairusSW wants to merge 6 commits intoAssemblyScript:mainfrom
JairusSW:main

Conversation

@JairusSW
Copy link
Copy Markdown
Contributor

@JairusSW JairusSW commented Apr 27, 2026

This PR adds basic support for the Multi-Value Proposal. For a tuple type to be considered for multi-value, it must be explicitly marked with readonly first.

Related: #1633 #1425

So far, this adds basic compiler/binaryen support for outputting multi-value returns, but does not support things like indexing yet

I'm thinking that the next PR should add support type checking for tuples/multi-values, support indexing, and add an SROA pass to identify array literals vs tuples. After that, full support for tuples probably based off of warpo's implementation

  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@JairusSW JairusSW changed the title feat: add initial support for multi-value returns feat: multi-value returns Apr 27, 2026
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.

1 participant