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

refactor(ast_tools): improve correctness and performance of idents #8895

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Feb 4, 2025

Refactor. Codegen produces lots of identifiers in the generated code. Ensure they're always prepended with r# if they're reserved words. Speed up checking if a name is a reserved word by using a perfect hash set, rather than iterating through an array.

@github-actions github-actions bot added A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 4, 2025
This was referenced Feb 4, 2025
Copy link
Contributor Author

overlookmotel commented Feb 4, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review February 4, 2025 12:26
Copy link

codspeed-hq bot commented Feb 4, 2025

CodSpeed Performance Report

Merging #8895 will not alter performance

Comparing 02-04-refactor_ast_tools_improve_correctness_and_performance_of_idents (6185619) with main (f4662a9)

Summary

✅ 33 untouched benchmarks

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 4, 2025
@overlookmotel overlookmotel force-pushed the 02-04-refactor_ast_tools_rename_is_visited_to_has_visitor_ branch from 63ca5de to cef5ef1 Compare February 4, 2025 21:56
@overlookmotel overlookmotel force-pushed the 02-04-refactor_ast_tools_improve_correctness_and_performance_of_idents branch from 6b8e955 to 7c8743e Compare February 4, 2025 21:56
Copy link

graphite-app bot commented Feb 4, 2025

Merge activity

  • Feb 4, 5:21 PM EST: The Graphite merge queue removed this pull request due to downstack failures on PR #8881.
  • Feb 4, 10:22 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 4, 10:22 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Feb 4, 10:25 PM UTC: The merge label '0-merge' was removed. This PR will no longer be merged by the Graphite merge queue
  • Feb 4, 10:29 PM UTC: A user added this pull request to the Graphite merge queue.
  • Feb 4, 11:10 PM UTC: A user merged this pull request with the Graphite merge queue.

@graphite-app graphite-app bot added 0-merge Merge with Graphite Merge Queue and removed 0-merge Merge with Graphite Merge Queue labels Feb 4, 2025
…8895)

Refactor. Codegen produces lots of identifiers in the generated code. Ensure they're always prepended with `r#` if they're reserved words. Speed up checking if a name is a reserved word by using a perfect hash set, rather than iterating through an array.
@graphite-app graphite-app bot force-pushed the 02-04-refactor_ast_tools_rename_is_visited_to_has_visitor_ branch from cef5ef1 to 84370a9 Compare February 4, 2025 22:35
@graphite-app graphite-app bot force-pushed the 02-04-refactor_ast_tools_improve_correctness_and_performance_of_idents branch from 7c8743e to 6185619 Compare February 4, 2025 22:36
Base automatically changed from 02-04-refactor_ast_tools_rename_is_visited_to_has_visitor_ to main February 4, 2025 23:08
@graphite-app graphite-app bot merged commit 6185619 into main Feb 4, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 02-04-refactor_ast_tools_improve_correctness_and_performance_of_idents branch February 4, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant