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

Clear stack map data structures upon FunctionBuilderContext reuse #8962

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Jul 15, 2024

We were previously failing to clear self.stack_map_vars and self.stack_map_values. Clearing self.dfs is not strictly necessary, since calling self.dfs.iter() internally clears its internal data before iteration begins, but its nice to tidy up anyways. Additionally, match on all the fields of self so that if we add more, we get compiler errors to remind us to clear the new fields as well.

We were previously failing to clear `self.stack_map_vars` and
`self.stack_map_values`. Clearing `self.dfs` is not strictly necessary, since
calling `self.dfs.iter()` internally clears its internal data before iteration
begins, but its nice to tidy up anyways. Additionally, match on all the fields
of `self` so that if we add more, we get compiler errors to remind us to clear
the new fields as well.
@fitzgen fitzgen requested a review from a team as a code owner July 15, 2024 23:22
@fitzgen fitzgen requested review from elliottt and removed request for a team July 15, 2024 23:22
@fitzgen fitzgen added this pull request to the merge queue Jul 16, 2024
Merged via the queue into bytecodealliance:main with commit 51948ef Jul 16, 2024
37 checks passed
@fitzgen fitzgen deleted the clear-stack-map-data-in-frontend-context branch July 16, 2024 01:40
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