Skip to content

Commit 865b8be

Browse files
authored
delete redundant comparison function methods for BigFloat (#59505)
These are not necessary for either correctness or performance, and are the only such redundant methods in the sysimage.
2 parents 8a384ab + 33af44d commit 865b8be

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

base/mpfr.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,9 +990,7 @@ end
990990
# Utility functions
991991
==(x::BigFloat, y::BigFloat) = ccall((:mpfr_equal_p, libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0
992992
<=(x::BigFloat, y::BigFloat) = ccall((:mpfr_lessequal_p, libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0
993-
>=(x::BigFloat, y::BigFloat) = ccall((:mpfr_greaterequal_p, libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0
994993
<(x::BigFloat, y::BigFloat) = ccall((:mpfr_less_p, libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0
995-
>(x::BigFloat, y::BigFloat) = ccall((:mpfr_greater_p, libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}), x, y) != 0
996994

997995
function cmp(x::BigFloat, y::BigInt)
998996
isnan(x) && return 1

test/core.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8615,6 +8615,11 @@ module M57638_3
86158615
end
86168616
@test M57638_3.x === 1
86178617

8618+
@testset "no unnecessary methods for comparison functions with generically correct and performant fallback methods" begin
8619+
@test (isone length methods)(>, Tuple{Any, Any})
8620+
@test (isone length methods)(>=, Tuple{Any, Any})
8621+
end
8622+
86188623
module GlobalBindingMulti
86198624
module M
86208625
export S

0 commit comments

Comments
 (0)