Skip to content

Commit

Permalink
replace tabs with spaces in code (#39532)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Feb 5, 2021
1 parent 6159633 commit fc89276
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions base/irrationals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ end
round(x::Irrational, r::RoundingMode) = round(float(x), r)

"""
@irrational sym val def
@irrational(sym, val, def)
@irrational sym val def
@irrational(sym, val, def)
Define a new `Irrational` value, `sym`, with pre-computed `Float64` value `val`,
and arbitrary-precision definition in terms of `BigFloat`s given by the expression `def`.
Expand Down
6 changes: 3 additions & 3 deletions base/special/hyperbolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# ====================================================

@inline function exthorner(x, p::Tuple)
# polynomial evaluation using compensated summation.
# much more accurate, especially when lo can be combined with other rounding errors
# polynomial evaluation using compensated summation.
# much more accurate, especially when lo can be combined with other rounding errors
hi, lo = p[end], zero(x)
for i in length(p)-1:-1:1
pi = p[i]
Expand Down Expand Up @@ -112,7 +112,7 @@ function cosh(x::T) where T<:Union{Float32,Float64}
# return cosh(x) = = (exp(x) + exp(-x))/2
# e) H_LARGE_X <= x
# return cosh(x) = exp(x/2)/2 * exp(x/2)
# Note that this branch automatically deals with Infs and NaNs
# Note that this branch automatically deals with Infs and NaNs

absx = abs(x)
if absx <= COSH_SMALL_X(T)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ artifact_dir = ""
cacert = ""

function __init__()
global artifact_dir = dirname(Sys.BINDIR)
global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem")
global artifact_dir = dirname(Sys.BINDIR)
global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem")
end

# JLLWrappers API compatibility shims. Note that not all of these will really make sense.
Expand Down
6 changes: 3 additions & 3 deletions stdlib/p7zip_jll/src/p7zip_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ end

function p7zip(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH)
withenv(env...) do
return f(p7zip_path)
end
withenv(env...) do
return f(p7zip_path)
end
end
function p7zip(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true)
env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH)
Expand Down
2 changes: 1 addition & 1 deletion test/bitset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ end

@test intersect(BitSet([1,2,3])) == BitSet([1,2,3])
@test intersect(BitSet(1:7), BitSet(3:10)) ==
intersect(BitSet(3:10), BitSet(1:7)) == BitSet(3:7)
intersect(BitSet(3:10), BitSet(1:7)) == BitSet(3:7)
@test intersect(BitSet(1:10), BitSet(1:4), 1:5, [2,3,10]) == BitSet([2,3])
end

Expand Down
4 changes: 2 additions & 2 deletions test/compiler/inline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ end

# check that div can be fully eliminated
function f_div(x)
div(x, 1)
return x
div(x, 1)
return x
end
@test fully_eliminated(f_div, (Int,)) == 1
# ...unless we div by an unknown amount
Expand Down
2 changes: 1 addition & 1 deletion test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ function foo23996(xs...)
bar(::AbstractFloat) = push!(rets, 2)
bar(::Bool) = foobar()
for x in xs
bar(x)
bar(x)
end
rets
end
Expand Down
30 changes: 15 additions & 15 deletions test/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1175,33 +1175,33 @@ end

# WeakKeyDict soundness (#38727)
mutable struct ComparesWithGC38727
i::Int
i::Int
end
const armed = Ref{Bool}(true)
@noinline fwdab38727(a, b) = invoke(Base.isequal, Tuple{Any, WeakRef}, a, b)
function Base.isequal(a::ComparesWithGC38727, b::WeakRef)
# This GC.gc() here simulates a GC during compilation in the original issue
armed[] && GC.gc()
armed[] = false
fwdab38727(a, b)
# This GC.gc() here simulates a GC during compilation in the original issue
armed[] && GC.gc()
armed[] = false
fwdab38727(a, b)
end
Base.isequal(a::WeakRef, b::ComparesWithGC38727) = isequal(b, a)
Base.:(==)(a::ComparesWithGC38727, b::ComparesWithGC38727) = a.i == b.i
Base.hash(a::ComparesWithGC38727, u::UInt) = Base.hash(a.i, u)
function make_cwgc38727(wkd, i)
f = ComparesWithGC38727(i)
function fin(f)
f.i = -1
end
finalizer(fin, f)
f
f = ComparesWithGC38727(i)
function fin(f)
f.i = -1
end
finalizer(fin, f)
f
end
@noinline mk38727(wkd) = wkd[make_cwgc38727(wkd, 1)] = nothing
function bar()
wkd = WeakKeyDict{Any, Nothing}()
mk38727(wkd)
armed[] = true
z = getkey(wkd, ComparesWithGC38727(1), missing)
wkd = WeakKeyDict{Any, Nothing}()
mk38727(wkd)
armed[] = true
z = getkey(wkd, ComparesWithGC38727(1), missing)
end
# Run this twice, in case compilation the first time around
# masks something.
Expand Down
8 changes: 4 additions & 4 deletions test/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,10 @@ end
@test eltype(Iterators.Stateful("a")) == Char
# Interaction of zip/Stateful
let a = Iterators.Stateful("a"), b = ""
@test isempty(collect(zip(a,b)))
@test !isempty(a)
@test isempty(collect(zip(b,a)))
@test !isempty(a)
@test isempty(collect(zip(a,b)))
@test !isempty(a)
@test isempty(collect(zip(b,a)))
@test !isempty(a)
end
let a = Iterators.Stateful("a"), b = "", c = Iterators.Stateful("c")
@test isempty(collect(zip(a,b,c)))
Expand Down
2 changes: 1 addition & 1 deletion test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ end
@test (@inferred hypot(T(1e10), T(1e10), T(1e10), T(1e10))) 2e10
@test isnan_type(T, hypot(T(3), T(3//4), T(NaN)))
@test hypot(T(1), T(0)) === T(1)
@test hypot(T(1), T(0), T(0)) === T(1)
@test hypot(T(1), T(0), T(0)) === T(1)
@test (@inferred hypot(T(Inf), T(Inf), T(Inf))) == T(Inf)
for s in (zero(T), floatmin(T)*1e3, floatmax(T)*1e-3, T(Inf))
@test hypot(1s, 2s) s * hypot(1, 2) rtol=8eps(T)
Expand Down

0 comments on commit fc89276

Please sign in to comment.