Stream: git-wasmtime

Topic: wasmtime / PR #4849 cranelift: Implement PartialEq on Iee...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 09:45):

afonso360 opened PR #4849 from fcmp-tests to main:

:wave: Hey,

This fixes #4828 by implementing PartialEq in terms of float values for the Ieee{32,64} types.

Previously PartialEq was auto derived. This means that it was implemented in terms of PartialEq in a u32.

This is not correct for floats because NaN != NaN.

PartialOrd was manually implemented in 6d50099816f397c1ff3256d30f742cf041d54e32, but it seems like it was an oversight to leave PartialEq out until now.

The test suite depends on the previous behaviour so we adjust it to keep comparing bits instead of floats.

cc: @jameysharp

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 10:10):

afonso360 updated PR #4849 from fcmp-tests to main.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 10:14):

afonso360 edited PR #4849 from fcmp-tests to main:

:wave: Hey,

This fixes #4828 by implementing PartialEq in terms of float values for the Ieee{32,64} types.

Previously PartialEq was auto derived. This means that it was implemented in terms of PartialEq in a u32.

This is not correct for floats because NaN != NaN.

PartialOrd was manually implemented in 6d50099816f397c1ff3256d30f742cf041d54e32, but it seems like it was an oversight to leave PartialEq out until now.

The test suite depends on the previous behaviour so we adjust it to keep comparing bits instead of floats.

cc: @jameysharp

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 10:46):

afonso360 updated PR #4849 from fcmp-tests to main.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 17:27):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 02 2022 at 17:42):

jameysharp merged PR #4849.


Last updated: Dec 23 2024 at 12:05 UTC