Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

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

Merged
rossberg merged 1 commit intoWebAssembly:mainfrom
fitzgen:test-return-call-more-results
May 29, 2024
Merged

Test return_call*s to callees that return more values than the caller does#116
rossberg merged 1 commit intoWebAssembly:mainfrom
fitzgen:test-return-call-more-results

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
@fitzgen fitzgen deleted the test-return-call-more-results branch May 29, 2024 20:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants