Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
797a24d
Some more compat annotations (#30297)
fredrikekre Dec 7, 2018
36b60b7
fix #30303, escaping $ when showing Symbols (#30304)
JeffBezanson Dec 8, 2018
1af3b18
Fix makefile not removing libjulia-debugon windows (#30059)
musm Dec 8, 2018
1fc30b5
Add LinearAlgebra as test dependency to Distributed. (#30311)
fredrikekre Dec 8, 2018
ae33118
Fix armv7l compilation (#30253)
staticfloat Dec 9, 2018
7fd07d9
Make `unique(f, itr)` and `unique!(f, itr)` faster (#30286)
andyferris Dec 9, 2018
c9baf5c
Unexport catch_stack
c42f Dec 8, 2018
0f8c505
Use `JL_AArch64_crc` instead of `HWCAP_CRC32` (#30324)
staticfloat Dec 9, 2018
7b52bed
NEWS edits for 1.1 (#30302)
JeffBezanson Dec 10, 2018
5fca9de
`@inbounds` annotations for filter (#30156)
andyferris Dec 11, 2018
ca1b40e
Expand and fix documentation of BitArray (#30340)
mbauman Dec 11, 2018
2be2ebf
oneunit of sparse matrix should return sparse matrix (#30228)
KlausC Dec 11, 2018
76ce618
Upgrade Pkg to version 1.1. (#30342)
fredrikekre Dec 11, 2018
acbb3cc
adding == for structured matrices (#30108)
mcognetta Dec 11, 2018
cef1167
Update to Documenter 0.21 and prepare for PDF documentation builds. (…
fredrikekre Dec 11, 2018
4ca7837
Adding rtol and atol for pinv and nullspace (#29998)
sam0410 Dec 11, 2018
adadb31
use non Pkg for workflow (#30194)
KristofferC Dec 11, 2018
5ccafa9
fix bug with max_values in union! (#30315)
rfourquet Dec 11, 2018
485ed65
Force specialization on the type argument of `_similar_for` (#30331)
martinholters Dec 12, 2018
7a26d7b
Allow dotted binary tilde (#30351)
ararslan Dec 12, 2018
7b9c0e8
Add compat annotation for NaN handling in (l|r)mul! (#30361)
tkf Dec 12, 2018
a2dcfe6
added doc for AbstractChannel (#30347)
matbesancon Dec 12, 2018
a9c886a
Update references to Base.SparseArrays (#30057)
dlfivefifty Dec 12, 2018
28d9ec2
codegen: disable Bool optimization for maybe-undef fields (#30350)
vtjnash Dec 12, 2018
f4d8ce1
fix #30346, specificity issue with DynamicPolynomials (#30360)
JeffBezanson Dec 12, 2018
9cb1b0e
Copy editing in "Environment variables" docs (#30330)
donm Dec 12, 2018
98e83f6
Add Float16 comparisons (#29916)
sam0410 Dec 13, 2018
7cbac07
improve printf performance by passing digit buffer around (#30373)
JeffBezanson Dec 13, 2018
e8c818f
Upgrade to Pkg 1.1.1. (#30378)
fredrikekre Dec 13, 2018
47bd2ba
fix #30335, regression in intersection of unions of typevars (#30353)
JeffBezanson Dec 13, 2018
0d9fee8
fix reinterpret for 0-dimensional arrays (#30376)
meggart Dec 14, 2018
c045cbe
stacktrace: prevent OOB-error in sysimage lookup (#30369)
vtjnash Dec 17, 2018
2348c7b
Fix #30006, getindex accessing fields that might not exist (#30405)
raghav9-97 Dec 17, 2018
7b9b3e3
Fix sparse cholesky to return Vector when the RHS is a Vector (#30416)
raghav9-97 Dec 17, 2018
3d8942d
spmatmul sparse matrix multiplication - performance improvements (#30…
KlausC Dec 17, 2018
5b766bb
fix #30394, an unsoundness in ml_matches (#30396)
JeffBezanson Dec 17, 2018
64db937
Try implementing N-dimensional indexing for fast linear SubArrays (#3…
mbauman Dec 17, 2018
c379fb0
loading: work on simplifications (and some corrections) of docs (#29946)
vtjnash Dec 17, 2018
898bf8f
fix #30124, broadcast regression due to removed pure annotation (#30420)
JeffBezanson Dec 18, 2018
9a40122
attempt to refine return type when it could be improved via PartialTuple
jrevels Dec 14, 2018
3c086d6
make `ndigits` more generic (#30384)
JeffBezanson Dec 19, 2018
235bdc7
Add link to the pdf version of the documentation to the html pages, f…
fredrikekre Dec 19, 2018
5125952
generalize sparse matrix slicing to integer types (#30319)
dpo Dec 20, 2018
6329be9
coverage: support output in LCOV tracefile format (#30453)
JeffBezanson Dec 20, 2018
3381093
Base.worker_timeout() mention in manual (#30439)
mgkuhn Dec 20, 2018
4e97adf
Only use llvm-config for library selection when building against syst…
maleadt Dec 21, 2018
949d8e3
Add Dates as a test dependency to SparseArrays. (#30519)
fredrikekre Dec 27, 2018
7cd0d20
Bump Pkg to 1.1.2. (#30521)
fredrikekre Dec 27, 2018
5d19855
Merge pull request #30309 from JuliaLang/backport-1.1.0
ararslan Dec 30, 2018
1e4e6e4
Update NEWS links
ararslan Dec 29, 2018
e1b2c82
Add license headers to files
ararslan Dec 29, 2018
d11b04a
Update and fix links in the documentation
ararslan Dec 29, 2018
e05fac2
Merge pull request #30532 from JuliaLang/aa/prep-1.1-rc1
ararslan Dec 31, 2018
ba87aa3
Set VERSION to 1.1.0-rc1 (#30322)
ararslan Dec 31, 2018
ecf9911
Remove duplicate NEWS entry (#30560)
blegat Jan 2, 2019
41c0c2f
don't use abstract_iteration for types with special cases in _apply (…
JeffBezanson Jan 2, 2019
879f7c2
use type inference world in `return_type` (#30470)
JeffBezanson Jan 3, 2019
d8e69b8
Use XCode 8.3 for macOS on Travis (#30599)
ararslan Jan 5, 2019
91fe9c3
Fix use counts for mutable struct SROA
Keno Jan 5, 2019
bf0e212
some latency hacks (#30566)
JeffBezanson Jan 8, 2019
2f8fb89
Fix SROA confusing new and old nodes
Keno Jan 7, 2019
cec7e7b
Defensively fix patterns similar to #29983
Keno Jan 5, 2019
17f2978
Force specialization of the SubArray boundserror method.
maleadt Jan 9, 2019
1a2134d
remove unneded patching of Makefile
KristofferC Jan 9, 2019
a5f63ff
Add BB downloading for OpenBLAS (#30497)
staticfloat Dec 29, 2018
05a8951
Fix `bb-install` naming conventions, add hashes (#30535)
staticfloat Jan 3, 2019
47038ea
Merge pull request #30607 from JuliaLang/backport-1.1.0
ararslan Jan 12, 2019
980eda0
Set VERSION to 1.1.0-rc2 (#30701)
ararslan Jan 13, 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
6 changes: 3 additions & 3 deletions .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 Expand Up @@ -76,8 +76,8 @@ before_install:
brew tap staticfloat/julia > /dev/null;
brew rm --force $(brew deps --HEAD julia);
brew install -v ccache gcc gmp mpfr pcre2 staticfloat/julia/openblas-julia staticfloat/julia/suite-sparse-julia staticfloat/juliadeps/libgfortran;
BUILDOPTS="-j3 USECLANG=1 USECCACHE=1 BINARYBUILDER_TRIPLET=x86_64-apple-darwin14 BINARYBUILDER_LLVM_ASSERTS=1";
BUILDOPTS="$BUILDOPTS USE_BINARYBUILDER_LLVM=1 LLVM_CONFIG=$TRAVIS_BUILD_DIR/usr/tools/llvm-config LLVM_SIZE=$TRAVIS_BUILD_DIR/usr/tools/llvm-size";
BUILDOPTS="-j3 USECLANG=1 USECCACHE=1 USE_BINARYBUILDER_LLVM=1 USE_BINARYBUILDER_OPENBLAS=1 BINARYBUILDER_LLVM_ASSERTS=1";
BUILDOPTS="$BUILDOPTS LLVM_CONFIG=$TRAVIS_BUILD_DIR/usr/tools/llvm-config LLVM_SIZE=$TRAVIS_BUILD_DIR/usr/tools/llvm-size";
BUILDOPTS="$BUILDOPTS VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include FORCE_ASSERTIONS=1";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
for lib in SUITESPARSE BLAS LAPACK GMP MPFR LIBUNWIND; do
Expand Down
3 changes: 1 addition & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,10 @@ INSTALL_F := $(JULIAHOME)/contrib/install.sh 644
INSTALL_M := $(JULIAHOME)/contrib/install.sh 755

# BinaryBuilder options
# TODO: Autodiscover triplet
USE_BINARYBUILDER_OPENBLAS := 0
USE_BINARYBUILDER_LLVM := 0
# Use the Assertions build
BINARYBUILDER_LLVM_ASSERTS := 0
BINARYBUILDER_TRIPLET :=

# LLVM Options
LLVMROOT := $(build_prefix)
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,10 @@ ifeq ($(BUNDLE_DEBUG_LIBS),1)
$(INSTALL_M) $(build_bindir)/julia-debug $(DESTDIR)$(bindir)/
endif
ifeq ($(OS),WINNT)
-$(INSTALL_M) $(build_bindir)/*.dll $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(filter-out $(build_bindir)/libjulia-debug.dll,$(wildcard $(build_bindir)/*.dll)) $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_libdir)/libjulia.dll.a $(DESTDIR)$(libdir)/
ifeq ($(BUNDLE_DEBUG_LIBS),1)
-$(INSTALL_M) $(build_bindir)/libjulia-debug.dll $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
endif
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
Expand Down
56 changes: 36 additions & 20 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
Julia v1.1 Release Notes
==========================
========================

New language features
---------------------

* An *exception stack* is maintained on each task to make exception handling more robust and enable root cause analysis using `catch_stack` ([#28878]).
* An *exception stack* is maintained on each task to make exception handling
more robust and enable root cause analysis. The stack may be accessed using
the experimental function `Base.catch_stack` ([#28878]).
* The experimental macro `Base.@locals` returns a dictionary of current local variable names
and values ([#29733]).
* Binary `~` can now be dotted, as in `x .~ y` ([#30341]).

Language changes
----------------
Expand All @@ -25,31 +28,35 @@ Language changes
the old behavior, or `CartesianIndices(a)[findall(in(b), a)]` to get the new behavior
on previous Julia versions ([#30226]).
* `findmin(::BitArray)` and `findmax(::BitArray)` now return a `CartesianIndex` when `a` is a matrix
or a higher-dimensional array, for consistency with for other array types.
or a higher-dimensional array, for consistency with other array types.
Use `LinearIndices(a)[findmin(a)[2]]` to get the old behavior, or `CartesianIndices(a)[findmin(a)[2]]`
to get the new behavior on previous Julia versions ([#30102]).
* Method signatures such as
`f(::Type{T}, ::T) where {T <: X}` and
`f(::Type{X}, ::Any)`
are now considered ambiguous. Previously a bug caused the first one to be considered more specific ([#30160]).
are now considered ambiguous. Previously a bug caused the first one to be considered more specific in
some cases ([#30160]).

Command-line option changes
---------------------------

* When a script run in interactive mode (`-i`) throws an error, the REPL now starts after
the error is displayed. Previously the REPL only started if the script completed without
error ([#21233]).
* The code-coverage option now supports output in the LCOV tracefile format and
gets propagated to child processes, such as precompile steps and test workers ([#30381]).

New library functions
---------------------

* `splitpath(p::String)` function, which is the opposite of `joinpath(parts...)`: it splits a filepath into its components ([#28156]).
* `isnothing(::Any)` function, to check whether something is a `Nothing`, returns a `Bool` ([#29679]).
* `splitpath(p::String)` function, which is the opposite of `joinpath(parts...)`: it splits a filepath
into its components ([#28156]).
* `isnothing(::Any)` predicate, to check whether the argument is `nothing`. ([#29679]).
* `getpid(::Process)` method ([#24064]).
* `eachrow`, `eachcol` and `eachslice` functions provide efficient iterators over slices of arrays ([#29749]).
* `fieldtypes(T::Type)` which return the declared types of the field in type T ([#29600]).
* `fieldtypes(T::Type)` which returns the declared types of the field in type T ([#29600]).
* `uuid5` has been added to the `UUIDs` standard library ([#28761]).
* Predicate functions `Sys.isfreebsd`, `Sys.isopenbsd`, `Sys.isnetbsd`, and `Sys.isdragonfly` for
* Predicates `Sys.isfreebsd`, `Sys.isopenbsd`, `Sys.isnetbsd`, and `Sys.isdragonfly` for
detecting BSD systems have been added ([#30249]).
* Internal `Base.disable_library_threading` that sets libraries to use one thread.
It executes function hooks that have been registered with
Expand All @@ -70,7 +77,7 @@ Standard library changes
argument ([#29157]).
* The use of scientific notation when printing `BigFloat` values is now consistent with other floating point
types ([#29211]).
* `Regex` now behave like a scalar when used in broadcasting ([#29913]).
* `Regex` now behaves like a scalar when used in broadcasting ([#29913]).
* `Char` now behaves like a read-only 0-dimensional array ([#29819]).
* `parse` now allows strings representing integer 0 and 1 for type `Bool` ([#29980]).
* `Base.tail` now works on named tuples ([#29595]).
Expand All @@ -79,24 +86,20 @@ Standard library changes
* `Base.julia_cmd` now propagates the `--inline=(yes|no)` flag ([#29858]).
* `Base.@kwdef` can now be used for parametric structs, and for structs with supertypes ([#29316]).
* `merge(::NamedTuple, ::NamedTuple...)` can now be used with more than 2 `NamedTuple`s ([#29259]).
* `Future.copy!` has been moved to `Base` ([#29178]).
* New `ncodeunits(c::Char)` method as a fast equivalent to `ncodeunits(string(c))` ([#29153]).
* New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]).
* `range` now accept `stop` as a positional argument ([#28708]).
* `get(A::AbstractArray, (), default)` now returns the result of `A[]` if it can instead of always
returning an empty array ([#30270]).
* `get(A::AbstractArray, (), default)` now returns `A[]` instead of an empty array ([#30270]).
* `parse(Bool, str)` is now supported ([#29997]).
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]).
* In `put!(c::Channel{T}, v)`, `v` now gets converted to `T` as `put!` is being called ([#29092]).
* `copyto!(::AbstractMatrix, ::UniformScaling)` now supports rectangular matrices ([#28790]).
* `current_project()` now searches the parent directories of a Git repository for a `Project.toml` file.
This also affects the behavior of the `--project` command line option when using the default
`--project=@.` ([#29108]).
* The `spawn` API is now more flexible and supports taking IOBuffer directly as a I/O stream,
* The `spawn` API is now more flexible and supports taking IOBuffer directly as an I/O stream,
converting to a system pipe as needed ([#30278]).

#### Dates
* New `DateTime(::Date, ::Time)` constructor ([#29754]).
* `TimeZone` now behave like a scalar when used in broadcasting ([#30159]).
* `TimeZone` now behaves like a scalar when used in broadcasting ([#30159]).

#### InteractiveUtils
* `edit` can now be called on a module to edit the file that defines it ([#29636]).
Expand All @@ -108,7 +111,8 @@ Standard library changes
* `isdiag` and `isposdef` for `Diagonal` and `UniformScaling` ([#29638]).
* `mul!`, `rmul!` and `lmul!` methods for `UniformScaling` ([#29506]).
* `Symmetric` and `Hermitian` matrices now preserve the wrapper when scaled with a number ([#29469]).
* Exponentiation operator `^` now supports raising a `Irrational` to an `AbstractMatrix` power ([#29782]).
* Exponentiation operator `^` now supports raising an `Irrational` to an `AbstractMatrix` power ([#29782]).
* Added keyword arguments `rtol`, `atol` to `pinv`, `nullspace` and `rank` ([#29998], [#29926]).

#### Random
* `randperm` and `randcycle` now use the type of their argument to determine the element type of
Expand All @@ -120,7 +124,7 @@ Standard library changes
* `sprandn` now supports specifying the output element type ([#30083]).

#### Statistics
* `mean` and `var` now handles the empty case ([#29033]).
* `mean` and `var` now handle more kinds of empty inputs ([#29033]).

External dependencies
---------------------
Expand All @@ -131,6 +135,7 @@ External dependencies
* The source code for Pkg is no longer included in JuliaLang/julia. Pkg is instead
downloaded during the build process ([#29615]).
* LLVM has been upgraded to 6.0.1 and support for LLVM < 6.0 has been dropped ([#28745], [#28696]).
* Pkg has been upgraded to version 1.1 ([#30342]).

Deprecated or removed
---------------------
Expand Down Expand Up @@ -163,7 +168,6 @@ Deprecated or removed
[#29153]: https://github.com/JuliaLang/julia/issues/29153
[#29157]: https://github.com/JuliaLang/julia/issues/29157
[#29173]: https://github.com/JuliaLang/julia/issues/29173
[#29178]: https://github.com/JuliaLang/julia/issues/29178
[#29211]: https://github.com/JuliaLang/julia/issues/29211
[#29259]: https://github.com/JuliaLang/julia/issues/29259
[#29316]: https://github.com/JuliaLang/julia/issues/29316
Expand Down Expand Up @@ -193,13 +197,25 @@ Deprecated or removed
[#29893]: https://github.com/JuliaLang/julia/issues/29893
[#29907]: https://github.com/JuliaLang/julia/issues/29907
[#29913]: https://github.com/JuliaLang/julia/issues/29913
[#29926]: https://github.com/JuliaLang/julia/issues/29926
[#29968]: https://github.com/JuliaLang/julia/issues/29968
[#29969]: https://github.com/JuliaLang/julia/issues/29969
[#29978]: https://github.com/JuliaLang/julia/issues/29978
[#29980]: https://github.com/JuliaLang/julia/issues/29980
[#29997]: https://github.com/JuliaLang/julia/issues/29997
[#29998]: https://github.com/JuliaLang/julia/issues/29998
[#30004]: https://github.com/JuliaLang/julia/issues/30004
[#30022]: https://github.com/JuliaLang/julia/issues/30022
[#30035]: https://github.com/JuliaLang/julia/issues/30035
[#30083]: https://github.com/JuliaLang/julia/issues/30083
[#30102]: https://github.com/JuliaLang/julia/issues/30102
[#30151]: https://github.com/JuliaLang/julia/issues/30151
[#30159]: https://github.com/JuliaLang/julia/issues/30159
[#30160]: https://github.com/JuliaLang/julia/issues/30160
[#30226]: https://github.com/JuliaLang/julia/issues/30226
[#30249]: https://github.com/JuliaLang/julia/issues/30249
[#30270]: https://github.com/JuliaLang/julia/issues/30270
[#30278]: https://github.com/JuliaLang/julia/issues/30278
[#30341]: https://github.com/JuliaLang/julia/issues/30341
[#30342]: https://github.com/JuliaLang/julia/issues/30342
[#30381]: https://github.com/JuliaLang/julia/issues/30381
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ Julia uses the following external libraries, which are automatically downloaded
[GMP]: http://gmplib.org
[MPFR]: http://www.mpfr.org
[libuv]: https://github.com/JuliaLang/libuv
[libgit2]: https://libgit2.github.com/
[libgit2]: https://libgit2.org/
[utf8proc]: https://julialang.org/utf8proc/
[libosxunwind]: https://github.com/JuliaLang/libosxunwind
[libunwind]: http://www.nongnu.org/libunwind
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0-DEV
1.1.0-rc2
9 changes: 8 additions & 1 deletion base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,15 @@ endif
endif # WINNT

symlink_libLLVM: $(build_private_libdir)/libLLVM.dylib
ifneq ($(USE_SYSTEM_LLVM),0)
LLVM_CONFIG_HOST_LIBS := $(shell $(LLVM_CONFIG_HOST) --libfiles)
# HACK: llvm-config doesn't correctly point to shared libs on all platforms
# https://github.com/JuliaLang/julia/issues/29981
else
LLVM_CONFIG_HOST_LIBS := $(shell $(LLVM_CONFIG_HOST) --libdir)/libLLVM.$(SHLIB_EXT)
endif
$(build_private_libdir)/libLLVM.dylib:
REALPATH=`$(LLVM_CONFIG_HOST) --libfiles` && \
REALPATH=$(LLVM_CONFIG_HOST_LIBS) && \
$(call resolve_path,REALPATH) && \
[ -e "$$REALPATH" ] && \
([ ! -e "$@" ] || rm "$@") && \
Expand Down
6 changes: 4 additions & 2 deletions base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,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
21 changes: 12 additions & 9 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ offset `do`. Return `dest`.
"""
function copyto!(dest::Array{T}, doffs::Integer, src::Array{T}, soffs::Integer, n::Integer) where T
n == 0 && return dest
n > 0 || _throw_argerror(n)
n > 0 || _throw_argerror()
if soffs < 1 || doffs < 1 || soffs+n-1 > length(src) || doffs+n-1 > length(dest)
throw(BoundsError())
end
Expand All @@ -276,10 +276,11 @@ function copyto!(dest::Array{T}, doffs::Integer, src::Array{T}, soffs::Integer,
end

# Outlining this because otherwise a catastrophic inference slowdown
# occurs, see discussion in #27874
function _throw_argerror(n)
# occurs, see discussion in #27874.
# It is also mitigated by using a constant string.
function _throw_argerror()
@_noinline_meta
throw(ArgumentError(string("tried to copy n=", n, " elements, but n should be nonnegative")))
throw(ArgumentError("Number of elements to copy must be nonnegative."))
end

copyto!(dest::Array{T}, src::Array{T}) where {T} = copyto!(dest, 1, src, 1, length(src))
Expand Down Expand Up @@ -512,10 +513,12 @@ function _collect(::Type{T}, itr, isz::SizeUnknown) where T
end

# make a collection similar to `c` and appropriate for collecting `itr`
_similar_for(c::AbstractArray, T, itr, ::SizeUnknown) = similar(c, T, 0)
_similar_for(c::AbstractArray, T, itr, ::HasLength) = similar(c, T, Int(length(itr)::Integer))
_similar_for(c::AbstractArray, T, itr, ::HasShape) = similar(c, T, axes(itr))
_similar_for(c, T, itr, isz) = similar(c, T)
_similar_for(c::AbstractArray, ::Type{T}, itr, ::SizeUnknown) where {T} = similar(c, T, 0)
_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasLength) where {T} =
similar(c, T, Int(length(itr)::Integer))
_similar_for(c::AbstractArray, ::Type{T}, itr, ::HasShape) where {T} =
similar(c, T, axes(itr))
_similar_for(c, ::Type{T}, itr, isz) where {T} = similar(c, T)

"""
collect(collection)
Expand Down Expand Up @@ -2333,7 +2336,7 @@ function filter!(f, a::AbstractVector)

for acurr in a
if f(acurr)
a[i] = acurr
@inbounds a[i] = acurr
y = iterate(idx, state)
y === nothing && (i += 1; break)
i, state = y
Expand Down
11 changes: 9 additions & 2 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
# notes: bits are stored in contiguous chunks
# unused bits must always be set to 0
"""
BitArray{N} <: DenseArray{Bool, N}
BitArray{N} <: AbstractArray{Bool, N}

Space-efficient `N`-dimensional boolean array, which stores one bit per boolean value.
Space-efficient `N`-dimensional boolean array, using just one bit for each boolean value.

`BitArray`s pack up to 64 values into every 8 bytes, resulting in an 8x space efficiency
over `Array{Bool, N}` and allowing some operations to work on 64 values at once.

By default, Julia returns `BitArrays` from [broadcasting](@ref Broadcasting) operations
that generate boolean elements (including dotted-comparisons like `.==`) as well as from
the functions [`trues`](@ref) and [`falses`](@ref).
"""
mutable struct BitArray{N} <: AbstractArray{Bool, N}
chunks::Vector{UInt64}
Expand Down
4 changes: 2 additions & 2 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ toInt8(x::UInt16) = checked_trunc_sint(Int8, check_top_bit(x))
toInt8(x::UInt32) = checked_trunc_sint(Int8, check_top_bit(x))
toInt8(x::UInt64) = checked_trunc_sint(Int8, check_top_bit(x))
toInt8(x::UInt128) = checked_trunc_sint(Int8, check_top_bit(x))
toInt8(x::Bool) = and_int(zext_int(Int8, x), Int8(1))
toInt8(x::Bool) = and_int(bitcast(Int8, x), Int8(1))
toInt16(x::Int8) = sext_int(Int16, x)
toInt16(x::Int16) = x
toInt16(x::Int32) = checked_trunc_sint(Int16, x)
Expand Down Expand Up @@ -679,7 +679,7 @@ toUInt8(x::UInt16) = checked_trunc_uint(UInt8, x)
toUInt8(x::UInt32) = checked_trunc_uint(UInt8, x)
toUInt8(x::UInt64) = checked_trunc_uint(UInt8, x)
toUInt8(x::UInt128) = checked_trunc_uint(UInt8, x)
toUInt8(x::Bool) = and_int(zext_int(UInt8, x), UInt8(1))
toUInt8(x::Bool) = and_int(bitcast(UInt8, x), UInt8(1))
toUInt16(x::Int8) = sext_int(UInt16, check_top_bit(x))
toUInt16(x::Int16) = bitcast(UInt16, check_top_bit(x))
toUInt16(x::Int32) = checked_trunc_uint(UInt16, x)
Expand Down
2 changes: 1 addition & 1 deletion base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ BroadcastStyle(a::AbstractArrayStyle, ::Style{Tuple}) = a
BroadcastStyle(::A, ::A) where A<:ArrayStyle = A()
BroadcastStyle(::ArrayStyle, ::ArrayStyle) = Unknown()
BroadcastStyle(::A, ::A) where A<:AbstractArrayStyle = A()
function BroadcastStyle(a::A, b::B) where {A<:AbstractArrayStyle{M},B<:AbstractArrayStyle{N}} where {M,N}
Base.@pure function BroadcastStyle(a::A, b::B) where {A<:AbstractArrayStyle{M},B<:AbstractArrayStyle{N}} where {M,N}
if Base.typename(A) === Base.typename(B)
return A(Val(max(M, N)))
end
Expand Down
5 changes: 5 additions & 0 deletions base/channels.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license

"""
AbstractChannel{T}

Representation of a channel passing objects of type `T`.
"""
abstract type AbstractChannel{T} end

"""
Expand Down
4 changes: 2 additions & 2 deletions base/checked.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function checked_neg(x::T) where T<:Integer
checked_sub(T(0), x)
end
throw_overflowerr_negation(x) = (@_noinline_meta;
throw(OverflowError("checked arithmetic: cannot compute -x for x = $x::$(typeof(x))")))
throw(OverflowError(Base.invokelatest(string, "checked arithmetic: cannot compute -x for x = ", x, "::", typeof(x)))))
if BrokenSignedInt != Union{}
function checked_neg(x::BrokenSignedInt)
r = -x
Expand Down Expand Up @@ -151,7 +151,7 @@ end


throw_overflowerr_binaryop(op, x, y) = (@_noinline_meta;
throw(OverflowError("$x $op $y overflowed for type $(typeof(x))")))
throw(OverflowError(Base.invokelatest(string, x, " ", op, "y", " overflowed for type ", typeof(x)))))

"""
Base.checked_add(x, y)
Expand Down
Loading