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(transformer/class-properties): prefer contains to intersects for bitflags #7747

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Dec 9, 2024

Tiny refactor. contains is clearer than intersects, and they produce equivalent assembly when argument is a single flag value, and statically knowable.

https://godbolt.org/z/bTdfbv3f8

Copy link

graphite-app bot commented Dec 9, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

Copy link
Contributor Author

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

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 9, 2024
@overlookmotel overlookmotel marked this pull request as ready for review December 9, 2024 16:07
@overlookmotel
Copy link
Contributor Author

Tiny change to code I wrote originally, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 9, 2024
Copy link
Contributor Author

overlookmotel commented Dec 9, 2024

Merge activity

  • Dec 9, 11:08 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 9, 11:08 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 9, 11:13 AM EST: A user merged this pull request with the Graphite merge queue.

…cts` for bitflags (#7747)

Tiny refactor. `contains` is clearer than `intersects`, and they produce equivalent assembly when argument is a single flag value, and statically knowable.

https://godbolt.org/z/bTdfbv3f8
@overlookmotel overlookmotel force-pushed the 12-09-refactor_transformer_class-properties_prefer_contains_to_intersects_for_bitflags branch from c617bd9 to 7e0f7eb Compare December 9, 2024 16:09
@graphite-app graphite-app bot merged commit 7e0f7eb into main Dec 9, 2024
25 checks passed
@graphite-app graphite-app bot deleted the 12-09-refactor_transformer_class-properties_prefer_contains_to_intersects_for_bitflags branch December 9, 2024 16:13
Copy link

codspeed-hq bot commented Dec 9, 2024

CodSpeed Performance Report

Merging #7747 will not alter performance

Comparing 12-09-refactor_transformer_class-properties_prefer_contains_to_intersects_for_bitflags (7e0f7eb) with main (463fc5f)

Summary

✅ 29 untouched benchmarks

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-transformer Area - Transformer / Transpiler 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