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

release-1.7: Backports for 1.7-RC1 #41781

Merged
merged 66 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4f8f4ad
Add isinf/isnan check for %g/%G formatting
Seelengrab Jul 20, 2021
642719e
Add test for Inf/NaN handling in %g/%G Printf
Seelengrab Jul 20, 2021
28caff0
CI (Buildkite): on the `platform_linux` jobs, after building Julia, m…
DilumAluthge Aug 6, 2021
f04c882
CI: Disable Codecov commit statuses (#41812)
DilumAluthge Aug 7, 2021
f309ec1
CI (Buildbot): As soon as a PR is created or updated, create pending …
DilumAluthge Aug 7, 2021
d9159e4
CI (Buildbot): for the "Create Pending Statuses" GitHub Actions workf…
DilumAluthge Aug 7, 2021
8050536
CI (Buildbot): Fix a bug in the "Create Pending Statuses" GitHub Acti…
DilumAluthge Aug 7, 2021
ccc994b
CI (Buildbot): a simpler way of getting the SHA for the "Statuses" ac…
DilumAluthge Aug 7, 2021
ff2d68d
CI (Buildbot, GHA): in the "Statuses" workflow, we only need to creat…
DilumAluthge Aug 8, 2021
9ffd29a
CI (Buildbot, GHA): in the "Statuses" workflow, remove the `macosaarc…
DilumAluthge Aug 8, 2021
6c2e1bb
CI (Buildbot, GHA): in the "Statuses" workflow, remove the `tester_li…
DilumAluthge Aug 9, 2021
d224a1a
CI (Buildbot, GHA): In the "Statuses" workflow, remove the `tester_li…
DilumAluthge Aug 9, 2021
37f4dbc
CI (Buildbot, GHA): add a note about token permissions (#41825)
DilumAluthge Aug 9, 2021
929ea9f
Include an additional patch for OpenBLAS. (#41842)
maleadt Aug 10, 2021
9a15a35
[IRShow] expose index information to postprinter (#41828)
simeonschaub Aug 10, 2021
54ea26a
CI (Buildbot, GHA): Simplify the `permissions` key in the workflow fi…
DilumAluthge Aug 10, 2021
1b3fb60
win: fix lock function call for backtrace collection (#41849)
vtjnash Aug 10, 2021
7208ff2
Revert "Add vim bindings to TerminalMenus (#37940)"
timholy Aug 9, 2021
fc5df44
CI (Buildkite): `llvmpasses`: use the latest rootfs image (#41864)
DilumAluthge Aug 12, 2021
ede08aa
don't look for packages in code that isn't going to be run this eval …
IanButterworth Aug 14, 2021
4ef57b3
[LinearAlgebra] flesh out LBT API a bit more (#41452)
staticfloat Aug 15, 2021
550e2a1
docs: add v1.7 compat for `@atomic` and fix links (#41873)
petvana Aug 16, 2021
c06cd48
ensure that the non-REPL precompile code actually get precompiled (#4…
KristofferC Aug 17, 2021
cd1945c
Fix ~370 invalidations from Expr(:ncat, ...) pretty-printing (#41877)
timholy Aug 18, 2021
83bf082
Fix ~50 invalidations stemming from `modules_to_be_loaded` (#41878)
timholy Aug 18, 2021
d71bd32
small optimization to subtyping (#41672)
JeffBezanson Aug 19, 2021
3fa1bfc
README: add a link to the `base-buildkite-docs` repository (#41956)
DilumAluthge Aug 23, 2021
959d1fa
Derive better name for methods with external method tables. (#41930)
maleadt Aug 23, 2021
9dd394d
Signatures: restrict color to backtrace printing (#41929)
timholy Aug 23, 2021
9bed4bd
Fix collect on stateful generator (#41919)
jakobnissen Aug 24, 2021
7a79ed1
fix a case where Vararg.T might be accessed when undefined (#41867)
JeffBezanson Aug 25, 2021
f3d2bca
fix #41908, inference error in subst_trivial_bounds (#41976)
JeffBezanson Aug 25, 2021
a216041
Fix firstindex in replace_ref_begin_end (fixes #41630) (#41695)
phipsgabler Aug 11, 2021
3da1d17
atomics: switch to using exact types for return pairs (#41659)
vtjnash Aug 10, 2021
96eab49
types: fix cache computation (#41935)
vtjnash Aug 23, 2021
f34e241
Make jl_cumulative_compile_time_ns global (and reentrant).
NHDaly Jul 30, 2021
5bd502e
Fix #41975 - Dropped typecheck in GotoIfNot (#42010)
Keno Aug 26, 2021
3746e63
codegen: parameter attributes on CFunction closures sticks (#41827)
troels Aug 26, 2021
30e82b4
atomics: optimize modify operation (partially) (#41859)
vtjnash Aug 26, 2021
4d5d99d
simplify and improve type intersection algorithm a bit
JeffBezanson Aug 5, 2021
447f822
give wider/safer intersection result for vars used in both invariant …
JeffBezanson Aug 12, 2021
4cddbea
fix ptrhash_remove (#42009)
vtjnash Aug 26, 2021
e609a27
bump Pkg to latest v1.7
KristofferC Aug 31, 2021
f14e50b
improve atomic docs (#42024)
aviatesk Aug 28, 2021
2116922
fix missing layout allocation (#42035)
vtjnash Aug 28, 2021
1a8387f
Fix a precision issue in `abstract_iteration` (#41839)
martinholters Aug 30, 2021
0c85083
Fix depwarn grammar (#42069)
sostock Aug 31, 2021
5e99551
make failure to precompile a method return a value instead of a uncon…
KristofferC Aug 31, 2021
3744a02
inference: add missing `LimitedAccuracy` handlings (#42034)
aviatesk Aug 28, 2021
38418ad
Refactor LICENSE.md to make it scanner friendly (#41095)
SamuraiAku Jun 29, 2021
0824c1b
Avoid impossible unionall normalization (#42003)
martinholters Sep 1, 2021
a8e6b33
[AllocOpt] fix iterator invalidation (#42059)
vtjnash Sep 1, 2021
35f675d
GMP: fix warning in init (#42062)
vtjnash Sep 1, 2021
1f34cd3
avoid loading duplicate libraries (#42058)
vtjnash Sep 2, 2021
a3a9182
inference: fix #42090, make sure not to wrap `Conditional` in `Partia…
aviatesk Sep 2, 2021
0e0a974
InteractiveUtils: recursive correctly in varinfo, et al. (#42061)
vtjnash Sep 3, 2021
f2ecc32
threads: fix semantic error in old Threads.Atomic
vtjnash Aug 13, 2021
dc18194
atomics: optimize atomic modify operations (mostly)
vtjnash Aug 12, 2021
bfb05d5
inference: propagate variable changes to all exception frames (#42081)
vtjnash Sep 3, 2021
a5bed8b
filter out duplicate modules in auto-install search, fixes #42133 (#4…
IanButterworth Sep 6, 2021
c85012a
Fix the `cmdlineargs` tests on Buildkite (#42118)
DilumAluthge Sep 6, 2021
1232010
compiler: general refactor (#41633)
aviatesk Jul 22, 2021
78dc224
more type-stable type-inference (#41697)
aviatesk Jul 29, 2021
93f40a0
inference: bail from const-prop if const-prop fails (#42112)
vtjnash Sep 8, 2021
c6a090f
Merge pull request #42180 from JuliaLang/avi/backport-1.7
aviatesk Sep 9, 2021
a8722c6
(#42139) Fixes _is_mailto in resolution of autolink in Markdown modul…
tlienart Sep 8, 2021
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: 2 additions & 0 deletions .buildkite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
This directory contains the Buildkite configuration files for Base Julia CI.

The rootfs image definitions are located in the [rootfs-images](https://github.com/JuliaCI/rootfs-images) repository.

The documentation for the Base Julia CI setup is located in the [base-buildkite-docs](https://github.com/JuliaCI/base-buildkite-docs) repository.
4 changes: 2 additions & 2 deletions .buildkite/pipelines/main/misc/llvmpasses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ steps:
- JuliaCI/julia#v1:
version: 1.6
- staticfloat/sandbox#v1:
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.1/package_linux.x86_64.tar.gz
rootfs_treehash: "8c33c341a864852629b8aac01a6eb6a79b73570e"
rootfs_url: https://github.com/JuliaCI/rootfs-images/releases/download/v3.8/package_linux.x86_64.tar.gz
rootfs_treehash: "84a323ae8fcc724f8ea5aca5901bbbf4bda3e519"
uid: 1000
gid: 1000
workspaces:
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/pipelines/main/platforms/linux64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ steps:
make release
make install

echo "--- Make sure that the working directory is clean"
if [ -z "$(git status --short)" ]; then echo "INFO: The working directory is clean."; else echo "ERROR: The working directory is dirty."; echo "Output of git status:"; git status; exit 1; fi

echo "--- Print Julia version info"
./julia -e 'using InteractiveUtils; InteractiveUtils.versioninfo()'

Expand Down
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
status:
project: off
patch: off
6 changes: 4 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CODEOWNERS @JuliaLang/github-actions
/.github/ @JuliaLang/github-actions
CODEOWNERS @JuliaLang/github-actions
/.github/ @JuliaLang/github-actions
/.buildkite/ @JuliaLang/github-actions

/.github/workflows/statuses.yml @DilumAluthge
74 changes: 74 additions & 0 deletions .github/workflows/statuses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Please ping @DilumAluthge when making any changes to this file.

# This is just a short-term solution until we have migrated all of CI to Buildkite.
#
# 1. TODO: delete this file once we have migrated all of CI to Buildkite.
#
# 2. TODO: disable GitHub Actions on the `JuliaLang/julia` repository once we have migrated all
# of CI to Buildkite.

# Here are some steps that we take in this workflow file for security reasons:
# 1. We do not checkout any code.
# 2. We do not run any external actions.
# 3. We only give `GITHUB_TOKEN` the minimum necessary set of permissions.

name: Statuses

on:
push:
branches:
- 'master'
- 'release-*'
# When using the `pull_request_target` event, all PRs will get a `GITHUB_TOKEN` that has
# write permissions, even if the PR is from a fork.
# Therefore, for security reasons, we do not checkout any code in this workflow.
pull_request_target:
branches:
- 'master'
- 'release-*'

# These are the permissions for the `GITHUB_TOKEN` token.
# We should only give the token the minimum necessary set of permissions.
permissions:
statuses: write

jobs:
statuses:
name: statuses
runs-on: ubuntu-latest
if: github.repository == 'JuliaLang/julia'
strategy:
fail-fast: false
steps:
- run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
if: github.event_name == 'pull_request_target'

- run: echo "SHA=${{ github.sha }}" >> $GITHUB_ENV
if: github.event_name != 'pull_request_target'

- run: echo "The SHA is ${{ env.SHA }}"

# As we incrementally migrate individual jobs from Buildbot to Buildkite, we should
# remove them from the `context_list`.
- run: |
declare -a CONTEXT_LIST=(
"buildbot/tester_freebsd64"
"buildbot/tester_linux32"
"buildbot/tester_linux64"
"buildbot/tester_linuxaarch64"
"buildbot/tester_macos64"
"buildbot/tester_win32"
"buildbot/tester_win64"
)
for CONTEXT in "${CONTEXT_LIST[@]}"
do
curl \
-X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
-d "{\"context\": \"$CONTEXT\", \"state\": \"$STATE\"}" \
https://api.github.com/repos/JuliaLang/julia/statuses/${{ env.SHA }}
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STATE: "pending"
96 changes: 20 additions & 76 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,82 +1,26 @@
The Julia language is licensed under the MIT License. The "language" consists
of the compiler (the contents of src/), most of the standard library (base/),
and some utilities (most of the rest of the files in this repository). See below
for exceptions.
MIT License

> Copyright (c) 2009-2021: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
> and other contributors:
>
> https://github.com/JuliaLang/julia/contributors
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) 2009-2021: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors: https://github.com/JuliaLang/julia/contributors

Julia includes code from the following projects, which have their own licenses:
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

- [crc32c.c](https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software) (CRC-32c checksum code by Mark Adler) [[ZLib](https://opensource.org/licenses/Zlib)].
- [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed.
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively]
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementation on Windows) [MIT]
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
- [Python](https://docs.python.org/3/license.html) (for strtod and joinpath implementation on Windows) [BSD-3, effectively]
- [Google Benchmark](https://github.com/google/benchmark) (for cyclecount implementation) [Apache 2.0]
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

The following components included in Julia `Base` have their own separate licenses:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- base/ryu/* [Boost] (see [ryu](https://github.com/ulfjack/ryu/blob/master/LICENSE-Boost))
- base/grisu/* [BSD-3] (see [double-conversion](https://github.com/google/double-conversion/blob/master/LICENSE))
- base/special/{exp,rem_pio2,hyperbolic}.jl [Freely distributable with preserved copyright notice] (see [FDLIBM](https://www.netlib.org/fdlibm))
end of terms and conditions

The Julia language links to the following external libraries, which have their
own licenses:

- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT]
- [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT]
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]

Julia's `stdlib` uses the following external libraries, which have their own licenses:

- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]
- [OPENLIBM](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
- [GMP](https://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
- [MPFR](https://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE) [BSD-3]
- [LAPACK](https://netlib.org/lapack/LICENSE.txt) [BSD-3]
- [PCRE](https://www.pcre.org/licence.txt) [BSD-3]
- [SUITESPARSE](http://suitesparse.com) [mix of LGPL2+ and GPL2+; see individual module licenses]

Julia's build process uses the following external tools:

- [PATCHELF](https://nixos.org/patchelf.html)
- [OBJCONV](https://www.agner.org/optimize/#objconv)

Julia bundles the following external programs and libraries:

- [7-Zip](https://www.7-zip.org/license.txt)
- [ZLIB](https://zlib.net/zlib_license.html)

On some platforms, distributions of Julia contain SSL certificate authority certificates,
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).
Please see THIRDPARTY.md for license information for other software used in this project.
56 changes: 56 additions & 0 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
The Julia language is licensed under the MIT License (see `LICENSE.md`). The "language" consists
of the compiler (the contents of src/), most of the standard library (base/),
and some utilities (most of the rest of the files in this repository). See below
for exceptions.

- [crc32c.c](https://stackoverflow.com/questions/17645167/implementing-sse-4-2s-crc32c-in-software) (CRC-32c checksum code by Mark Adler) [[ZLib](https://opensource.org/licenses/Zlib)].
- [LDC](https://github.com/ldc-developers/ldc/blob/master/LICENSE) (for ccall/cfunction ABI definitions) [BSD-3]. The portion of code that Julia uses from LDC is [BSD-3] licensed.
- [LLVM](https://releases.llvm.org/3.9.0/LICENSE.TXT) (for parts of src/jitlayers.cpp and src/disasm.cpp) [BSD-3, effectively]
- [MUSL](https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT) (for getopt implementation on Windows) [MIT]
- [MINGW](https://sourceforge.net/p/mingw/mingw-org-wsl/ci/legacy/tree/mingwrt/mingwex/dirname.c) (for dirname implementation on Windows) [MIT]
- [NetBSD](https://www.netbsd.org/about/redistribution.html) (for setjmp, longjmp, and strptime implementations on Windows) [BSD-3]
- [Python](https://docs.python.org/3/license.html) (for strtod and joinpath implementation on Windows) [BSD-3, effectively]
- [Google Benchmark](https://github.com/google/benchmark) (for cyclecount implementation) [Apache 2.0]

The following components included in Julia `Base` have their own separate licenses:

- base/ryu/* [Boost] (see [ryu](https://github.com/ulfjack/ryu/blob/master/LICENSE-Boost))
- base/grisu/* [BSD-3] (see [double-conversion](https://github.com/google/double-conversion/blob/master/LICENSE))
- base/special/{exp,rem_pio2,hyperbolic}.jl [Freely distributable with preserved copyright notice] (see [FDLIBM](https://www.netlib.org/fdlibm))

The Julia language links to the following external libraries, which have their
own licenses:

- [FEMTOLISP](https://github.com/JeffBezanson/femtolisp) [BSD-3]
- [LIBUNWIND](https://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=blob_plain;f=LICENSE;hb=master) [MIT]
- [LIBUV](https://github.com/joyent/libuv/blob/master/LICENSE) [MIT]
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [BSD-3, effectively]
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]

Julia's `stdlib` uses the following external libraries, which have their own licenses:

- [DSFMT](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/LICENSE.txt) [BSD-3]
- [OPENLIBM](https://github.com/JuliaMath/openlibm/blob/master/LICENSE.md) [MIT, BSD-2, ISC]
- [GMP](https://gmplib.org/manual/Copying.html#Copying) [LGPL3+ or GPL2+]
- [LIBGIT2](https://github.com/libgit2/libgit2/blob/development/COPYING) [GPL2+ with unlimited linking exception]
- [CURL](https://curl.haxx.se/docs/copyright.html) [MIT/X derivative]
- [LIBSSH2](https://github.com/libssh2/libssh2/blob/master/COPYING) [BSD-3]
- [MBEDTLS](https://tls.mbed.org/how-to-get) [either GPLv2 or Apache 2.0]
- [MPFR](https://www.mpfr.org/mpfr-current/mpfr.html#Copying) [LGPL3+]
- [OPENBLAS](https://raw.github.com/xianyi/OpenBLAS/master/LICENSE) [BSD-3]
- [LAPACK](https://netlib.org/lapack/LICENSE.txt) [BSD-3]
- [PCRE](https://www.pcre.org/licence.txt) [BSD-3]
- [SUITESPARSE](http://suitesparse.com) [mix of LGPL2+ and GPL2+; see individual module licenses]

Julia's build process uses the following external tools:

- [PATCHELF](https://nixos.org/patchelf.html)
- [OBJCONV](https://www.agner.org/optimize/#objconv)

Julia bundles the following external programs and libraries:

- [7-Zip](https://www.7-zip.org/license.txt)
- [ZLIB](https://zlib.net/zlib_license.html)

On some platforms, distributions of Julia contain SSL certificate authority certificates,
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).
3 changes: 3 additions & 0 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ include("options.jl")
include("promotion.jl")
include("tuple.jl")
include("expr.jl")
Pair{A, B}(@nospecialize(a), @nospecialize(b)) where {A, B} = (@_inline_meta; Pair{A, B}(convert(A, a)::A, convert(B, b)::B))
#Pair{Any, B}(@nospecialize(a::Any), b) where {B} = (@_inline_meta; Pair{Any, B}(a, Base.convert(B, b)::B))
#Pair{A, Any}(a, @nospecialize(b::Any)) where {A} = (@_inline_meta; Pair{A, Any}(Base.convert(A, a)::A, b))
include("pair.jl")
include("traits.jl")
include("range.jl")
Expand Down
10 changes: 7 additions & 3 deletions base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -698,21 +698,25 @@ else
end
end

_array_for(::Type{T}, itr, ::HasLength) where {T} = Vector{T}(undef, Int(length(itr)::Integer))
_array_for(::Type{T}, itr, ::HasShape{N}) where {T,N} = similar(Array{T,N}, axes(itr))
_array_for(::Type{T}, itr, isz::HasLength) where {T} = _array_for(T, itr, isz, length(itr))
_array_for(::Type{T}, itr, isz::HasShape{N}) where {T,N} = _array_for(T, itr, isz, axes(itr))
_array_for(::Type{T}, itr, ::HasLength, len) where {T} = Vector{T}(undef, len)
_array_for(::Type{T}, itr, ::HasShape{N}, axs) where {T,N} = similar(Array{T,N}, axs)

function collect(itr::Generator)
isz = IteratorSize(itr.iter)
et = @default_eltype(itr)
if isa(isz, SizeUnknown)
return grow_to!(Vector{et}(), itr)
else
shape = isz isa HasLength ? length(itr) : axes(itr)
y = iterate(itr)
if y === nothing
return _array_for(et, itr.iter, isz)
end
v1, st = y
collect_to_with_first!(_array_for(typeof(v1), itr.iter, isz), v1, itr, st)
arr = _array_for(typeof(v1), itr.iter, isz, shape)
return collect_to_with_first!(arr, v1, itr, st)
end
end

Expand Down
12 changes: 6 additions & 6 deletions base/atomics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ for typ in atomictypes
rt = "$lt, $lt*"
irt = "$ilt, $ilt*"
@eval getindex(x::Atomic{$typ}) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%ptr = inttoptr i$WORD_SIZE %0 to $lt*
%rv = load atomic $rt %ptr acquire, align $(gc_alignment(typ))
ret $lt %rv
""", $typ, Tuple{Ptr{$typ}}, unsafe_convert(Ptr{$typ}, x))
@eval setindex!(x::Atomic{$typ}, v::$typ) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%ptr = inttoptr i$WORD_SIZE %0 to $lt*
store atomic $lt %1, $lt* %ptr release, align $(gc_alignment(typ))
ret void
Expand All @@ -371,7 +371,7 @@ for typ in atomictypes
# Note: atomic_cas! succeeded (i.e. it stored "new") if and only if the result is "cmp"
if typ <: Integer
@eval atomic_cas!(x::Atomic{$typ}, cmp::$typ, new::$typ) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%ptr = inttoptr i$WORD_SIZE %0 to $lt*
%rs = cmpxchg $lt* %ptr, $lt %1, $lt %2 acq_rel acquire
%rv = extractvalue { $lt, i1 } %rs, 0
Expand All @@ -380,7 +380,7 @@ for typ in atomictypes
unsafe_convert(Ptr{$typ}, x), cmp, new)
else
@eval atomic_cas!(x::Atomic{$typ}, cmp::$typ, new::$typ) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%iptr = inttoptr i$WORD_SIZE %0 to $ilt*
%icmp = bitcast $lt %1 to $ilt
%inew = bitcast $lt %2 to $ilt
Expand All @@ -403,15 +403,15 @@ for typ in atomictypes
if rmwop in arithmetic_ops && !(typ <: ArithmeticTypes) continue end
if typ <: Integer
@eval $fn(x::Atomic{$typ}, v::$typ) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%ptr = inttoptr i$WORD_SIZE %0 to $lt*
%rv = atomicrmw $rmw $lt* %ptr, $lt %1 acq_rel
ret $lt %rv
""", $typ, Tuple{Ptr{$typ}, $typ}, unsafe_convert(Ptr{$typ}, x), v)
else
rmwop === :xchg || continue
@eval $fn(x::Atomic{$typ}, v::$typ) =
llvmcall($"""
GC.@preserve x llvmcall($"""
%iptr = inttoptr i$WORD_SIZE %0 to $ilt*
%ival = bitcast $lt %1 to $ilt
%irv = atomicrmw $rmw $ilt* %iptr, $ilt %ival acq_rel
Expand Down
14 changes: 13 additions & 1 deletion base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export
# key types
Any, DataType, Vararg, NTuple,
Tuple, Type, UnionAll, TypeVar, Union, Nothing, Cvoid,
AbstractArray, DenseArray, NamedTuple,
AbstractArray, DenseArray, NamedTuple, Pair,
# special objects
Function, Method,
Module, Symbol, Task, Array, UndefInitializer, undef, WeakRef, VecElement,
Expand Down Expand Up @@ -813,4 +813,16 @@ _parse = nothing
# support for deprecated uses of internal _apply function
_apply(x...) = Core._apply_iterate(Main.Base.iterate, x...)

struct Pair{A, B}
first::A
second::B
# if we didn't inline this, it's probably because the callsite was actually dynamic
# to avoid potentially compiling many copies of this, we mark the arguments with `@nospecialize`
# but also mark the whole function with `@inline` to ensure we will inline it whenever possible
# (even if `convert(::Type{A}, a::A)` for some reason was expensive)
Pair(a, b) = new{typeof(a), typeof(b)}(a, b)
Pair{A, B}(a::A, b::B) where {A, B} = new(a, b)
Pair{Any, Any}(@nospecialize(a::Any), @nospecialize(b::Any)) = new(a, b)
end

ccall(:jl_set_istopmod, Cvoid, (Any, Bool), Core, true)
Loading