Skip to content

Commit 598ba89

Browse files
authored
Merge branch 'master' into sf/bb_bump
2 parents 043dd7f + edc1b7d commit 598ba89

File tree

155 files changed

+985
-448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+985
-448
lines changed

LICENSE.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ own licenses:
5252
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
5353
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]
5454

55-
The following components included in `stdlib` have their own separate licenses:
56-
57-
- stdlib/SuiteSparse/umfpack.jl (see [SUITESPARSE](http://suitesparse.com))
58-
- stdlib/SuiteSparse/cholmod.jl (see [SUITESPARSE](http://suitesparse.com))
59-
6055
Julia's `stdlib` uses the following external libraries, which have their own licenses:
6156

6257
- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]

NEWS.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ New library features
2727

2828
Standard library changes
2929
------------------------
30-
30+
* The `@timed` macro now returns a `NamedTuple` ([#34149])
3131

3232
#### LinearAlgebra
33-
33+
* The BLAS submodule now supports the level-2 BLAS subroutine `hpmv!` ([#34211]).
34+
* `normalize` now supports multidimensional arrays ([#34239])
3435

3536
#### Markdown
3637

@@ -42,6 +43,24 @@ Standard library changes
4243

4344

4445
#### SparseArrays
46+
* `lu!` accepts `UmfpackLU` as an argument to make use of its symbolic factorization.
47+
48+
#### Dates
49+
50+
#### Statistics
51+
52+
53+
#### Sockets
54+
55+
56+
Deprecated or removed
57+
---------------------
58+
59+
External dependencies
60+
---------------------
61+
62+
Tooling Improvements
63+
---------------------
4564

4665

4766
<!--- generated by NEWS-update.jl: -->

base/arrayshow.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ but it also repeated every M elements if desired.
122122
"""
123123
function print_matrix_vdots(io::IO, vdots::AbstractString,
124124
A::Vector, sep::AbstractString, M::Integer, m::Integer,
125-
pad_right::Bool)
125+
pad_right::Bool = true)
126126
for k = 1:length(A)
127127
w = A[k][1] + A[k][2]
128128
if k % M == m

base/broadcast.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ _bcsm(a::Number, b::Number) = a == b || b == 1
496496
# (We may not want to define general promotion rules between, say, OneTo and Slice, but if
497497
# we get here we know the axes are at least consistent for the purposes of broadcasting)
498498
axistype(a::T, b::T) where T = a
499+
axistype(a::OneTo, b::OneTo) = OneTo{Int}(a)
499500
axistype(a, b) = UnitRange{Int}(a)
500501

501502
## Check that all arguments are broadcast compatible with shape

base/compiler/ssair/passes.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt),
370370
end
371371
elseif isa(leaf, QuoteNode)
372372
leaf = leaf.value
373+
elseif isa(leaf, GlobalRef)
374+
mod, name = leaf.mod, leaf.name
375+
if isdefined(mod, name) && isconst(mod, name)
376+
leaf = getfield(mod, name)
377+
else
378+
return nothing
379+
end
373380
elseif isa(leaf, Union{Argument, Expr})
374381
return nothing
375382
end

base/compiler/typelimits.jl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,6 @@ function is_derived_type(@nospecialize(t), @nospecialize(c), mindepth::Int)
5757
for p in cP
5858
is_derived_type(t, p, mindepth) && return true
5959
end
60-
if isconcretetype(c) && isbitstype(c)
61-
# see if it was extracted from a fieldtype
62-
# however, only look through types that can be inlined
63-
# to ensure monotonicity of derivation
64-
# since we know that for immutable, concrete, bits types,
65-
# the field types must have been constructed prior to the type,
66-
# it cannot have a reference cycle in the type graph
67-
cF = c.types
68-
for f in cF
69-
# often a parameter is also a field type; avoid searching twice
70-
if !contains_is(c.parameters, f)
71-
is_derived_type(t, f, mindepth) && return true
72-
end
73-
end
74-
end
7560
end
7661
return false
7762
end

base/div.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,17 @@ julia> divrem(7,3)
116116
```
117117
"""
118118
divrem(x, y) = divrem(x, y, RoundToZero)
119-
divrem(a, b, r::RoundingMode) = (div(a, b, r), rem(a, b, r))
119+
function divrem(a, b, r::RoundingMode)
120+
if r == RoundToZero
121+
# For compat. Remove in 2.0.
122+
(div(a, b), rem(a, b))
123+
elseif r === RoundDown
124+
# For compat. Remove in 2.0.
125+
(fld(a, b), mod(a, b))
126+
else
127+
(div(a, b, r), rem(a, b, r))
128+
end
129+
end
120130
function divrem(x::Integer, y::Integer, rnd::typeof(RoundNearest))
121131
(q, r) = divrem(x, y)
122132
if x >= 0

base/docs/basedocs.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ resulting expression is substituted directly into the program at the point where
158158
the macro is invoked.
159159
Macros are a way to run generated code without calling [`eval`](@ref Base.eval), since the generated
160160
code instead simply becomes part of the surrounding program.
161-
Macro arguments may include expressions, literal values, and symbols.
161+
Macro arguments may include expressions, literal values, and symbols. Macros can be defined for
162+
variable number of arguments (varargs), but do not accept keyword arguments.
162163
163164
# Examples
164165
```jldoctest
@@ -169,6 +170,14 @@ julia> macro sayhello(name)
169170
170171
julia> @sayhello "Charlie"
171172
Hello, Charlie!
173+
174+
julia> macro saylots(x...)
175+
return :( println("Say: ", \$(x...)) )
176+
end
177+
@saylots (macro with 1 method)
178+
179+
julia> @saylots "hey " "there " "friend"
180+
Say: hey there friend
172181
```
173182
"""
174183
kw"macro"

base/gcutils.jl

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,20 @@ Module with garbage collection utilities.
4949
"""
5050
module GC
5151

52-
# @enum-like structure
53-
struct CollectionType
54-
x::Int
55-
end
56-
Base.cconvert(::Type{Cint}, collection::CollectionType) = Cint(collection.x)
57-
58-
const Auto = CollectionType(0)
59-
const Full = CollectionType(1)
60-
const Incremental = CollectionType(2)
61-
6252
"""
63-
GC.gc(full::Bool=true)
64-
GC.gc(collection::CollectionType)
53+
GC.gc()
54+
GC.gc(full::Bool)
6555
66-
Perform garbage collection. The argument `full` determines whether a full, but more costly
67-
collection is performed. Otherwise, heuristics are used to determine which type of
68-
collection is needed. For exact control, pass an argument of type `CollectionType`.
56+
Perform garbage collection. The argument `full` determines the kind of collection: A full
57+
collection scans all objects, while an incremental collection only scans so-called young
58+
objects and is much quicker. If called without an argument, heuristics are used to determine
59+
which type of collection is needed.
6960
7061
!!! warning
7162
Excessive use will likely lead to poor performance.
7263
"""
73-
gc(full::Bool=true) = ccall(:jl_gc_collect, Cvoid, (Cint,), full)
74-
gc(collection::CollectionType) = ccall(:jl_gc_collect, Cvoid, (Cint,), collection)
64+
gc() = ccall(:jl_gc_collect, Cvoid, (Cint,), 0)
65+
gc(full::Bool) = ccall(:jl_gc_collect, Cvoid, (Cint,), full ? 1 : 2)
7566

7667
"""
7768
GC.enable(on::Bool)

base/int.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ julia> signed(unsigned(-2))
155155
-2
156156
```
157157
"""
158-
unsigned(x) = convert(Unsigned, x)
158+
unsigned(x) = x % typeof(convert(Unsigned, zero(x)))
159159
unsigned(x::BitSigned) = reinterpret(typeof(convert(Unsigned, zero(x))), x)
160160

161161
"""
@@ -164,7 +164,7 @@ unsigned(x::BitSigned) = reinterpret(typeof(convert(Unsigned, zero(x))), x)
164164
Convert a number to a signed integer. If the argument is unsigned, it is reinterpreted as
165165
signed without checking for overflow.
166166
"""
167-
signed(x) = convert(Signed, x)
167+
signed(x) = x % typeof(convert(Signed, zero(x)))
168168
signed(x::BitUnsigned) = reinterpret(typeof(convert(Signed, zero(x))), x)
169169

170170
div(x::BitSigned, y::Unsigned) = flipsign(signed(div(unsigned(abs(x)), y)), x)

0 commit comments

Comments
 (0)