Skip to content

Commit b8336b3

Browse files
authored
remove extrema definition that is no longer needed for bootstrapping (#46592)
* remove extrema definition that is no longer needed for bootstrapping
1 parent e36e56b commit b8336b3

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

base/compiler/compiler.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -166,21 +166,6 @@ include("compiler/abstractinterpretation.jl")
166166
include("compiler/typeinfer.jl")
167167
include("compiler/optimize.jl")
168168

169-
# required for bootstrap because sort.jl uses extrema
170-
# to decide whether to dispatch to counting sort.
171-
#
172-
# TODO: remove it.
173-
function extrema(x::Array)
174-
isempty(x) && throw(ArgumentError("collection must be non-empty"))
175-
vmin = vmax = x[1]
176-
for i in 2:length(x)
177-
xi = x[i]
178-
vmax = max(vmax, xi)
179-
vmin = min(vmin, xi)
180-
end
181-
return vmin, vmax
182-
end
183-
184169
include("compiler/bootstrap.jl")
185170
ccall(:jl_set_typeinf_func, Cvoid, (Any,), typeinf_ext_toplevel)
186171

test/reduce.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ let x = [4,3,5,2]
263263
@test maximum(x) == 5
264264
@test minimum(x) == 2
265265
@test extrema(x) == (2, 5)
266-
@test Core.Compiler.extrema(x) == (2, 5)
267266

268267
@test maximum(abs2, x) == 25
269268
@test minimum(abs2, x) == 4

0 commit comments

Comments
 (0)