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

Refine handling of Defer and Go instructions. #307

Open
mlevesquedion opened this issue Apr 22, 2021 · 0 comments
Open

Refine handling of Defer and Go instructions. #307

mlevesquedion opened this issue Apr 22, 2021 · 0 comments

Comments

@mlevesquedion
Copy link
Contributor

A recent PR #305 unearthed some issues with how Defer and Go instructions are handled. These instructions are analogous to Call instructions, with some (important) differences in behavior:

  • Defer occurs when the defer keyword is used, which adds the call to a stack of calls to execute before the function returns.
  • Go starts the call in a new goroutine, meaning from that point on in the program, the instructions in the forked call could be interleaved with subsequent instructions in any order.

Currently, Defer instructions are not handled at all, while Go instructions are handled like regular calls.

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

No branches or pull requests

1 participant