Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dfd7bb4
Allow more time for profile print when Sockets and Threads watchdogs …
IanButterworth Feb 17, 2022
ed41f7c
Profile: Minor fixes. Signal handling fix. (#44199)
IanButterworth Feb 17, 2022
54386c7
make `cat(As..., dims=Val((1,2,...))` work (#44211)
thchr Feb 17, 2022
a9d1ad2
Reduce number of `getindex(::Type, ...)` methods (#44127)
martinholters Feb 18, 2022
5f0d551
`AbstractInterpreter`: make it easier to overload pure/concrete-eval …
aviatesk Feb 18, 2022
681e318
set type of statement when processing `GlobalRef`s (#44200)
simeonschaub Feb 18, 2022
9e634bc
fix nothrow check for `get_binding_type` (#44229)
simeonschaub Feb 18, 2022
bd58e0c
Fix build warning in gc-alloc-profiler.cpp: cast to (size_t) (#44180)
NHDaly Feb 18, 2022
a70cfd1
fix bug in `addenv` for environment entries with embedded `=` (#44212)
JeffBezanson Feb 18, 2022
18ea404
fix EscapeAnalysis.jl documentation (#44257)
aviatesk Feb 20, 2022
e84a9de
effects: make `:terminates_globally` functional on recursive function…
aviatesk Feb 20, 2022
e9a82f6
inference: override return type inference by const-prop more carefull…
aviatesk Feb 21, 2022
64a9bb9
[CPUID] Add ISA entries for A64FX and M1 (#44194)
giordano Feb 20, 2022
2e2f214
Fix missing `jl_effective_threads` declaration (#44251)
tkf Feb 19, 2022
f1cb219
fix #44239, regression in keyword args in getindex (#44246)
JeffBezanson Feb 19, 2022
24fc8e2
Fix dot(::Adjoint, ::Adjoint) for numbers that don't commute under mu…
sethaxen Feb 19, 2022
bb6221c
Ensure that `open(::Function, ::Cmd)` waits for termination (#44078)
staticfloat Feb 19, 2022
69407ed
Profile.Allocs: jl_raw_alloc_t.task is untyped pointer (#44269)
jpsamaroo Feb 20, 2022
15977a0
In the `sysimage.mk` Makefile, set the `JULIA_NUM_THREADS=1` environm…
DilumAluthge Feb 20, 2022
8d2f604
Profile: Use grace period to avoid trailing signals from timer (#44268)
IanButterworth Feb 20, 2022
554d2cc
debuginfo: Fix build on 32-bit ARM
dnadlinger Feb 19, 2022
d9849be
Fix aliasing bug in copy!(x, x) for x::AbstractSet and x::AbstractDic…
Ellipse0934 Feb 21, 2022
1193961
Fix bad precompile statements via an output lock (#44252)
IanButterworth Feb 21, 2022
a6f4b5e
Fix thread-safety violation in Allocations Profiler: Create a new per…
NHDaly Feb 22, 2022
e23618d
fix `BLAS.spr!` docstring (#44303)
fkastner Feb 23, 2022
a274328
Fix M1 tail call issue when building (#44279)
gbaraldi Feb 23, 2022
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
6 changes: 3 additions & 3 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,6 @@ include("weakkeydict.jl")

include("env.jl")

# BinaryPlatforms, used by Artifacts
include("binaryplatforms.jl")

# functions defined in Random
function rand end
function randn end
Expand Down Expand Up @@ -336,6 +333,9 @@ using .Order
include("sort.jl")
using .Sort

# BinaryPlatforms, used by Artifacts. Needs `Sort`.
include("binaryplatforms.jl")

# Fast math
include("fastmath.jl")
using .FastMath
Expand Down
10 changes: 6 additions & 4 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1712,13 +1712,15 @@ end
_cs(d, a, b) = (a == b ? a : throw(DimensionMismatch(
"mismatch in dimension $d (expected $a got $b)")))

function dims2cat(::Val{n}) where {n}
n <= 0 && throw(ArgumentError("cat dimension must be a positive integer, but got $n"))
ntuple(i -> (i == n), Val(n))
function dims2cat(::Val{dims}) where dims
if any(≤(0), dims)
throw(ArgumentError("All cat dimensions must be positive integers, but got $dims"))
end
ntuple(in(dims), maximum(dims))
end

function dims2cat(dims)
if any(dims .<= 0)
if any(≤(0), dims)
throw(ArgumentError("All cat dimensions must be positive integers, but got $dims"))
end
ntuple(in(dims), maximum(dims))
Expand Down
5 changes: 4 additions & 1 deletion base/abstractdict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ empty(a::AbstractDict) = empty(a, keytype(a), valtype(a))
empty(a::AbstractDict, ::Type{V}) where {V} = empty(a, keytype(a), V) # Note: this is the form which makes sense for `Vector`.

copy(a::AbstractDict) = merge!(empty(a), a)
copy!(dst::AbstractDict, src::AbstractDict) = merge!(empty!(dst), src)
function copy!(dst::AbstractDict, src::AbstractDict)
dst === src && return dst
merge!(empty!(dst), src)
end

"""
merge!(d::AbstractDict, others::AbstractDict...)
Expand Down
5 changes: 4 additions & 1 deletion base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
eltype(::Type{<:AbstractSet{T}}) where {T} = @isdefined(T) ? T : Any
sizehint!(s::AbstractSet, n) = nothing

copy!(dst::AbstractSet, src::AbstractSet) = union!(empty!(dst), src)
function copy!(dst::AbstractSet, src::AbstractSet)
dst === src && return dst
union!(empty!(dst), src)
end

## set operations (union, intersection, symmetric difference)

Expand Down
17 changes: 10 additions & 7 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,20 @@ julia> getindex(Int8, 1, 2, 3)
"""
function getindex(::Type{T}, vals...) where T
a = Vector{T}(undef, length(vals))
@inbounds for i = 1:length(vals)
a[i] = vals[i]
if vals isa NTuple
@inbounds for i in 1:length(vals)
a[i] = vals[i]
end
else
# use afoldl to avoid type instability inside loop
afoldl(1, vals...) do i, v
@inbounds a[i] = v
return i + 1
end
end
return a
end

getindex(::Type{T}) where {T} = (@inline; Vector{T}())
getindex(::Type{T}, x) where {T} = (@inline; a = Vector{T}(undef, 1); @inbounds a[1] = x; a)
getindex(::Type{T}, x, y) where {T} = (@inline; a = Vector{T}(undef, 2); @inbounds (a[1] = x; a[2] = y); a)
getindex(::Type{T}, x, y, z) where {T} = (@inline; a = Vector{T}(undef, 3); @inbounds (a[1] = x; a[2] = y; a[3] = z); a)

function getindex(::Type{Any}, @nospecialize vals...)
a = Vector{Any}(undef, length(vals))
@inbounds for i = 1:length(vals)
Expand Down
3 changes: 2 additions & 1 deletion base/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ const arch_march_isa_mapping = let
"armv8_0" => get_set("aarch64", "armv8.0-a"),
"armv8_1" => get_set("aarch64", "armv8.1-a"),
"armv8_2_crypto" => get_set("aarch64", "armv8.2-a+crypto"),
"armv8_4_crypto_sve" => get_set("aarch64", "armv8.4-a+crypto+sve"),
"a64fx" => get_set("aarch64", "a64fx"),
"apple_m1" => get_set("aarch64", "apple_m1"),
],
"powerpc64le" => [
"power8" => get_set("powerpc64le", "power8"),
Expand Down
13 changes: 11 additions & 2 deletions base/cmd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,15 @@ setenv(cmd::Cmd, env::Pair{<:AbstractString}...; dir=cmd.dir) =
setenv(cmd, env; dir=dir)
setenv(cmd::Cmd; dir=cmd.dir) = Cmd(cmd; dir=dir)

# split environment entry string into before and after first `=` (key and value)
function splitenv(e::String)
i = findnext('=', e, 2)
if i === nothing
throw(ArgumentError("malformed environment entry"))
end
e[1:prevind(e, i)], e[nextind(e, i):end]
end

"""
addenv(command::Cmd, env...; inherit::Bool = true)

Expand All @@ -282,7 +291,7 @@ function addenv(cmd::Cmd, env::Dict; inherit::Bool = true)
merge!(new_env, ENV)
end
else
for (k, v) in eachsplit.(cmd.env, "=")
for (k, v) in splitenv.(cmd.env)
new_env[string(k)::String] = string(v)::String
end
end
Expand All @@ -301,7 +310,7 @@ function addenv(cmd::Cmd, pairs::Pair{<:AbstractString}...; inherit::Bool = true
end

function addenv(cmd::Cmd, env::Vector{<:AbstractString}; inherit::Bool = true)
return addenv(cmd, Dict(k => v for (k, v) in eachsplit.(env, "=")); inherit)
return addenv(cmd, Dict(k => v for (k, v) in splitenv.(env)); inherit)
end

"""
Expand Down
Loading