Skip to content

Commit 3a58908

Browse files
committed
merged with master
2 parents 0facd1d + a2a1506 commit 3a58908

File tree

220 files changed

+1977
-30613
lines changed

Some content is hidden

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

220 files changed

+1977
-30613
lines changed

NEWS.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
11
Julia v1.0.0 Release Notes
22
==========================
33

4-
New language features
5-
---------------------
6-
7-
Language changes
8-
----------------
9-
10-
Breaking changes
11-
----------------
4+
Julia v1.0 is identical to the v0.7 release, with the exception that
5+
it removes all deprecations and deprecation related warnings. When
6+
upgrading a codebase from v0.6, the process is to first get the code
7+
to work on v0.7, and fix all the deprecation warnings. Once the code
8+
runs on v0.7 without warnings, it should be good to run on v1.0.
129

13-
Library improvements
14-
--------------------
15-
16-
Compiler/Runtime improvements
17-
-----------------------------
10+
Refer to the [Release Notes for
11+
v0.7](https://github.com/JuliaLang/julia/blob/master/HISTORY.md) for a
12+
detailed list of changes from Julia v0.6.
1813

1914
Deprecated or removed
2015
---------------------
2116

2217
The old package manager (now called `OldPkg`) has been moved to a
2318
separate repository at https://github.com/JuliaArchive/OldPkg.jl ([#27930])
2419

25-
Command-line option changes
26-
---------------------------
27-
2820
<!--- generated by NEWS-update.jl: -->
2921
[#27930]: https://github.com/JuliaLang/julia/issues/27930

base/Enums.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ f (generic function with 1 method)
4444
4545
julia> f(apple)
4646
"I'm a Fruit with value: 1"
47+
48+
julia> Fruit(1)
49+
apple::Fruit = 1
4750
```
4851
4952
Values can also be specified inside a `begin` block, e.g.

base/abstractset.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,15 @@ end
226226
<=(l::AbstractSet, r::AbstractSet) = l r
227227

228228
function issubset(l, r)
229-
230-
rlen = length(r)
231-
#This threshold was empirically determined by repeatedly
232-
#sampling using these two methods.
233-
lenthresh = 70
234-
235-
if rlen > lenthresh && !isa(r, AbstractSet)
236-
return issubset(l, Set(r))
229+
if haslength(r)
230+
rlen = length(r)
231+
#This threshold was empirically determined by repeatedly
232+
#sampling using these two methods (see #26198)
233+
lenthresh = 70
234+
235+
if rlen > lenthresh && !isa(r, AbstractSet)
236+
return issubset(l, Set(r))
237+
end
237238
end
238239

239240
for elt in l

base/atomics.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ export
1414
atomic_max!, atomic_min!,
1515
atomic_fence
1616

17-
# Disable 128-bit types on 32-bit Intel systems due to LLVM problems;
18-
# see <https://github.com/JuliaLang/julia/issues/14818> (fixed on LLVM 3.9)
1917
# 128-bit atomics do not exist on AArch32.
20-
if (Base.libllvm_version < v"3.9-" && ARCH === :i686) ||
21-
startswith(string(ARCH), "arm")
18+
if startswith(string(ARCH), "arm")
2219
const inttypes = (Int8, Int16, Int32, Int64,
2320
UInt8, UInt16, UInt32, UInt64)
2421
else
@@ -345,8 +342,8 @@ gc_alignment(::Type{T}) where {T} = ccall(:jl_alignment, Cint, (Csize_t,), sizeo
345342
for typ in atomictypes
346343
lt = llvmtypes[typ]
347344
ilt = llvmtypes[inttype(typ)]
348-
rt = Base.libllvm_version >= v"3.6" ? "$lt, $lt*" : "$lt*"
349-
irt = Base.libllvm_version >= v"3.6" ? "$ilt, $ilt*" : "$ilt*"
345+
rt = "$lt, $lt*"
346+
irt = "$ilt, $ilt*"
350347
@eval getindex(x::Atomic{$typ}) =
351348
llvmcall($"""
352349
%ptr = inttoptr i$WORD_SIZE %0 to $lt*

base/broadcast.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,30 @@ Like [`broadcast`](@ref), but store the result of
713713
Note that `dest` is only used to store the result, and does not supply
714714
arguments to `f` unless it is also listed in the `As`,
715715
as in `broadcast!(f, A, A, B)` to perform `A[:] = broadcast(f, A, B)`.
716+
717+
# Examples
718+
```jldoctest
719+
julia> A = [1.0; 0.0]; B = [0.0; 0.0];
720+
721+
julia> broadcast!(+, B, A, (0, -2.0));
722+
723+
julia> B
724+
2-element Array{Float64,1}:
725+
1.0
726+
-2.0
727+
728+
julia> A
729+
2-element Array{Float64,1}:
730+
1.0
731+
0.0
732+
733+
julia> broadcast!(+, A, A, (0, -2.0));
734+
735+
julia> A
736+
2-element Array{Float64,1}:
737+
1.0
738+
-2.0
739+
```
716740
"""
717741
broadcast!(f::Tf, dest, As::Vararg{Any,N}) where {Tf,N} = (materialize!(dest, broadcasted(f, As...)); dest)
718742

base/cartesian.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ would generate:
3232
end
3333
end
3434
35-
If you want just a post-expression, supply `nothing` for the pre-expression. Using
35+
If you want just a post-expression, supply [`nothing`](@ref) for the pre-expression. Using
3636
parentheses and semicolons, you can supply multi-statement expressions.
3737
"""
3838
macro nloops(N, itersym, rangeexpr, args...)

base/checked.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ if Core.sizeof(Ptr{Cvoid}) == 4
6464
brokenSignedIntMul = Union{brokenSignedIntMul, Int64}
6565
brokenUnsignedIntMul = Union{brokenUnsignedIntMul, UInt64}
6666
end
67-
if llvm_version < 30500
68-
brokenSignedIntMul = Union{brokenSignedIntMul, Int8}
69-
brokenUnsignedIntMul = Union{brokenUnsignedIntMul, UInt8}
70-
end
7167
const BrokenSignedInt = brokenSignedInt
7268
const BrokenUnsignedInt = brokenUnsignedInt
7369
const BrokenSignedIntMul = brokenSignedIntMul

base/client.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function repl_cmd(cmd, out)
5656
# If it's intended to simulate `cd`, it should instead be doing
5757
# more nearly `cd $dir && printf %s \$PWD` (with appropriate quoting),
5858
# since shell `cd` does more than just `echo` the result.
59-
dir = read(`$shell -c "printf %s $(shell_escape_posixly(dir))"`, String)
59+
dir = read(`$shell -c "printf '%s' $(shell_escape_posixly(dir))"`, String)
6060
end
6161
cd(dir)
6262
end

base/compiler/ssair/show.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function show_ir(io::IO, code::IRCode, expr_type_printer=default_expr_type_print
327327
bb_idx = 1
328328
new_nodes = code.new_nodes
329329
if any(i -> !isassigned(code.new_nodes, i), 1:length(code.new_nodes))
330-
printstyled(io, :red, "ERROR: New node array has unset entry\n")
330+
printstyled(io, "ERROR: New node array has unset entry\n", color=:red)
331331
new_nodes = new_nodes[filter(i -> isassigned(code.new_nodes, i), 1:length(code.new_nodes))]
332332
end
333333
for nn in new_nodes
@@ -354,7 +354,7 @@ function show_ir(io::IO, code::IRCode, expr_type_printer=default_expr_type_print
354354
if !isassigned(stmts, idx)
355355
# This is invalid, but do something useful rather
356356
# than erroring, to make debugging easier
357-
printstyled(io, :red, "#UNDEF\n")
357+
printstyled(io, "#UNDEF\n", color=:red)
358358
continue
359359
end
360360
stmt = stmts[idx]
@@ -495,7 +495,7 @@ function show_ir(io::IO, code::CodeInfo, expr_type_printer=default_expr_type_pri
495495
if !isassigned(stmts, idx)
496496
# This is invalid, but do something useful rather
497497
# than erroring, to make debugging easier
498-
printstyled(io, :red, "#UNDEF\n")
498+
printstyled(io, "#UNDEF\n", color=:red)
499499
continue
500500
end
501501
stmt = stmts[idx]

base/compiler/typelimits.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ function tuplemerge(a::DataType, b::DataType)
412412
for loop_b = (false, true)
413413
for i = (lt + 1):(loop_b ? lbr : lar)
414414
ti = unwrapva(loop_b ? bp[i] : ap[i])
415+
while ti isa TypeVar
416+
ti = ti.ub
417+
end
415418
# compare (ti <-> tail), (wrapper ti <-> tail), (ti <-> wrapper tail), then (wrapper ti <-> wrapper tail)
416419
# until we find the first element that contains the other in the pair
417420
# TODO: this result would be more stable (and more associative and more commutative)

0 commit comments

Comments
 (0)