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

Backports for 1.0.4 #30954

Merged
merged 41 commits into from
May 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
97add1c
Use `JL_AArch64_crc` instead of `HWCAP_CRC32` (#30324)
staticfloat Dec 9, 2018
9d63c0f
fix bug with max_values in union! (#30315)
rfourquet Dec 11, 2018
7e8d9b2
fix reinterpret for 0-dimensional arrays (#30376)
meggart Dec 14, 2018
0073e42
stacktrace: prevent OOB-error in sysimage lookup (#30369)
vtjnash Dec 17, 2018
4148b76
generalize sparse matrix slicing to integer types (#30319)
dpo Dec 20, 2018
bca2f42
Add custom deserialize method for UmfpackLU to avoid memory leak (#30…
andreasnoack Jan 2, 2019
7786f78
fix `lambda-optimize-vars!` with complex assignment RHSs (#30564)
JeffBezanson Jan 3, 2019
2dc20f7
Add the scaled identity matrix to a random matrix to avoid getting a …
ViralBShah Jan 4, 2019
b6b7413
SHA,tests: cleanup tempdir (#30655)
vtjnash Jan 11, 2019
083bc82
Handle :error and :invalid expressions gracefully in REPL helpmode, (…
fredrikekre Jan 19, 2019
48f6ea7
update macOS icons to be less transparent (#30773)
cormullion Jan 22, 2019
f9dddf8
fix #30792, static param constraints between positional and kw args (…
JeffBezanson Jan 23, 2019
f24bf8b
fix `at-everywhere using` in Distributed stdlib (#30804)
JeffBezanson Jan 23, 2019
ceccebd
fix #30911, bug in `deepcopy` of `UnionAll` (#30930)
JeffBezanson Feb 1, 2019
347bca3
fix #30394, an unsoundness in ml_matches (#30396)
JeffBezanson Dec 17, 2018
af03147
llvm: fix target triple (#30554)
vtjnash Jan 3, 2019
92ecdfd
Fix use counts for mutable struct SROA
Keno Jan 5, 2019
63414f7
Fix #30006, getindex accessing fields that might not exist (#30405)
raghav9-97 Dec 17, 2018
fd1f187
Fix SROA confusing new and old nodes
Keno Jan 7, 2019
8ec20f4
Defensively fix patterns similar to #29983
Keno Jan 5, 2019
54a71f6
fix #30643, correctly propagate iterator traits through Stateful (#30…
denizyuret Jan 9, 2019
2cb487a
Bump Pkg to 1.0.4.
fredrikekre Feb 11, 2019
0b651e0
Use XCode 8.3 for macOS on Travis (#30599)
ararslan Jan 5, 2019
65a22aa
fix #29936, precompile should not assume UnionAlls have stable addres…
JeffBezanson Feb 12, 2019
fc773de
bump MPFR to 4.0.2 (#31041)
simonbyrne Feb 13, 2019
a8758c4
allow chop to take an empty string (#31312)
bicycle1885 Mar 11, 2019
ce6b3cb
build: LDFLAGS needed for FreeBSD build (#31586)
vtjnash Apr 2, 2019
9072796
Improve REPL completions (#30569)
pfitzseb Apr 7, 2019
707fdda
Fix show_vector for long offset arrays with :limit=true (#31642)
timholy Apr 8, 2019
5313c54
Don't modify existing MDNodes in SIMDloop pass.
maleadt Apr 11, 2019
ec0cf97
Pkg resolver update.
fredrikekre Apr 17, 2019
7fb5541
Fix #30006, getindex accessing fields that might not exist (#30405)
raghav9-97 Dec 17, 2018
1d7087d
Fix 29545: Implement unaliascopy for ReinterpretArray (#30296)
mbauman Mar 20, 2019
07279a3
Upgrade `libssh2` version to `1.8.2` (#31775)
staticfloat Apr 20, 2019
a92bfbe
inf or nan parsing should ignore leading spaces
stevengj Apr 12, 2019
639de07
fix parse(ComplexF64, "inf")
stevengj Apr 4, 2019
fa22062
minor fixes in multiplication with Diagonals (#31443)
dkarrasch Apr 4, 2019
11b8f59
fix #31758: out of bounds write in sparse broadcast (#31763)
fredrikekre Apr 19, 2019
c1e1824
Fix `-`, `conj`, and `conj!` for sparse matrices with invalid entries…
martinholters Mar 1, 2019
ef22206
Update Mozilla CA certificate store to latest (01-23-2019) for libgit…
mikhail-j Feb 11, 2019
e5de459
fix #30679, call correct method for `invoke` calls in `jl_invoke` fal…
JeffBezanson Apr 27, 2019
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ matrix:
- gfortran-5
- os: osx
env: ARCH="x86_64"
osx_image: xcode8
osx_image: xcode8.3
cache: ccache
branches:
only:
Expand Down
6 changes: 4 additions & 2 deletions base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ function union!(s::AbstractSet, sets...)
end

max_values(::Type) = typemax(Int)
max_values(T::Type{<:Union{Nothing,BitIntegerSmall}}) = 1 << (8*sizeof(T))
max_values(T::Union) = max(max_values(T.a), max_values(T.b))
max_values(T::Union{map(X -> Type{X}, BitIntegerSmall_types)...}) = 1 << (8*sizeof(T))
# saturated addition to prevent overflow with typemax(Int)
max_values(T::Union) = max(max_values(T.a), max_values(T.b), max_values(T.a) + max_values(T.b))
max_values(::Type{Bool}) = 2
max_values(::Type{Nothing}) = 1

function union!(s::AbstractSet{T}, itr) where T
haslength(itr) && sizehint!(s, length(s) + length(itr))
Expand Down
7 changes: 4 additions & 3 deletions base/arrayshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,11 @@ function show_vector(io::IO, v, opn='[', cls=']')
io = IOContext(io, :typeinfo => eltype(v), :compact => get(io, :compact, true))
limited = get(io, :limit, false)
if limited && length(v) > 20
inds = axes1(v)
show_delim_array(io, v, opn, ",", "", false, inds[1], inds[1]+9)
axs1 = axes1(v)
f, l = first(axs1), last(axs1)
show_delim_array(io, v, opn, ",", "", false, f, f+9)
print(io, " … ")
show_delim_array(io, v, "", ",", cls, false, inds[end-9], inds[end])
show_delim_array(io, v, "", ",", cls, false, l-9, l)
else
show_delim_array(io, v, opn, ",", cls, false)
end
Expand Down
30 changes: 20 additions & 10 deletions base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function simple_walk(compact::IncrementalCompact, @nospecialize(defssa#=::AnySSA
return defssa
end
if isa(def.val, SSAValue)
if isa(defssa, OldSSAValue) && !already_inserted(compact, defssa)
if is_old(compact, defssa)
defssa = OldSSAValue(def.val.id)
else
defssa = def.val
Expand Down Expand Up @@ -191,7 +191,7 @@ function walk_to_defs(compact::IncrementalCompact, @nospecialize(defssa), @nospe
collect(Iterators.filter(1:length(def.edges)) do n
isassigned(def.values, n) || return false
val = def.values[n]
if isa(defssa, OldSSAValue) && isa(val, SSAValue)
if is_old(compact, defssa) && isa(val, SSAValue)
val = OldSSAValue(val.id)
end
edge_typ = widenconst(compact_exprtype(compact, val))
Expand All @@ -201,7 +201,7 @@ function walk_to_defs(compact::IncrementalCompact, @nospecialize(defssa), @nospe
for n in possible_predecessors
pred = def.edges[n]
val = def.values[n]
if isa(defssa, OldSSAValue) && isa(val, SSAValue)
if is_old(compact, defssa) && isa(val, SSAValue)
val = OldSSAValue(val.id)
end
if isa(val, AnySSAValue)
Expand Down Expand Up @@ -281,7 +281,7 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt),
end
if is_tuple_call(compact.ir, def) && isa(field, Int) && 1 <= field < length(def.args)
lifted = def.args[1+field]
if isa(leaf, OldSSAValue) && isa(lifted, SSAValue)
if is_old(compact, leaf) && isa(lifted, SSAValue)
lifted = OldSSAValue(lifted.id)
end
if isa(lifted, GlobalRef) || isa(lifted, Expr)
Expand Down Expand Up @@ -320,7 +320,7 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt),
compact[leaf] = def
end
lifted = def.args[1+field]
if isa(leaf, OldSSAValue) && isa(lifted, SSAValue)
if is_old(compact, leaf) && isa(lifted, SSAValue)
lifted = OldSSAValue(lifted.id)
end
if isa(lifted, GlobalRef) || isa(lifted, Expr)
Expand All @@ -339,7 +339,7 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt),
# N.B.: This can be a bit dangerous because it can lead to
# infinite loops if we accidentally insert a node just ahead
# of where we are
if isa(leaf, OldSSAValue) && (isa(field, Int) || isa(field, Symbol))
if is_old(compact, leaf) && (isa(field, Int) || isa(field, Symbol))
(isa(typ, DataType) && (!typ.abstract)) || return nothing
@assert !typ.mutable
# If there's the potential for an undefref error on access, we cannot insert a getfield
Expand Down Expand Up @@ -425,6 +425,12 @@ struct LiftedPhi
need_argupdate::Bool
end

function is_old(compact, @nospecialize(old_node_ssa))
isa(old_node_ssa, OldSSAValue) &&
!is_pending(compact, old_node_ssa) &&
!already_inserted(compact, old_node_ssa)
end

function perform_lifting!(compact::IncrementalCompact,
visited_phinodes::Vector{Any}, @nospecialize(cache_key),
lifting_cache::IdDict{Pair{AnySSAValue, Any}, AnySSAValue},
Expand Down Expand Up @@ -455,7 +461,7 @@ function perform_lifting!(compact::IncrementalCompact,
isassigned(old_node.values, i) || continue
val = old_node.values[i]
orig_val = val
if isa(old_node_ssa, OldSSAValue) && !is_pending(compact, old_node_ssa) && !already_inserted(compact, old_node_ssa) && isa(val, SSAValue)
if is_old(compact, old_node_ssa) && isa(val, SSAValue)
val = OldSSAValue(val.id)
end
if isa(val, Union{NewSSAValue, SSAValue, OldSSAValue})
Expand Down Expand Up @@ -688,10 +694,14 @@ function getfield_elim_pass!(ir::IRCode, domtree::DomTree)
compact[idx] = val === nothing ? nothing : val.x
end

# Copy the use count, `finish` may modify it and for our predicate
# below we need it consistent with the state of the IR here.

non_dce_finish!(compact)
# Copy the use count, `simple_dce!` may modify it and for our predicate
# below we need it consistent with the state of the IR here (after tracking
# phi node arguments, but before dce).
used_ssas = copy(compact.used_ssas)
ir = finish(compact)
simple_dce!(compact)
ir = complete(compact)
# Now go through any mutable structs and see which ones we can eliminate
for (idx, (intermediaries, defuse)) in defuses
intermediaries = collect(intermediaries)
Expand Down
2 changes: 1 addition & 1 deletion base/deepcopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ updated as appropriate before returning.
"""
deepcopy(x) = deepcopy_internal(x, IdDict())::typeof(x)

deepcopy_internal(x::Union{Symbol,Core.MethodInstance,Method,GlobalRef,DataType,Union,Task},
deepcopy_internal(x::Union{Symbol,Core.MethodInstance,Method,GlobalRef,DataType,Union,UnionAll,Task},
stackdict::IdDict) = x
deepcopy_internal(x::Tuple, stackdict::IdDict) =
ntuple(i->deepcopy_internal(x[i], stackdict), length(x))
Expand Down
5 changes: 2 additions & 3 deletions base/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1094,10 +1094,9 @@ end

@inline peek(s::Stateful, sentinel=nothing) = s.nextvalstate !== nothing ? s.nextvalstate[1] : sentinel
@inline iterate(s::Stateful, state=nothing) = s.nextvalstate === nothing ? nothing : (popfirst!(s), nothing)
IteratorSize(::Type{Stateful{VS,T}} where VS) where {T} =
isa(IteratorSize(T), SizeUnknown) ? SizeUnknown() : HasLength()
IteratorSize(::Type{Stateful{T,VS}}) where {T,VS} = IteratorSize(T) isa HasShape ? HasLength() : IteratorSize(T)
eltype(::Type{Stateful{T, VS}} where VS) where {T} = eltype(T)
IteratorEltype(::Type{Stateful{VS,T}} where VS) where {T} = IteratorEltype(T)
IteratorEltype(::Type{Stateful{T,VS}}) where {T,VS} = IteratorEltype(T)
length(s::Stateful) = length(s.itr) - s.taken

end
2 changes: 1 addition & 1 deletion base/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function tryparse_internal(::Type{Complex{T}}, s::Union{String,SubString{String}
end

if i₊ == 0 # purely real or imaginary value
if iᵢ > 0 # purely imaginary
if iᵢ > i && !(iᵢ == i+1 && s[i] in ('+','-')) # purely imaginary (not "±inf")
x = tryparse_internal(T, s, i, iᵢ-1, raise)
x === nothing && return nothing
return Complex{T}(zero(x),x)
Expand Down
4 changes: 2 additions & 2 deletions base/range.jl
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ function getindex(v::AbstractRange{T}, i::Integer) where T
@_inline_meta
ret = convert(T, first(v) + (i - 1)*step_hp(v))
ok = ifelse(step(v) > zero(step(v)),
(ret <= v.stop) & (ret >= v.start),
(ret <= v.start) & (ret >= v.stop))
(ret <= last(v)) & (ret >= first(v)),
(ret <= first(v)) & (ret >= last(v)))
@boundscheck ((i > 0) & ok) || throw_boundserror(v, i)
ret
end
Expand Down
5 changes: 4 additions & 1 deletion base/reinterpretarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ struct ReinterpretArray{T,N,S,A<:AbstractArray{S, N}} <: AbstractArray{T, N}
isbitstype(T) || throwbits(S, T, T)
isbitstype(S) || throwbits(S, T, S)
(N != 0 || sizeof(T) == sizeof(S)) || throwsize0(S, T)
ax1 = axes(a)[1]
if N != 0 && sizeof(S) != sizeof(T)
ax1 = axes(a)[1]
dim = length(ax1)
rem(dim*sizeof(S),sizeof(T)) == 0 || thrownonint(S, T, dim)
first(ax1) == 1 || throwaxes1(S, T, ax1)
Expand Down Expand Up @@ -68,19 +68,22 @@ IndexStyle(a::ReinterpretArray) = IndexStyle(a.parent)

parent(a::ReinterpretArray) = a.parent
dataids(a::ReinterpretArray) = dataids(a.parent)
unaliascopy(a::ReinterpretArray{T}) where {T} = reinterpret(T, unaliascopy(a.parent))

function size(a::ReinterpretArray{T,N,S} where {N}) where {T,S}
psize = size(a.parent)
size1 = div(psize[1]*sizeof(S), sizeof(T))
tuple(size1, tail(psize)...)
end
size(a::ReinterpretArray{T,0}) where {T} = ()

function axes(a::ReinterpretArray{T,N,S} where {N}) where {T,S}
paxs = axes(a.parent)
f, l = first(paxs[1]), length(paxs[1])
size1 = div(l*sizeof(S), sizeof(T))
tuple(oftype(paxs[1], f:f+size1-1), tail(paxs)...)
end
axes(a::ReinterpretArray{T,0}) where {T} = ()

elsize(::Type{<:ReinterpretArray{T}}) where {T} = sizeof(T)
unsafe_convert(::Type{Ptr{T}}, a::ReinterpretArray{T,N,S} where N) where {T,S} = Ptr{T}(unsafe_convert(Ptr{S},a.parent))
Expand Down
3 changes: 3 additions & 0 deletions base/strings/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ julia> chop(a, head = 5, tail = 5)
```
"""
function chop(s::AbstractString; head::Integer = 0, tail::Integer = 1)
if isempty(s)
return SubString(s)
end
SubString(s, nextind(s, firstindex(s), head), prevind(s, lastindex(s), tail))
end

Expand Down
Binary file modified contrib/mac/app/julia.icns
Binary file not shown.
4 changes: 2 additions & 2 deletions deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ SUITESPARSE_VER = 4.4.5
UNWIND_VER = 1.1-julia2
OSXUNWIND_VER = 0.0.5
GMP_VER = 6.1.2
MPFR_VER = 4.0.1
MPFR_VER = 4.0.2
PATCHELF_VER = 0.9
MBEDTLS_VER = 2.6.0
CURL_VER = 7.56.0

# Specify the version of the Mozilla CA Certificate Store to obtain.
# The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes.
# See https://curl.haxx.se/docs/caextract.html for more details.
MOZILLA_CACERT_VERSION := 2018-06-20
MOZILLA_CACERT_VERSION := 2019-01-23
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4e0bcbf65c67c86b1604e103db173d77
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
95022a2aee8bca4b8e1ce65b5e5840209cd7adb7d048a647c9501e15e0ebd37fb4e4a95e707a5ec001893789ae841e3300a615f8e21a711694fc288777eed726

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions deps/checksums/cacert-2019-01-23.pem/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fccbe6cec7a76e3351ad32e305184787
1 change: 1 addition & 0 deletions deps/checksums/cacert-2019-01-23.pem/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
01faebab60b49a30736e0c88b713999f48c99b425889f7df9bbb80eb91367a6f26f20befdf8ac72b8d77659b143b7b37f91ad7dac5fde37c1d621fc663003687
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bcf01c3fa49a1684edc2d637ad7e03d6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ae4c798ae5c13ad1574646896665ccd1f7d91e64573a23662ce7016b00109c1c351013856c25bf12284d9c3996ca3b828506825e50fcb059969adc02a96c06f8

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/mpfr-4.0.1.tar.bz2/md5

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/mpfr-4.0.1.tar.bz2/sha512

This file was deleted.

1 change: 1 addition & 0 deletions deps/checksums/mpfr-4.0.2.tar.bz2/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6d8a8bb46fe09ff44e21cdbf84f5cdac
1 change: 1 addition & 0 deletions deps/checksums/mpfr-4.0.2.tar.bz2/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18bb3a87123d02b7537bc298d41bdbb33e58b8c196cc4040578e3b470e86c6c89e1bd8ab8b3919d106fe5b86922ef8999dc1aba7c521ee90a69f690be288a30d
8 changes: 7 additions & 1 deletion deps/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ $(SRCCACHE)/gmp-$(GMP_VER)/build-patched: $(SRCCACHE)/gmp-$(GMP_VER)/source-extr
cd $(dir $@) && patch < $(SRCDIR)/patches/gmp-exception.patch
echo 1 > $@

$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted $(SRCCACHE)/gmp-$(GMP_VER)/build-patched
$(SRCCACHE)/gmp-$(GMP_VER)/gmp-config-ldflags.patch-applied: | $(SRCCACHE)/gmp-$(GMP_VER)/build-patched
cd $(dir $@) && patch -p1 < $(SRCDIR)/patches/gmp-config-ldflags.patch
echo 1 > $@

$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/gmp-config-ldflags.patch-applied

$(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted
mkdir -p $(dir $@)
cd $(dir $@) && \
$(dir $<)/configure $(CONFIGURE_COMMON) F77= --enable-shared --disable-static $(GMP_CONFIGURE_OPTS)
Expand Down
4 changes: 2 additions & 2 deletions deps/libssh2.version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIBSSH2_BRANCH=libssh2-1.8.0
LIBSSH2_SHA1=30e9c1347e3b8baa2951db612f05e6d87fc8e2f2
LIBSSH2_BRANCH=libssh2-1.8.2
LIBSSH2_SHA1=02ecf17a6d5f9837699e8fb3aad0c804caa67eeb
2 changes: 1 addition & 1 deletion deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ LLVM_CXXFLAGS += $(CXXFLAGS)
LLVM_CPPFLAGS += $(CPPFLAGS)
LLVM_LDFLAGS += $(LDFLAGS)
LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)"
LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF
LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))"
ifeq ($(USE_POLLY_ACC),1)
LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON
endif
Expand Down
Loading