Skip to content

Conversation

@vados-cosmonic
Copy link
Contributor

@vados-cosmonic vados-cosmonic commented Nov 12, 2025

This commit fixes a few issues in the async return machinery:

  1. Instruction::Return calculation of amt for functions with no
    return values

  2. Missing use of Instruction::AsyncTaskReturn

  3. Determination of whether to pass a pointer or flat params for async functions

Both issues were in the function with no result case:

For (1), the code did not take into account that the async
functions always return at least the async state (a single i64).

For (2), the code did not use an Instruction::AsyncTaskReturn, rather
than a regular Instruction::Return

For (3), the code did not take into account whether the number of
results was lower than the max flattened values or not

@vados-cosmonic vados-cosmonic force-pushed the fix(core)=return-instruction-amt branch 5 times, most recently from 9928b44 to 84b2d2a Compare November 12, 2025 10:44
This commit fixes a few issues in the async return machinery:

1. `Instruction::Return` calculation of `amt` for functions with no
return values

2. Missing use of `Instruction::AsyncTaskReturn`

3. Determination of whether to pass a pointer or flat params for async functions

Both issues were in the function with no result case:

For (1), the code did not take into account that the async
functions *always* return at least the async state (a single i64).

For (2), the code did not use an `Instruction::AsyncTaskReturn`, rather
than a regular `Instruction::Return`

For (3), the code did not take into account whether the number of
results was lower than the max flattened values or not
@vados-cosmonic vados-cosmonic force-pushed the fix(core)=return-instruction-amt branch from 84b2d2a to 07300a8 Compare November 12, 2025 10:47
@alexcrichton alexcrichton added this pull request to the merge queue Nov 12, 2025
Merged via the queue into bytecodealliance:main with commit 799fdb6 Nov 12, 2025
22 checks passed
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