Skip to content

compiler: pass interface typecode through defer frames #1040

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 1 commit into from
Apr 9, 2020

Conversation

niaow
Copy link
Member

@niaow niaow commented Apr 8, 2020

Previously, the typecode was passed via a direct reference, which results in invalid IR when the defer is not reached in all return paths. It also results in incorrect behavior if the defer is in a loop, causing all defers to use the typecode of the last iteration.

Previously, the typecode was passed via a direct reference, which results in invalid IR when the defer is not reached in all return paths.
It also results in incorrect behavior if the defer is in a loop, causing all defers to use the typecode of the last iteration.
@niaow niaow added this to the v0.14 milestone Apr 8, 2020
@niaow
Copy link
Member Author

niaow commented Apr 8, 2020

This is a bugfix for #1033.

@niaow niaow requested a review from aykevl April 8, 2020 22:59
Copy link
Member

@aykevl aykevl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I've seen this bug before but didn't investigate yet (https://tinygo.org/lang-support/stdlib/#image-gif).

@aykevl aykevl merged commit 5308e89 into tinygo-org:dev Apr 9, 2020
@niaow niaow modified the milestones: v0.14, v0.13 Apr 9, 2020
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