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

Refactored design #15

Closed
wants to merge 1 commit into from
Closed

Refactored design #15

wants to merge 1 commit into from

Conversation

fgmccabe
Copy link
Collaborator

@fgmccabe fgmccabe commented Jul 13, 2022

This is a potential revision of the task-based design.

We have dropped the use of event.switch instruction, together with associated use of event tags.
A task function can return normally; in which case it must return a vector of arguments that matches what it does when suspending.

Resuming a task is analogous; there is a vector of values that encodes the resuming event.

Exceptions are propagated: if a task function throws an exception then the current parent must handle it.

Remaining wart: the task function is both more regular than before and less: it has an additional argument representing the first resume event for the task.

Remaining todo: the task.retire instruction is probably redundant at this point.

  Without event instructions
  Returning from a task function ends it
  Use regular multi-argument return conventions
@fgmccabe
Copy link
Collaborator Author

Closing as there are enough issues with this approach to merit an alternate design

@fgmccabe fgmccabe closed this Aug 10, 2022
dhil added a commit to dhil/wasm-stack-switching that referenced this pull request Apr 12, 2024
dhil added a commit to dhil/wasm-stack-switching that referenced this pull request Apr 12, 2024
This is a quick pass over the overview document. I have added type annotations and the tag filter list on `resume_throw`.

---------

Co-authored-by: Andreas Rossberg <[email protected]>
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