Skip to content

Fix loop RC issues #918

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

Merged
merged 4 commits into from
Oct 20, 2019
Merged

Fix loop RC issues #918

merged 4 commits into from
Oct 20, 2019

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Oct 19, 2019

fixes #897

As reported in the linked issue, there have still been issues with reference counting in loops. In particular

  • for loops didn't release inner locals immediately after the body but relied on general cleanup in continue code, leading to duplicate releases on nested continues
  • do loops performed releases at the wrong time
  • for loops compiled the incrementor too early

@dcodeIO
Copy link
Member Author

dcodeIO commented Oct 20, 2019

Alright, this now implements the code size compromise in that all iterations use the same unified wrapped and non-null states, even if either the first or all subsequent iterations might actually know that vars are wrapped or non-null.

@dcodeIO dcodeIO merged commit 46054db into master Oct 20, 2019
@dcodeIO dcodeIO deleted the issue-897 branch November 8, 2019 01:59
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.

continue in nested cycle cause wasm runtime crash
2 participants