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

chore(compiler): make unused variable validation more efficient #887

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

goto-bus-stop
Copy link
Member

A small thing I was doing for #883 but we merged that early ;)

The validation used a hash map and two hash sets. We can do the exact same validation with only a hash map, by first putting all declared variables in the hash map, and removing variables as we see them used. Then at the end we only have unused variables in the map.

The validation used a hash map and two hash sets. We can do the exact
same validation with only a hash map, by first putting all declared variables
in the hash map, and removing variables as we see them used. Then at the end we
only have unused variables in the map.
@goto-bus-stop goto-bus-stop merged commit cca19a5 into main Jul 23, 2024
12 checks passed
@goto-bus-stop goto-bus-stop deleted the renee/simplify-validate-unused branch July 23, 2024 15:00
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