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

Test return_call*s to callees that return more values than the caller does #116

Merged
merged 1 commit into from
May 29, 2024

Conversation

fitzgen
Copy link
Contributor

@fitzgen fitzgen commented May 29, 2024

While a call $f; return sequence where $f returns more values than its caller is valid so long as the tail of $f's returns match the caller's returns, however that situation is not valid for return_call $f. Tail callees must return the exact same number of results as the caller, not more. This case was not previously exercised in any of the spec tests.

Procedural note: I am adding all these tests to the function-references proposal to avoid needing to make multiple PRs to multiple repos because return_call_ref was not introduced until this proposal.

@rossberg PTAL

…er does

While a `call $f; return` sequence where `$f` returns more values than its
caller is valid so long as the tail of `$f`'s returns match the caller's
returns, however that situation is not valid for `return_call $f`. Tail callees
must return the exact same number of results as the caller, not more. This case
was not previously exercised in any of the spec tests.

Procedural note: I am adding all these tests to the function-references proposal
to avoid needing to make multiple PRs to multiple repos because
`return_call_ref` was not introduced until this proposal.
@rossberg rossberg merged commit 9660b28 into WebAssembly:main May 29, 2024
1 check passed
@fitzgen fitzgen deleted the test-return-call-more-results branch May 29, 2024 20:58
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.

2 participants