Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply the patch provided in #46640 for typos #46641

Merged
merged 2 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base/accumulate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function accumulate(op, A; dims::Union{Nothing,Integer}=nothing, kw...)
elseif keys(nt) === (:init,)
out = similar(A, promote_op(op, typeof(nt.init), eltype(A)))
else
throw(ArgumentError("acccumulate does not support the keyword arguments $(setdiff(keys(nt), (:init,)))"))
throw(ArgumentError("accumulate does not support the keyword arguments $(setdiff(keys(nt), (:init,)))"))
end
accumulate!(op, out, A; dims=dims, kw...)
end
Expand Down Expand Up @@ -341,7 +341,7 @@ function accumulate!(op, B, A; dims::Union{Integer, Nothing} = nothing, kw...)
elseif keys(kw) === (:init,)
_accumulate!(op, B, A, dims, Some(nt.init))
else
throw(ArgumentError("acccumulate! does not support the keyword arguments $(setdiff(keys(nt), (:init,)))"))
throw(ArgumentError("accumulate! does not support the keyword arguments $(setdiff(keys(nt), (:init,)))"))
end
end

Expand Down
4 changes: 2 additions & 2 deletions base/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ end

function set_compare_strategy!(p::Platform, key::String, f::Function)
if !haskey(p.tags, key)
throw(ArgumentError("Cannot set comparison strategy for nonexistant tag $(key)!"))
throw(ArgumentError("Cannot set comparison strategy for nonexistent tag $(key)!"))
end
p.compare_strategies[key] = f
end

function get_compare_strategy(p::Platform, key::String, default = compare_default)
if !haskey(p.tags, key)
throw(ArgumentError("Cannot get comparison strategy for nonexistant tag $(key)!"))
throw(ArgumentError("Cannot get comparison strategy for nonexistent tag $(key)!"))
end
return get(p.compare_strategies, key, default)
end
Expand Down
4 changes: 2 additions & 2 deletions base/c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ A C-style string composed of the native wide character type
[`Cwchar_t`](@ref)s. `Cwstring`s are NUL-terminated. For
C-style strings composed of the native character
type, see [`Cstring`](@ref). For more information
about string interopability with C, see the
about string interoperability with C, see the
[manual](@ref man-bits-types).

"""
Expand All @@ -142,7 +142,7 @@ A C-style string composed of the native character type
[`Cchar`](@ref)s. `Cstring`s are NUL-terminated. For
C-style strings composed of the native wide character
type, see [`Cwstring`](@ref). For more information
about string interopability with C, see the
about string interoperability with C, see the
[manual](@ref man-bits-types).
"""
Cstring
Expand Down
4 changes: 2 additions & 2 deletions base/checked.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ const UnsignedInt = Union{UInt8,UInt16,UInt32,UInt64,UInt128}

# LLVM has several code generation bugs for checked integer arithmetic (see e.g.
# #4905). We thus distinguish between operations that can be implemented via
# intrinsics, and operations for which we have to provide work-arounds.
# intrinsics, and operations for which we have to provide workarounds.

# Note: As far as this code has been tested, most checked_* functions are
# working fine in LLVM. (Note that division is still handled via `base/int.jl`,
# which always checks for overflow, and which provides its own sets of
# work-arounds for LLVM codegen bugs.) However, the comments in `base/int.jl`
# workarounds for LLVM codegen bugs.) However, the comments in `base/int.jl`
# and in issue #4905 are more pessimistic. For the time being, we thus retain
# the ability to handle codegen bugs in LLVM, until the code here has been
# tested on more systems and architectures. It also seems that things depend on
Expand Down
6 changes: 3 additions & 3 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp
end

if isdefined(method, :recursion_relation)
# We don't recquire the recursion_relation to be transitive, so
# We don't require the recursion_relation to be transitive, so
# apply a hard limit
hardlimit = true
end
Expand Down Expand Up @@ -855,7 +855,7 @@ function concrete_eval_call(interp::AbstractInterpreter,
value = try
Core._call_in_world_total(world, f, args...)
catch
# The evaulation threw. By :consistent-cy, we're guaranteed this would have happened at runtime
# The evaluation threw. By :consistent-cy, we're guaranteed this would have happened at runtime
return ConstCallResults(Union{}, ConcreteResult(result.edge::MethodInstance, result.effects), result.effects)
end
if is_inlineable_constant(value) || call_result_unused(sv)
Expand Down Expand Up @@ -1449,7 +1449,7 @@ function abstract_apply(interp::AbstractInterpreter, argtypes::Vector{Any}, sv::
for j = 1:length(ctypes)
ct = ctypes[j]::Vector{Any}
if isvarargtype(ct[end])
# This is vararg, we're not gonna be able to do any inling,
# This is vararg, we're not gonna be able to do any inlining,
# drop the info
info = nothing
tail = tuple_tail_elem(unwrapva(ct[end]), cti)
Expand Down
6 changes: 3 additions & 3 deletions base/compiler/abstractlattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const IPOResultLattice = typeof(InterConditionalsLattice(PartialsLattice(ConstsL
"""
struct InferenceLattice{L}

The full lattice used for abstract interpration during inference. Takes
The full lattice used for abstract interpretation during inference. Takes
a base lattice and adjoins `LimitedAccuracy`.
"""
struct InferenceLattice{L} <: AbstractLattice
Expand All @@ -85,7 +85,7 @@ is_valid_lattice(lattice::OptimizerLattice, @nospecialize(elem)) =
tmeet(lattice, a, b::Type)

Compute the lattice meet of lattice elements `a` and `b` over the lattice
`lattice`. If `lattice` is `JLTypeLattice`, this is equiavalent to type
`lattice`. If `lattice` is `JLTypeLattice`, this is equivalent to type
intersection. Note that currently `b` is restricted to being a type (interpreted
as a lattice element in the JLTypeLattice sub-lattice of `lattice`).
"""
Expand Down Expand Up @@ -113,7 +113,7 @@ function tmerge end

Compute the lattice ordering (i.e. less-than-or-equal) relationship between
lattice elements `a` and `b` over the lattice `lattice`. If `lattice` is
`JLTypeLattice`, this is equiavalent to subtyping.
`JLTypeLattice`, this is equivalent to subtyping.
"""
function ⊑ end

Expand Down
6 changes: 3 additions & 3 deletions base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ A preparatory linear scan before the escape analysis on `ir` to find:
This array dimension analysis to compute `arrayinfo` is very local and doesn't account
for flow-sensitivity nor complex aliasing.
Ideally this dimension analysis should be done as a part of type inference that
propagates array dimenstions in a flow sensitive way.
propagates array dimensions in a flow sensitive way.
"""
function compute_frameinfo(ir::IRCode, call_resolved::Bool)
nstmts, nnewnodes = length(ir.stmts), length(ir.new_nodes.stmts)
Expand Down Expand Up @@ -1876,13 +1876,13 @@ end
# # COMBAK do we want to enable this (and also backport this to Base for array allocations?)
# import Core.Compiler: Cint, svec
# function validate_foreigncall_args(args::Vector{Any},
# name::Symbol, @nospecialize(rt), argtypes::SimpleVector, nreq::Int, convension::Symbol)
# name::Symbol, @nospecialize(rt), argtypes::SimpleVector, nreq::Int, convention::Symbol)
# length(args) ≥ 5 || return false
# normalize(args[1]) === name || return false
# args[2] === rt || return false
# args[3] === argtypes || return false
# args[4] === vararg || return false
# normalize(args[5]) === convension || return false
# normalize(args[5]) === convention || return false
# return true
# end

Expand Down
8 changes: 4 additions & 4 deletions base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ end
@specialize

function ssa_inlining_pass!(ir::IRCode, linetable::Vector{LineInfoNode}, state::InliningState, propagate_inbounds::Bool)
# Go through the function, performing simple ininlingin (e.g. replacing call by constants
# Go through the function, performing simple inlining (e.g. replacing call by constants
# and analyzing legality of inlining).
@timeit "analysis" todo = assemble_inline_todo!(ir, state)
isempty(todo) && return ir
Expand Down Expand Up @@ -1174,7 +1174,7 @@ function narrow_opaque_closure!(ir::IRCode, stmt::Expr, @nospecialize(info), sta
# Narrow opaque closure type
newT = widenconst(tmeet(OptimizerLattice(), tmerge(OptimizerLattice(), lb, info.unspec.rt), ub))
if newT != ub
# N.B.: Narrowing the ub requires a backdge on the mi whose type
# N.B.: Narrowing the ub requires a backedge on the mi whose type
# information we're using, since a change in that function may
# invalidate ub result.
stmt.args[3] = newT
Expand Down Expand Up @@ -1329,7 +1329,7 @@ function compute_inlining_cases(infos::Vector{MethodMatchInfo},
handled_all_cases &= handle_match!(match, argtypes, flag, state, cases, #=allow_abstract=#true, #=allow_typevars=#true)
elseif length(cases) == 0 && only_method isa Method
# if the signature is fully covered and there is only one applicable method,
# we can try to inline it even in the prescence of unmatched sparams
# we can try to inline it even in the presence of unmatched sparams
# -- But don't try it if we already tried to handle the match in the revisit_idx
# case, because that'll (necessarily) be the same method.
if length(infos) > 1
Expand Down Expand Up @@ -1676,7 +1676,7 @@ function early_inline_special_case(
setting = setting.val
isa(setting, Symbol) || return nothing
setting === :const || setting === :conditional || setting === :type || return nothing
# barrierred successfully already, eliminate it
# barriered successfully already, eliminate it
return SomeCase(stmt.args[3])
end
return nothing
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function has_safe_def(
# if this block has already been examined, bail out to avoid infinite cycles
pred in seen && return false
idx = last(ir.cfg.blocks[pred].stmts)
# NOTE `idx` isn't a load, thus we can use inclusive coondition within the `find_def_for_use`
# NOTE `idx` isn't a load, thus we can use inclusive condition within the `find_def_for_use`
def, _, _ = find_def_for_use(ir, domtree, allblocks, du, idx, true)
# will throw since we already checked this `:new` site doesn't define this field
def == newidx && return false
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ end
# returns `nothing` otherwise
function find_dominating_assignment(id::Int, idx::Int, sv::InferenceState)
block = block_for_inst(sv.cfg, idx)
for pc in reverse(sv.cfg.blocks[block].stmts) # N.B. reverse since the last assignement is dominating this block
for pc in reverse(sv.cfg.blocks[block].stmts) # N.B. reverse since the last assignment is dominating this block
pc < idx || continue # N.B. needs pc ≠ idx as `id` can be assigned at `idx`
stmt = sv.src.code[pc]
isexpr(stmt, :(=)) || continue
Expand Down
4 changes: 2 additions & 2 deletions base/compiler/typelattice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ InterConditional(var::SlotNumber, @nospecialize(thentype), @nospecialize(elsetyp
InterConditional(slot_id(var), thentype, elsetype)

const AnyConditional = Union{Conditional,InterConditional}
Conditional(cnd::InterConditional) = Conditinal(cnd.slot, cnd.thentype, cnd.elsetype)
Conditional(cnd::InterConditional) = Conditional(cnd.slot, cnd.thentype, cnd.elsetype)
InterConditional(cnd::Conditional) = InterConditional(cnd.slot, cnd.thentype, cnd.elsetype)

struct PartialTypeVar
Expand Down Expand Up @@ -106,7 +106,7 @@ struct StateUpdate
end

# Represent that the type estimate has been approximated, due to "causes"
# (only used in abstract interpretion, doesn't appear in optimization)
# (only used in abstract interpretation, doesn't appear in optimization)
# N.B. in the lattice, this is epsilon smaller than `typ` (except Union{})
struct LimitedAccuracy
typ
Expand Down
2 changes: 1 addition & 1 deletion base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ cat_shape(dims, shape::Tuple{}) = () # make sure `cat_shape(dims, ())` do not re
@deprecate unsafe_indices(A) axes(A) false
@deprecate unsafe_length(r) length(r) false

# these were internal type aliases, but some pacakges seem to be relying on them
# these were internal type aliases, but some packages seem to be relying on them
const Any16{N} = Tuple{Any,Any,Any,Any,Any,Any,Any,Any,
Any,Any,Any,Any,Any,Any,Any,Any,Vararg{Any,N}}
const All16{T,N} = Tuple{T,T,T,T,T,T,T,T,
Expand Down
2 changes: 1 addition & 1 deletion base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ end
end
end

@assert h.age == age0 "Muliple concurent writes to Dict detected!"
@assert h.age == age0 "Muliple concurrent writes to Dict detected!"
h.age += 1
h.slots = slots
h.keys = keys
Expand Down
4 changes: 2 additions & 2 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ julia> f(2)
7
```

Anonymous functions can also be defined for multiple argumets.
Anonymous functions can also be defined for multiple arguments.
```jldoctest
julia> g = (x,y) -> x^2 + y^2
#2 (generic function with 1 method)
Expand Down Expand Up @@ -3088,7 +3088,7 @@ unused and delete the entire benchmark code).
```julia
function loop()
for i = 1:1000
# The complier must guarantee that there are 1000 program points (in the correct
# The compiler must guarantee that there are 1000 program points (in the correct
# order) at which the value of `i` is in a register, but has otherwise
# total control over the program.
donotdelete(i)
Expand Down
2 changes: 1 addition & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ See also: [`hardlink`](@ref).

!!! compat "Julia 1.6"
The `dir_target` keyword argument was added in Julia 1.6. Prior to this,
symlinks to nonexistant paths on windows would always be file symlinks, and
symlinks to nonexistent paths on windows would always be file symlinks, and
relative symlinks to directories were not supported.
"""
function symlink(target::AbstractString, link::AbstractString;
Expand Down
4 changes: 2 additions & 2 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ There `where` argument provides the context from where to search for the
package: in this case it first checks if the name matches the context itself,
otherwise it searches all recursive dependencies (from the resolved manifest of
each environment) until it locates the context `where`, and from there
identifies the depdencency with with the corresponding name.
identifies the dependency with with the corresponding name.

```julia-repl
julia> Base.identify_package("Pkg") # Pkg is a dependency of the default environment
Expand Down Expand Up @@ -502,7 +502,7 @@ function locate_project_file(env::String)
end

# classify the LOAD_PATH entry to be one of:
# - `false`: nonexistant / nothing to see here
# - `false`: nonexistent / nothing to see here
# - `true`: `env` is an implicit environment
# - `path`: the path of an explicit project file
function env_project_file(env::String)::Union{Bool,String}
Expand Down
2 changes: 1 addition & 1 deletion base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ end
n == 3 && return x*x*x # keep compatibility with literal_pow
if n < 0
rx = inv(x)
n==-2 && return rx*rx #keep compatability with literal_pow
n==-2 && return rx*rx #keep compatibility with literal_pow
isfinite(x) && (xnlo = -fma(x, rx, -1.) * rx)
x = rx
n = -n
Expand Down
2 changes: 1 addition & 1 deletion base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ end

# Note: the next two functions rely on the following definition of the conversion to Bool:
# convert(::Type{Bool}, x::Real) = x==0 ? false : x==1 ? true : throw(InexactError(...))
# they're used to pre-emptively check in bulk when possible, which is much faster.
# they're used to preemptively check in bulk when possible, which is much faster.
# Also, the functions can be overloaded for custom types T<:Real :
# a) in the unlikely eventuality that they use a different logic for Bool conversion
# b) to skip the check if not necessary
Expand Down
2 changes: 1 addition & 1 deletion base/rational.jl
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ function hash(x::Rational{<:BitInteger64}, h::UInt)
end

# These methods are only needed for performance. Since `first(r)` and `last(r)` have the
# same denominator (because their difference is an integer), `length(r)` can be calulated
# same denominator (because their difference is an integer), `length(r)` can be calculated
# without calling `gcd`.
function length(r::AbstractUnitRange{T}) where T<:Rational
@inline
Expand Down
2 changes: 1 addition & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ function make_typealias(@nospecialize(x::Type))
env = env::SimpleVector
# TODO: In some cases (such as the following), the `env` is over-approximated.
# We'd like to disable `fix_inferred_var_bound` since we'll already do that fix-up here.
# (or detect and reverse the compution of it here).
# (or detect and reverse the computation of it here).
# T = Array{Array{T,1}, 1} where T
# (ti, env) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), T, Vector)
# env[1].ub.var == T.var
Expand Down
4 changes: 2 additions & 2 deletions base/special/log.jl
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ const t_log_table_compact = (
end

# Log implementation that returns 2 numbers which sum to give true value with about 68 bits of precision
# Since `log` only makes sense for positive exponents, we speed up the implimentation by stealing the sign bit
# Since `log` only makes sense for positive exponents, we speed up the implementation by stealing the sign bit
# of the input for an extra bit of the exponent which is used to normalize subnormal inputs.
# Does not normalize results.
# Adapted and modified from https://github.com/ARM-software/optimized-routines/blob/master/math/pow.c
Expand All @@ -575,7 +575,7 @@ function _log_ext(xu)
t, logctail = getfield(t_log_table_compact, Int(i+1))
invc, logc = log_tab_unpack(t)
# Note: invc is j/N or j/N/2 where j is an integer in [N,2N) and
# |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.
# |z/c - 1| < 1/N, so r = z/c - 1 is exactly representable.
r = fma(z, invc, -1.0)
# k*Ln2 + log(c) + r.
t1 = muladd(k, 0.6931471805598903, logc) #ln(2) hi part
Expand Down
2 changes: 1 addition & 1 deletion base/special/trig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ end
#
# Note: tan(y+z) = tan(y) + tan'(y)*z
# ~ tan(y) + (1+y*y)*z
# Therefore, for better accuracz in computing tan(y+z), let
# Therefore, for better accuracy in computing tan(y+z), let
# 3 2 2 2 2
# r = y *(T2+y *(T3+y *(...+y *(T12+y *T13))))
# then
Expand Down
2 changes: 1 addition & 1 deletion base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ julia> io1 = open("same/path", "w")

julia> io2 = open("same/path", "w")

julia> redirect_stdio(f, stdout=io1, stderr=io2) # not suppored
julia> redirect_stdio(f, stdout=io1, stderr=io2) # not supported
```
Also the `stdin` argument may not be the same descriptor as `stdout` or `stderr`.
```julia-repl
Expand Down
2 changes: 1 addition & 1 deletion base/threadingconstructs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ microseconds).

`:static` scheduler creates one task per thread and divides the iterations equally among
them, assigning each task specifically to each thread. In particular, the value of
[`threadid()`](@ref Threads.threadid) is guranteed to be constant within one iteration.
[`threadid()`](@ref Threads.threadid) is guaranteed to be constant within one iteration.
Specifying `:static` is an error if used from inside another `@threads` loop or from a
thread other than 1.

Expand Down
2 changes: 1 addition & 1 deletion base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ or an integer between 0 and 255 inclusive. Note that not all terminals support 2

Keywords `bold=true`, `underline=true`, `blink=true` are self-explanatory.
Keyword `reverse=true` prints with foreground and background colors exchanged,
and `hidden=true` should be invisibe in the terminal but can still be copied.
and `hidden=true` should be invisible in the terminal but can still be copied.
These properties can be used in any combination.

See also [`print`](@ref), [`println`](@ref), [`show`](@ref).
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/distributed-computing.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ The base Julia installation has in-built support for two types of clusters:
should use to connect to this worker.

!!! note
While Julia generally strives for backward compatability, distribution of code to worker processes relies on
While Julia generally strives for backward compatibility, distribution of code to worker processes relies on
[`Serialization.serialize`](@ref). As pointed out in the corresponding documentation, this can not be guaranteed to work across
different Julia versions, so it is advised that all workers on all machines use the same version.

Expand Down
Loading