interpret/cast: make more matches on FloatTy properly exhaustive by RalfJung · Pull Request #121997 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation12 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

RalfJung

Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in #121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work.

There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^

r? @tgross35

@RalfJung

@rustbot

Failed to set assignee to tgross35: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Mar 4, 2024

@rustbot

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@RalfJung

tgross35

Choose a reason for hiding this comment

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

Can't r but this looks great, thanks for making my work easier :)

compiler-errors

Choose a reason for hiding this comment

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

thanks ralf, i love exhaustive matches

@compiler-errors

@bors

📌 Commit 86e88fc has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Mar 4, 2024

lqd

@tgross35

@RalfJung @lqd

Co-authored-by: Rémy Rakic remy.rakic+github@gmail.com

@RalfJung

@bors

📌 Commit 681dc38 has been approved by compiler-errors

It is now in the queue for this repository.

@RalfJung

Also adding adding all the tests to Miri would be quite a lot of work

Talk about excellent timing. Getting Miri tests to work with stage0 was a pain point for the proof of concept at https://github.com/rust-lang/rust/pull/114607/files#diff-24bd7b5e2ca32dd28044509d08e68ec5be1c382735128742baec9383acbd6fea. But with a beta branch in only 11 days, that won't be a concern as long as #121926 and some libs support land before then 🎉

That's only an issue for operations that need host floats. Most operations use soft floats which you can implement without any support in the bootstrap compiler. It'd be entirely fine to only land the softfloat operations in the first round.

The tests are a lot of work just because there's so many float operations.^^ And they have so many nasty corner-cases, too.

jhpratt added a commit to jhpratt/rust that referenced this pull request

Mar 5, 2024

@jhpratt

…-errors

interpret/cast: make more matches on FloatTy properly exhaustive

Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work.

There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^

r? @tgross35

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 5, 2024

@bors

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Mar 5, 2024

@matthiaskrgr

…-errors

interpret/cast: make more matches on FloatTy properly exhaustive

Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work.

There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^

r? @tgross35

This was referenced

Mar 5, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 5, 2024

@bors

…iaskrgr

Rollup of 10 pull requests

Successful merges:

r? @ghost @rustbot modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Mar 5, 2024

@rust-timer

Rollup merge of rust-lang#121997 - RalfJung:cast-float-ty, r=compiler-errors

interpret/cast: make more matches on FloatTy properly exhaustive

Actually implementing these is pretty trivial (at least once all the scalar methods are added, which happens in rust-lang#121926), but I'm staying consistent with the other f16/f128 PRs. Also adding adding all the tests to Miri would be quite a lot of work.

There's probably some way to reduce the code duplication here with more use of generics... but that's a future refactor.^^

r? @tgross35

tgross35 added a commit to tgross35/rust that referenced this pull request

Jun 13, 2024

@tgross35

tgross35 added a commit to tgross35/rust that referenced this pull request

Jun 13, 2024

@tgross35

tgross35 added a commit to tgross35/rust that referenced this pull request

Jun 13, 2024

@tgross35

tgross35 added a commit to tgross35/rust that referenced this pull request

Jun 14, 2024

@tgross35

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.