Skip to content

Ruby: Do not attempt to track precise hash indices for floats and complex numbers #10639

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

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Sep 30, 2022

As pointed out by @asgerf, the inherent imprecision when comparing floats (and complex numbers) makes them unsuitable for tracking precise hash index information. We therefore simply treat reads and stores with float/complex indices as unknown indices.

@github-actions github-actions bot added the Ruby label Sep 30, 2022
@asgerf
Copy link
Contributor

asgerf commented Sep 30, 2022

I think we should also restrict it in TKnownPairValueContent

@hvitved
Copy link
Contributor Author

hvitved commented Sep 30, 2022

I think we should also restrict it in TKnownPairValueContent

Right, I'll fix.

@hvitved hvitved force-pushed the ruby/dataflow/known-element-no-floats-complexs branch 2 times, most recently from 6f7330b to 781c175 Compare September 30, 2022 07:57
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Sep 30, 2022
asgerf
asgerf previously approved these changes Sep 30, 2022
Copy link
Contributor

@asgerf asgerf left a comment

Choose a reason for hiding this comment

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

LGTM assuming evaluation works out

@hvitved hvitved force-pushed the ruby/dataflow/known-element-no-floats-complexs branch from 781c175 to 3ec43db Compare September 30, 2022 12:58
@hvitved hvitved marked this pull request as ready for review October 1, 2022 08:19
@hvitved hvitved requested a review from a team as a code owner October 1, 2022 08:19
@asgerf asgerf merged commit 47e5623 into github:main Oct 3, 2022
@hvitved hvitved deleted the ruby/dataflow/known-element-no-floats-complexs branch October 3, 2022 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Ruby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants