From 345ce78da9aba498e4d7c2dee5f11e6fbf4ddc7c Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 29 Dec 2020 18:00:58 +0100 Subject: [PATCH 001/239] remove unnecessary ::Union{} type asserts (#35817) * remove unnecessary ::Union{} type asserts --- base/char.jl | 8 ++++---- stdlib/LibGit2/src/LibGit2.jl | 10 +++++----- test/char.jl | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/base/char.jl b/base/char.jl index 173c84711e551..99f46988fc75f 100644 --- a/base/char.jl +++ b/base/char.jl @@ -82,8 +82,8 @@ end struct CodePointError{T<:Integer} <: Exception code::T end -@noinline invalid_char(c::AbstractChar) = throw(InvalidCharError(c)) -@noinline code_point_err(u::Integer) = throw(CodePointError(u)) +@noinline throw_invalid_char(c::AbstractChar) = throw(InvalidCharError(c)) +@noinline throw_code_point_err(u::Integer) = throw(CodePointError(u)) function ismalformed(c::Char) u = reinterpret(UInt32, c) @@ -129,7 +129,7 @@ function UInt32(c::Char) t0 = trailing_zeros(u) & 56 (l1 == 1) | (8l1 + t0 > 32) | ((((u & 0x00c0c0c0) ⊻ 0x00808080) >> t0 != 0) | is_overlong_enc(u)) && - invalid_char(c)::Union{} + throw_invalid_char(c) u &= 0xffffffff >> l1 u >>= t0 ((u & 0x0000007f) >> 0) | ((u & 0x00007f00) >> 2) | @@ -157,7 +157,7 @@ end function Char(u::UInt32) u < 0x80 && return reinterpret(Char, u << 24) - u < 0x00200000 || code_point_err(u)::Union{} + u < 0x00200000 || throw_code_point_err(u) c = ((u << 0) & 0x0000003f) | ((u << 2) & 0x00003f00) | ((u << 4) & 0x003f0000) | ((u << 6) & 0x3f000000) c = u < 0x00000800 ? (c << 16) | 0xc0800000 : diff --git a/stdlib/LibGit2/src/LibGit2.jl b/stdlib/LibGit2/src/LibGit2.jl index 7ce6274a67589..5970ae19359bf 100644 --- a/stdlib/LibGit2/src/LibGit2.jl +++ b/stdlib/LibGit2/src/LibGit2.jl @@ -963,11 +963,15 @@ end const ENSURE_INITIALIZED_LOCK = ReentrantLock() +@noinline function throw_negative_refcount_error(x::Int) + error("Negative LibGit2 REFCOUNT $x\nThis shouldn't happen, please file a bug report!") +end + function ensure_initialized() lock(ENSURE_INITIALIZED_LOCK) do x = Threads.atomic_cas!(REFCOUNT, 0, 1) x > 0 && return - x < 0 && negative_refcount_error(x)::Union{} + x < 0 && throw_negative_refcount_error(x) try initialize() catch Threads.atomic_sub!(REFCOUNT, 1) @@ -978,10 +982,6 @@ function ensure_initialized() return nothing end -@noinline function negative_refcount_error(x::Int) - error("Negative LibGit2 REFCOUNT $x\nThis shouldn't happen, please file a bug report!") -end - @noinline function initialize() @check ccall((:git_libgit2_init, :libgit2), Cint, ()) diff --git a/test/char.jl b/test/char.jl index 325f97098b037..abc8db33cb4a7 100644 --- a/test/char.jl +++ b/test/char.jl @@ -19,7 +19,7 @@ @test widen('a') === 'a' # just check this works - @test_throws Base.CodePointError Base.code_point_err(UInt32(1)) + @test_throws Base.CodePointError Base.throw_code_point_err(UInt32(1)) end @testset "ASCII conversion to/from Integer" begin From ad7e59a6b178c2c990cb85886e46fc1bfb0102b2 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Tue, 29 Dec 2020 16:08:46 -0500 Subject: [PATCH 002/239] Document destructuring syntax in anonymous function argument (#39024) When destructuring a single tuple in an anonymous function argument, you have to include an extra comma to force a 1-tuple. Otherwise ((x,y)) collapses to (x,y). This is not the case for named functions. Co-authored-by: Graham Smith --- doc/src/manual/functions.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/functions.md b/doc/src/manual/functions.md index 6dcec615d2994..b6e362eb72c73 100644 --- a/doc/src/manual/functions.md +++ b/doc/src/manual/functions.md @@ -395,6 +395,15 @@ julia> gap(minmax(10, 2)) Notice the extra set of parentheses in the definition of `gap`. Without those, `gap` would be a two-argument function, and this example would not work. +For anonymous functions, destructuring a single tuple requires an extra comma: + +``` +julia> map(((x,y),) -> x + y, [(1,2), (3,4)]) +2-element Array{Int64,1}: + 3 + 7 +``` + ## Varargs Functions It is often convenient to be able to write functions taking an arbitrary number of arguments. @@ -681,8 +690,8 @@ end ``` The `do x` syntax creates an anonymous function with argument `x` and passes it as the first argument -to [`map`](@ref). Similarly, `do a,b` would create a two-argument anonymous function, and a -plain `do` would declare that what follows is an anonymous function of the form `() -> ...`. +to [`map`](@ref). Similarly, `do a,b` would create a two-argument anonymous function. Note that `do (a,b)` would create a one-argument anonymous function, +whose argument is a tuple to be deconstructed. A plain `do` would declare that what follows is an anonymous function of the form `() -> ...`. How these arguments are initialized depends on the "outer" function; here, [`map`](@ref) will sequentially set `x` to `A`, `B`, `C`, calling the anonymous function on each, just as would happen From bb2e06590795e6c2b2c3d567d8664b69dea2865d Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Sat, 5 Sep 2020 14:19:26 -0400 Subject: [PATCH 003/239] Fix Dict key check in type inference This has been there since #27126 (9100329d189b3d2ac6d1e03bfc7431cbe8d18c00) Dudging by the use of `reverse_mapping[stmt_val]` below this should either be a branch condition or an assert. --- base/compiler/ssair/passes.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 1feda4ecf0bd1..9b75b3b725d16 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -517,8 +517,7 @@ function perform_lifting!(compact::IncrementalCompact, if stmt_val in keys(lifted_leaves) stmt_val = lifted_leaves[stmt_val] - else - isa(stmt_val, Union{SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping) + elseif isa(stmt_val, Union{NewSSAValue, SSAValue, OldSSAValue}) && stmt_val in keys(reverse_mapping) stmt_val = RefValue{Any}(lifted_phis[reverse_mapping[stmt_val]].ssa) end From 8a2ccf2ff60cb918a9cb915a2191b53ff06d77f5 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Sat, 5 Sep 2020 22:15:02 -0400 Subject: [PATCH 004/239] Some `getfield` related fixes in inference * Use the field index passed in in `lift_leaves` The caller has already done all the computation including bound checking. The `field` computed in this function is also affecting all the following iterations which is almost certainly wrong. * Remove unnecessary type check on `field` in `lift_leaves` since it is always `Int` * Move a branch disabling `return nothing` higher up * Remove some duplicated calculation on field index in `getfield_elim_pass!` * Fix `try_compute_fieldidx` to return `nothing` for non-`Int` `Integer` field index. This can cause `getfield_nothrow` to return incorrect result. It also gives the caller worse type info about the return value. * Teach `getfield_nothrow` that `isbits` field cannot be undefined and getfield on such field cannot throw. This is already handled in `isdefined_tfunc`. * Fix a few wrong use of `isbits` in dead branches ---- Ref #26948 (fa02d34496eb2bed9a55e4f77cb135a6b4180edc) Ref #27126 (9100329d189b3d2ac6d1e03bfc7431cbe8d18c00) --- base/compiler/ssair/passes.jl | 18 ++++++++---------- base/compiler/tfuncs.jl | 8 ++++++-- test/compiler/irpasses.jl | 10 ++++++++++ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 9b75b3b725d16..3b60da09b180d 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -290,7 +290,7 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt), else def = compact[leaf] end - if is_tuple_call(compact, def) && isa(field, Int) && 1 <= field < length(def.args) + if is_tuple_call(compact, def) && 1 <= field < length(def.args) lifted = def.args[1+field] if is_old(compact, leaf) && isa(lifted, SSAValue) lifted = OldSSAValue(lifted.id) @@ -309,8 +309,6 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt), end (isa(typ, DataType) && (!typ.abstract)) || return nothing @assert !typ.mutable - field = try_compute_fieldidx_expr(typ, stmt) - field === nothing && return nothing if length(def.args) < 1 + field ftyp = fieldtype(typ, field) if !isbitstype(ftyp) @@ -325,7 +323,7 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt), compact[leaf] = nothing for i = (length(def.args) + 1):(1+field) ftyp = fieldtype(typ, i - 1) - isbits(ftyp) || return nothing + isbitstype(ftyp) || return nothing push!(def.args, insert_node!(compact, leaf, result_t, Expr(:new, ftyp))) end compact[leaf] = def @@ -344,22 +342,22 @@ function lift_leaves(compact::IncrementalCompact, @nospecialize(stmt), else typ = compact_exprtype(compact, leaf) if !isa(typ, Const) + # Disabled since #27126 + return nothing # If the leaf is an old ssa value, insert a getfield here # We will revisit this getfield later when compaction gets # to the appropriate point. # 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 is_old(compact, leaf) && (isa(field, Int) || isa(field, Symbol)) + if is_old(compact, leaf) (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 - if field > typ.ninitialized && !isbits(fieldtype(typ, field)) - return nothing + if field > typ.ninitialized && !isbitstype(fieldtype(typ, field)) lifted_leaves[leaf] = RefValue{Any}(insert_node!(compact, leaf, make_MaybeUndef(result_t), Expr(:call, :unchecked_getfield, SSAValue(leaf.id), field), true)) maybe_undef = true else - return nothing lifted_leaves[leaf] = RefValue{Any}(insert_node!(compact, leaf, result_t, Expr(:call, getfield, SSAValue(leaf.id), field), true)) end continue @@ -672,7 +670,7 @@ function getfield_elim_pass!(ir::IRCode) isempty(leaves) && continue - field = try_compute_fieldidx_expr(struct_typ, stmt) + field = try_compute_fieldidx(struct_typ, field) field === nothing && continue r = lift_leaves(compact, stmt, result_t, field, leaves) @@ -807,7 +805,7 @@ function getfield_elim_pass!(ir::IRCode) for stmt in du.uses ir[SSAValue(stmt)] = compute_value_for_use(ir, domtree, allblocks, du, phinodes, fidx, stmt) end - if !isbitstype(fieldtype(typ, fidx)) + if !isbitstype(ftyp) for (use, list) in preserve_uses push!(list, compute_value_for_use(ir, domtree, allblocks, du, phinodes, fidx, use)) end diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index ccf65fafc737f..e87066015ec63 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -695,7 +695,8 @@ function try_compute_fieldidx(typ::DataType, @nospecialize(field)) if isa(field, Symbol) field = fieldindex(typ, field, false) field == 0 && return nothing - elseif isa(field, Integer) + elseif isa(field, Int) + # Numerical field name can only be of type `Int` max_fields = fieldcount_noerror(typ) max_fields === nothing && return nothing (1 <= field <= max_fields) || return nothing @@ -742,7 +743,8 @@ function getfield_nothrow(@nospecialize(s00), @nospecialize(name), @nospecialize return false end - s = unwrap_unionall(widenconst(s00)) + s0 = widenconst(s00) + s = unwrap_unionall(s0) if isa(s, Union) return getfield_nothrow(rewrap(s.a, s00), name, inbounds) && getfield_nothrow(rewrap(s.b, s00), name, inbounds) @@ -759,6 +761,8 @@ function getfield_nothrow(@nospecialize(s00), @nospecialize(name), @nospecialize field = try_compute_fieldidx(s, name.val) field === nothing && return false field <= s.ninitialized && return true + # `try_compute_fieldidx` already check for field index bound. + !isvatuple(s) && isbitstype(fieldtype(s0, field)) && return true end return false diff --git a/test/compiler/irpasses.jl b/test/compiler/irpasses.jl index 855100c8de85f..c8fff2c1d522f 100644 --- a/test/compiler/irpasses.jl +++ b/test/compiler/irpasses.jl @@ -315,6 +315,16 @@ let K = rand(2,2) @test test_29253(K) == 2 end +function no_op_refint(r) + r[] + return +end +let code = code_typed(no_op_refint,Tuple{Base.RefValue{Int}})[1].first.code + @test length(code) == 1 + @test isa(code[1], Core.ReturnNode) + @test code[1].val === nothing +end + # check getfield elim handling of GlobalRef const _some_coeffs = (1,[2],3,4) splat_from_globalref(x) = (x, _some_coeffs...,) From d46198d1bbc19165e45f0b0a7003253ccff0773b Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 29 Dec 2020 23:26:33 -0800 Subject: [PATCH 005/239] [libuv] Bump to include `DELETE` win ACL patch (#39038) This bump to LibUV adds an important permission to files which should allow them to be deleted more reliably when created in "system"-like locations such as `C:\`. --- deps/checksums/libuv | 68 +++++++++++++++++------------------ deps/libuv.version | 2 +- stdlib/LibUV_jll/Project.toml | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/deps/checksums/libuv b/deps/checksums/libuv index e2d9a25dacb44..20fc811c961b0 100644 --- a/deps/checksums/libuv +++ b/deps/checksums/libuv @@ -1,34 +1,34 @@ -LibUV.v2.0.1+0.aarch64-apple-darwin.tar.gz/md5/fa19a6d6cfef27b5573743c5564fe1de -LibUV.v2.0.1+0.aarch64-apple-darwin.tar.gz/sha512/f8cff4d3a6b1588d1af3a3ec4cdf6541587f5dfa7ce96b27feeae4f062e11b02fddd4e3e659f5bce75c83cafaa9543099cb9e6270d5cf12870c26c17009e184d -LibUV.v2.0.1+0.aarch64-linux-gnu.tar.gz/md5/6ae00cb6ad97f998606f3f308b50271f -LibUV.v2.0.1+0.aarch64-linux-gnu.tar.gz/sha512/107784c7d36b3b8acc1cf66d278c88bd7f0aec57c343f20d638c277ded807b15bc4faf70e64177b31d46e6e9a4a93ad6978b1221eade1cdd61d427fbedcda384 -LibUV.v2.0.1+0.aarch64-linux-musl.tar.gz/md5/ceec0532c08a55bcd13a8004591433e6 -LibUV.v2.0.1+0.aarch64-linux-musl.tar.gz/sha512/70dd38a1918fa808c0d29880927a9b20fec52d6fcd39d3672faa00924081a7d69878d71f6387e18583d168ffa9288469b58afebff3b36169bd671f72d2c91f14 -LibUV.v2.0.1+0.armv6l-linux-gnueabihf.tar.gz/md5/36f413aecbd29794003fbb7309690df7 -LibUV.v2.0.1+0.armv6l-linux-gnueabihf.tar.gz/sha512/90f42b332c835a480e2e407094dadde9d7a30b2a385756596232360f4ea74832b0c1bc58c0234a05097a83793bfd80e1cbe030f3a9d02199d00153cec185ccb0 -LibUV.v2.0.1+0.armv6l-linux-musleabihf.tar.gz/md5/7d36c9cc360dae21a4a08be83c11f28d -LibUV.v2.0.1+0.armv6l-linux-musleabihf.tar.gz/sha512/788bb5aa6d004aad840f17fd8fb19836d7a28f7af2a03162124ddc38e6812bfa1040b41e29e0005fc846c7d779bc75bbd74fae38d870d64649aa57f6ec051254 -LibUV.v2.0.1+0.armv7l-linux-gnueabihf.tar.gz/md5/f57e48729e1158e1042b4d546990e13f -LibUV.v2.0.1+0.armv7l-linux-gnueabihf.tar.gz/sha512/a128df2b98525a08fd4d20450f6bca4e420c7e64d4fca648343f2e1ff1df98d27078beab0dab155555a928789d38644edfc1c289a7ba035f0379e0fcc146955a -LibUV.v2.0.1+0.armv7l-linux-musleabihf.tar.gz/md5/73ea74af9ae2bfbb584eca62d216da84 -LibUV.v2.0.1+0.armv7l-linux-musleabihf.tar.gz/sha512/0c45f7084aab895ead1e7d0652ae4ad3ecfa17e2c3e099b68b79c8fbd84faa968e150eadde5755e2151d31c6ca438a3cbb8ecdfcbd19bdda8ba682ab43009e46 -LibUV.v2.0.1+0.i686-linux-gnu.tar.gz/md5/2fe72527fbb2be470d0f649aa95b79b2 -LibUV.v2.0.1+0.i686-linux-gnu.tar.gz/sha512/aaff6e8b8b74eaaf5549e315652bea64e889a4f1638659e9b0278dab0736c5182f33efd95e35c580d0f6d2c12b24603d34e252e7a56f9837b54d99ae4d9dd449 -LibUV.v2.0.1+0.i686-linux-musl.tar.gz/md5/3b4d5a037757e4c3d42d362442f5fdf8 -LibUV.v2.0.1+0.i686-linux-musl.tar.gz/sha512/2b82d3e9dc7500d5d79ed9df02937095d0ce8fa91c84917d3d260ab2bb43ba672b8e9c4aede500e6324e5ffa10ff4790d492f7b0944ba73dec7483d51510f171 -LibUV.v2.0.1+0.i686-w64-mingw32.tar.gz/md5/070e4f851fcd5a70353a946efe446432 -LibUV.v2.0.1+0.i686-w64-mingw32.tar.gz/sha512/2d50baeb8e51614fe0facd37fbddb26309f74f8f98a206dacc875d42ec440d1c37acc0e00ee8aa65a142ef44dbc0d5638fce34d3ba8afc121074c85a0d9f219e -LibUV.v2.0.1+0.powerpc64le-linux-gnu.tar.gz/md5/416534043a950871a126e7dc1aa23c6e -LibUV.v2.0.1+0.powerpc64le-linux-gnu.tar.gz/sha512/a6e575b0e81cb1d4119a7d656a9d599946ac1e22270f03c7509bef7e08b508819241013dbae1fe921f00b1946ee4a6e1dd5ac665fd769efce1159a1a3a074191 -LibUV.v2.0.1+0.x86_64-apple-darwin.tar.gz/md5/a48fdd06c1e19004992b14c5734180d4 -LibUV.v2.0.1+0.x86_64-apple-darwin.tar.gz/sha512/27838f38fbcb9cbaa93f7b70725f6838645b0bd6b703f89e6c89d03aab97c3686264781150150389f1a43423dd319ea7f676d059f0f01ab331ac17b249a382f0 -LibUV.v2.0.1+0.x86_64-linux-gnu.tar.gz/md5/d64ec8b44acc130982d504265e85cbec -LibUV.v2.0.1+0.x86_64-linux-gnu.tar.gz/sha512/208cfaa6b802486c2edea79ee46b65e61771e1564e8b5b3af9273e451ea9b15cb9e049ab1f61491005cb5974214db5c301e2a812ebcc8feab0937fa584ee484d -LibUV.v2.0.1+0.x86_64-linux-musl.tar.gz/md5/c537d11c8d39a3daa9b5de3e04583425 -LibUV.v2.0.1+0.x86_64-linux-musl.tar.gz/sha512/173dbefafd255692c54a5b1ee9b5ec83ee4fe117080c7a762000c16d2f57d2ed505a5f8cd8c52db3776ebc2f4917cb7b8daf947903b56174789232236935b7b9 -LibUV.v2.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/9265fad0472aeeef7f45a726fe36e909 -LibUV.v2.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/7cec6d52e8ba26d19d1d8dc0b4a562f9b73c8a3f221370bfdac99835966b099f816705cec165a82f571855ff43bba365a5a43fcdc395401028e6351f2d4f575f -LibUV.v2.0.1+0.x86_64-w64-mingw32.tar.gz/md5/cddb6b34ca9b0bd5069bdf65224ebc81 -LibUV.v2.0.1+0.x86_64-w64-mingw32.tar.gz/sha512/7cc5ea50cc5b354fe2567322f5aa3285c9732aebffea2f5f5127773d2ff76d4a91e299727b8eb04388281a134d02060b3f6f88822df2971ee998320198e636c3 -libuv-67d1dc2ca2289f25a23b016a0bc427d45301ec05.tar.gz/md5/d8f00ed63196676a3d4c07823ad5fff7 -libuv-67d1dc2ca2289f25a23b016a0bc427d45301ec05.tar.gz/sha512/3ae6e0f0f22da1082e7cd3623166cb917c0498ca0d26c23393508797c86211d12291698d7f326cfd743b04cbfdd41fe5edfc69d5f4af843b7cc17c74d3c537d2 +libuv-fb3e3364c33ae48c827f6b103e05c3f0e78b79a9.tar.gz/md5/dc93ae5119c8934f374570342ef036ed +libuv-fb3e3364c33ae48c827f6b103e05c3f0e78b79a9.tar.gz/sha512/29947c236aef8931be4767df1cd8404ee9b036ee107b31cbce6fad9a97743df57d068b15bc4bd00320b9b81cd879258a9ec9dc675853e424ccdb8d6bdd226240 +LibUV.v2.0.1+1.aarch64-apple-darwin.tar.gz/md5/4480493c7bd60252489fd41bc1a7c854 +LibUV.v2.0.1+1.aarch64-apple-darwin.tar.gz/sha512/ac3ce4ec5141cc8d0dea870eb3d28e0154606ffe88ff67f6ba37ded5f44179caad1afe4606d99a6e2b25f7f2eb099e4f2999bc94f4bbeb92f02b805d6d347c50 +LibUV.v2.0.1+1.aarch64-linux-gnu.tar.gz/md5/51cfcbb92235b1b1268c324797d5dacb +LibUV.v2.0.1+1.aarch64-linux-gnu.tar.gz/sha512/b9f7943267f72ced674e6c64217d215b7d9fb72e764f8d00bd6083582d541dfd455edc1c8328587f7ba9c2212e12ce2458efd7df731f79c7ac1a112d192e3dd6 +LibUV.v2.0.1+1.aarch64-linux-musl.tar.gz/md5/5131d367fc11b6c89ce0c28c4aa7c4a6 +LibUV.v2.0.1+1.aarch64-linux-musl.tar.gz/sha512/77220ba9dc843eedde99b72ca6127cdbef70f5871e889bf92a2688f7630b78d090e14129f78de9938110424ce381f10cebf0280310e36a4d6d266d98dda804d6 +LibUV.v2.0.1+1.armv6l-linux-gnueabihf.tar.gz/md5/358f194088c338da8f0755bbc675cbbf +LibUV.v2.0.1+1.armv6l-linux-gnueabihf.tar.gz/sha512/646839f954f046d09df4e2fe12fe919dd61228c87141386635a27ac5a350b652daa3882f30cacb2b57392f5aa0c8c859050ad243d03331ccf612516680d33af9 +LibUV.v2.0.1+1.armv6l-linux-musleabihf.tar.gz/md5/db57bac6e2c9eda420a1b184757f60dd +LibUV.v2.0.1+1.armv6l-linux-musleabihf.tar.gz/sha512/11ab91b1a6d55a1b12e9c13d6b889ad6c67e8f30f1034f6f473d234096df951d39a69acf2594008bc453ebfd486563feae82ebd376d0c69a782cef6cedd37276 +LibUV.v2.0.1+1.armv7l-linux-gnueabihf.tar.gz/md5/a224bae77a94b29fb37cad149eb9d0c7 +LibUV.v2.0.1+1.armv7l-linux-gnueabihf.tar.gz/sha512/d4d86720179de0c6730ac11148b886a9d02ad78c4115f96a68b843c35a317712164f96b6c006dbaa4bc0497edb1d0fb590246606aaba38765c4d43b83c5cb4b8 +LibUV.v2.0.1+1.armv7l-linux-musleabihf.tar.gz/md5/681da84e2784b9ac3728b253e4f759ab +LibUV.v2.0.1+1.armv7l-linux-musleabihf.tar.gz/sha512/e05b177c7222e6ff4016ae831746b59b9cacd39baf401e6120a289c199732aea825b929ed48d201e25cace7d355482dc5f762f862712964d271c2235998fce66 +LibUV.v2.0.1+1.i686-linux-gnu.tar.gz/md5/1fd7cd45f8b2c811f040e929274f5b4d +LibUV.v2.0.1+1.i686-linux-gnu.tar.gz/sha512/751b4b78d7c854c6eb603e1d189ade93fa8ffb6323fd3fdd0786ef643812948b15e5f20098a407c9dbd6aea0e7b7cf94b94db05f6d1dae91d49a658e86f687ee +LibUV.v2.0.1+1.i686-linux-musl.tar.gz/md5/2643defa72fc2d60f4dec91cf8e0b081 +LibUV.v2.0.1+1.i686-linux-musl.tar.gz/sha512/63312128ca7a82030ebe937ca7fa8d99bdc0da80595562b997f9e1112bf860618f42c08ef12015255f419b4c7be7ac589ce65086fd893721ef83b6f77213f174 +LibUV.v2.0.1+1.i686-w64-mingw32.tar.gz/md5/ae90363f1eefa30200968660835f511c +LibUV.v2.0.1+1.i686-w64-mingw32.tar.gz/sha512/7e9db60b573ba30e610a54910308f09beb8e7c2c23f80dfc47083b159ec00a980fbfb3133a6a8d9ac4138434162eb415edcc26b9fba5bbaf7a8bdc65948d6e23 +LibUV.v2.0.1+1.powerpc64le-linux-gnu.tar.gz/md5/8d14df7b5bb87eb60de9f0365ac5a364 +LibUV.v2.0.1+1.powerpc64le-linux-gnu.tar.gz/sha512/9be15974f0b156a1bc3716b1a691c5092f5ddb263d0c84810fb39fc02e1e6494f897c8a60e55c4a380b150b6bacddbe71d4bcd033daebd110b9aa11c8e7b4b20 +LibUV.v2.0.1+1.x86_64-apple-darwin.tar.gz/md5/c8bf8f3eb191869c5484858e747355a2 +LibUV.v2.0.1+1.x86_64-apple-darwin.tar.gz/sha512/c11e3f1cc90c8cd2ff52652e4742481b5298f40ec0faea4970aa056e15fd5c4941de05fb25d946dcb5f40b2ed59571c0a97ae41a5f774ecc1f35f2032493f7bf +LibUV.v2.0.1+1.x86_64-linux-gnu.tar.gz/md5/57c1d1ee013275529ef8b1a128985fb5 +LibUV.v2.0.1+1.x86_64-linux-gnu.tar.gz/sha512/af03f0b01cff52a79699576d45457fff302d2f479cef2bc9a21e4559069a297c00adef004917b97853175f457b01a1860f429dc77a70410a21d6c05fadc1bbe7 +LibUV.v2.0.1+1.x86_64-linux-musl.tar.gz/md5/6e783b6786cde5d141b2c8220d1fac00 +LibUV.v2.0.1+1.x86_64-linux-musl.tar.gz/sha512/bf1f54364553b1c7ad7aac4ed0f256c95ecd763bf2052696afabffbbe60d1464de55fa4e51a8ae5993fd24fdfa645c66786bb1b9a0d4d7e839489f5e70204aff +LibUV.v2.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/e9f4d0cddcb7a5e1a8a78bbf861e6948 +LibUV.v2.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/4028121b5a6cd47e38705af0eb5931599df7acabab761f124ea861a0061ac81fe2daa732a2a171a43bf66f0198a89bb46cad6c70580fd94f70a249b9c686fae5 +LibUV.v2.0.1+1.x86_64-w64-mingw32.tar.gz/md5/88e2cbb4e288f671c0ed9427374d721c +LibUV.v2.0.1+1.x86_64-w64-mingw32.tar.gz/sha512/93a7ccab47487ab66442ae446f9127f48699e6e5a8cf7b7c981f2ba139876fd232a7b7899d0b9cff783c91cab0b8d8c2509ae3f7489931962fe3359082c91a8d diff --git a/deps/libuv.version b/deps/libuv.version index f925e899eec51..339cba4441875 100644 --- a/deps/libuv.version +++ b/deps/libuv.version @@ -1,2 +1,2 @@ LIBUV_BRANCH=julia-uv2-1.39.0 -LIBUV_SHA1=67d1dc2ca2289f25a23b016a0bc427d45301ec05 +LIBUV_SHA1=fb3e3364c33ae48c827f6b103e05c3f0e78b79a9 diff --git a/stdlib/LibUV_jll/Project.toml b/stdlib/LibUV_jll/Project.toml index d6b0478dad03f..dab1026a14381 100644 --- a/stdlib/LibUV_jll/Project.toml +++ b/stdlib/LibUV_jll/Project.toml @@ -1,6 +1,6 @@ name = "LibUV_jll" uuid = "183b4373-6708-53ba-ad28-60e28bb38547" -version = "2.0.1+0" +version = "2.0.1+1" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 31eb6c20cb4c54ab494d4cfae60aabba28fe9911 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Wed, 30 Dec 2020 19:03:27 +0100 Subject: [PATCH 006/239] Avoid StepRangeLen eltype widening (#38979) --- base/range.jl | 2 +- test/ranges.jl | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 33e2270a19153..b275e95c7c266 100644 --- a/base/range.jl +++ b/base/range.jl @@ -364,7 +364,7 @@ struct StepRangeLen{T,R,S} <: AbstractRange{T} end StepRangeLen(ref::R, step::S, len::Integer, offset::Integer = 1) where {R,S} = - StepRangeLen{typeof(ref+0*step),R,S}(ref, step, len, offset) + StepRangeLen{typeof(ref+zero(step)),R,S}(ref, step, len, offset) StepRangeLen{T}(ref::R, step::S, len::Integer, offset::Integer = 1) where {T,R,S} = StepRangeLen{T,R,S}(ref, step, len, offset) diff --git a/test/ranges.jl b/test/ranges.jl index d28e55b581792..6fcfc18b50529 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1721,4 +1721,12 @@ end @test isempty(range(typemin(Int), step=-1//1, length=0)) @test eltype(range(typemin(Int), step=-1//1, length=0)) === Rational{Int} @test typeof(step(range(typemin(Int), step=-1//1, length=0))) === Rational{Int} + + @test StepRangeLen(Int8(1), Int8(2), 3) == Int8[1, 3, 5] + @test eltype(StepRangeLen(Int8(1), Int8(2), 3)) === Int8 + @test typeof(step(StepRangeLen(Int8(1), Int8(2), 3))) === Int8 + + @test StepRangeLen(Int8(1), Int8(2), 3, 2) == Int8[-1, 1, 3] + @test eltype(StepRangeLen(Int8(1), Int8(2), 3, 2)) === Int8 + @test typeof(step(StepRangeLen(Int8(1), Int8(2), 3, 2))) === Int8 end From 3d922e44ad868a9f39a10d47b55e3325e5422743 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Wed, 30 Dec 2020 20:00:17 +0100 Subject: [PATCH 007/239] specialize on mapfoldl(::Type, ...) (#39019) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: ```julia julia> using BenchmarkTools julia> b = rand(Bool, 10000); julia> @btime mapfoldl(Int, +, b; init=0) 1.136 ms (9025 allocations: 141.02 KiB) 5057 ``` After: ```julia julia> @btime mapfoldl(Int, +, b; init=0) 1.094 μs (1 allocation: 16 bytes) 5057 ``` --- base/reduce.jl | 2 ++ test/reduce.jl | 3 +++ 2 files changed, 5 insertions(+) diff --git a/base/reduce.jl b/base/reduce.jl index 5b9b004d2af29..185a158893daa 100644 --- a/base/reduce.jl +++ b/base/reduce.jl @@ -88,6 +88,8 @@ Create a mapping reducing function `rf′(acc, x) = rf(acc, f(x))`. struct MappingRF{F, T} f::F rf::T + MappingRF(f::F, rf::T) where {F,T} = new{F,T}(f, rf) + MappingRF(::Type{f}, rf::T) where {f,T} = new{Type{f},T}(f, rf) end @inline (op::MappingRF)(acc, x) = op.rf(acc, op.f(x)) diff --git a/test/reduce.jl b/test/reduce.jl index 6cbe01a5de1cf..0876b30008f84 100644 --- a/test/reduce.jl +++ b/test/reduce.jl @@ -640,3 +640,6 @@ x = [j+7 for j in i] Iterators.flatten((1:2, 3:4)), ) == (1, 4) end + +# make sure we specialize on mapfoldl(::Type, ...) +@test @inferred(mapfoldl(Int, +, [1, 2, 3]; init=0)) === 6 From 144f7817184bb4a6e96642c22fcc63f308f5e939 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 30 Dec 2020 22:24:12 +0000 Subject: [PATCH 008/239] [loader/libjulia]: Call `setup_stdio()` when loading `libjulia` This allows libjulia's initialization routines to properly output to `stdout` in embedding scenarios. --- cli/loader_lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/loader_lib.c b/cli/loader_lib.c index dffc30405f513..f253ce5e04cc6 100644 --- a/cli/loader_lib.c +++ b/cli/loader_lib.c @@ -196,6 +196,8 @@ JL_DLLEXPORT int jl_load_repl(int argc, char * argv[]) { #ifdef _OS_WINDOWS_ int __stdcall DllMainCRTStartup(void* instance, unsigned reason, void* reserved) { + setup_stdio(); + // Because we override DllMainCRTStartup, we have to manually call our constructor methods jl_load_libjulia_internal(); return 1; From b26a386e659097a50e964755a2e73465a33cb477 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 30 Dec 2020 22:25:32 +0000 Subject: [PATCH 009/239] [cli/trampolines] Fix section directive for windows trampolines By naming the section `text` instead of `.text` these sections were mapped into memory without the executable bit set, causing segfaults when attempting to use any trampolines on Windows. --- cli/trampolines/trampolines_x86_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/trampolines/trampolines_x86_64.S b/cli/trampolines/trampolines_x86_64.S index afcb452eefcd3..f80b4bb478c97 100644 --- a/cli/trampolines/trampolines_x86_64.S +++ b/cli/trampolines/trampolines_x86_64.S @@ -14,7 +14,7 @@ .endef #define EXPORT(name) .section .drectve,"r"; \ .ascii " -export:"#name""; \ - .section text + .section .text #define SEH_START1(name) .seh_proc name #define SEH_START2() .seh_endprologue #define SEH_END() .seh_endproc From 8981e0b30b48c69373c5e93c970c41a64c549356 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 30 Dec 2020 22:27:00 +0000 Subject: [PATCH 010/239] [cli/loader]: Don't allow initialization to run more than once There are multiple ways of fixing this, but let's just not let trampolines get re-set after they've already been set. --- cli/loader_lib.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/loader_lib.c b/cli/loader_lib.c index f253ce5e04cc6..0249c11f3f6c3 100644 --- a/cli/loader_lib.c +++ b/cli/loader_lib.c @@ -130,6 +130,11 @@ JL_DLLEXPORT const char * jl_get_libdir() void * libjulia_internal = NULL; __attribute__((constructor)) void jl_load_libjulia_internal(void) { + // Only initalize this once + if (libjulia_internal != NULL) { + return; + } + // Introspect to find our own path const char * lib_dir = jl_get_libdir(); From ed9dde2bbdb04a5667904a182b3275ff57077d96 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Wed, 30 Dec 2020 22:48:21 -0500 Subject: [PATCH 011/239] Test for checkout_head (#39034) * Test for checkout_head * Remember to actually close the file * And actually force the checkout --- stdlib/LibGit2/test/libgit2.jl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 2bf4182841874..736d1459293c9 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -1726,6 +1726,19 @@ mktempdir() do dir end end + @testset "checkout_head" begin + LibGit2.with(LibGit2.GitRepo(cache_repo)) do repo + # modify file + repo_file = open(joinpath(cache_repo,test_file), "a") + println(repo_file, commit_msg1 * randstring(10)) + close(repo_file) + # and checkout HEAD once more + LibGit2.checkout_head(repo, options=LibGit2.CheckoutOptions(checkout_strategy=LibGit2.Consts.CHECKOUT_FORCE)) + @test LibGit2.headname(repo) == master_branch + @test !LibGit2.isdirty(repo) + end + end + @testset "checkout/headname" begin LibGit2.with(LibGit2.GitRepo(cache_repo)) do repo LibGit2.checkout!(repo, string(commit_oid1)) @@ -1734,7 +1747,6 @@ mktempdir() do dir end end - if Sys.isunix() @testset "checkout/proptest" begin LibGit2.with(LibGit2.GitRepo(test_repo)) do repo From b00e9f0bac05de913d5b869739bcc93ac259c9f7 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 31 Dec 2020 01:59:47 -0500 Subject: [PATCH 012/239] Improve copyto! for short heterogeneous tuples (#39035) There was a complaint on Twitter [1], that Julia is slower than Ruby(!) at allocating short heterogeneous arrays. The code looks something like this: ``` f() = for i in 1:100000; b=[1,2.0]; end; ``` Of course, this benchmark is silly because the arrays are unused, so the entire code should be dropped once we have further improvements to our lifetime analysis, which will change the runtime 0. However, since we're not quite able to do that yet, it is somewhat unexpected that we should be slower than Ruby here. Admittedly our arrays are tuned for larger sizes, but still. Upon further investigation, it turns out that the issue is that we're allocating extra boxed objects when pulling the fields out of the literal, since we don't have any specialization for `copyto!` from tuples, falling back to the generic `copyto!` method, which is type unstable in the presence of heterogeneous tuples. Since this code is reachable from surface syntax, I think it's worth putting in a couple of specializations to accelerate the array construction, which is what this PR does (up to tuples of length 10 to avoid excessive codegen). Since the type-instability issue applies whether the value is used or not, this should still be useful even if we're able to prove that the allocations can be dropped entirely. Before: ``` julia> @benchmark f() BenchmarkTools.Trial: memory estimate: 21.36 MiB allocs estimate: 600000 -------------- minimum time: 14.928 ms (0.00% GC) median time: 16.297 ms (0.00% GC) mean time: 16.323 ms (3.84% GC) maximum time: 26.042 ms (0.00% GC) -------------- samples: 307 evals/sample: 1 ``` After: ``` julia> @benchmark f() BenchmarkTools.Trial: memory estimate: 9.16 MiB allocs estimate: 100000 -------------- minimum time: 2.117 ms (0.00% GC) median time: 2.276 ms (0.00% GC) mean time: 2.455 ms (7.62% GC) maximum time: 4.638 ms (28.99% GC) -------------- samples: 2036 evals/sample: 1 ``` Which puts us about on par with Ruby on my machine (not entirely unsurprising, since this is essentially an allocation benchmark at this point and both allocators are written in C). --- base/abstractarray.jl | 6 ++++-- base/ntuple.jl | 44 +++++++++++++++++++++++++++++++++++++++++++ test/abstractarray.jl | 10 ++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index bb697ca11bc14..327815fde932c 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -831,12 +831,14 @@ end ## from general iterable to any array +@noinline throw_dest_too_short() = + throw(ArgumentError("destination has fewer elements than required")) + function copyto!(dest::AbstractArray, src) destiter = eachindex(dest) y = iterate(destiter) for x in src - y === nothing && - throw(ArgumentError("destination has fewer elements than required")) + y === nothing && throw_dest_too_short() dest[y[1]] = x y = iterate(destiter, y[2]) end diff --git a/base/ntuple.jl b/base/ntuple.jl index a5608dfa927c3..b6874f3fbe6d5 100644 --- a/base/ntuple.jl +++ b/base/ntuple.jl @@ -91,3 +91,47 @@ end (t..., fill(val, N-M)...) end end + +# Specializations for copyto! of various `NTuple`s +function check_inds_compatible(dest::AbstractArray, src::Tuple) + length(dest) >= length(src) || throw_dest_too_short() +end + +function _copyto_generated!(dest::AbstractArray, src::NTuple{N, Any}) where N + if @generated + ret = quote + check_inds_compatible(dest, src) + idxs = eachindex(dest) + end + state = () + for n in 1:N + append!(ret.args, (quote + ind, state = iterate(idxs, $(state...)) + @inbounds dest[ind] = src[$n] + end).args) + state = (:state,) + end + push!(ret.args, :(return dest)) + ret + else + length(src) == 0 && return dest + return copyto!(dest, firstindex(dest), src, firstindex(src)) + end +end + +# Non-homogeneous tuples +function copyto!(dest::AbstractArray, src::Tuple) + if length(src) < 10 + # Manual optimization for short tuples + # TODO: Better support for homogeneous tuple tails + return _copyto_generated!(dest, src) + else + return copyto!(dest, firstindex(dest), src, firstindex(src)) + end +end + +# Specialization for homogeneous tuples +function copyto!(dest::AbstractArray, src::Tuple{Vararg{T}} where T) + length(src) == 0 && return dest + copyto!(dest, firstindex(dest), src, firstindex(src)) +end diff --git a/test/abstractarray.jl b/test/abstractarray.jl index c03cb25ffb105..958e62e1ecdc1 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1258,3 +1258,13 @@ Base.pushfirst!(tpa::TestPushArray{T}, a::T) where T = pushfirst!(tpa.data, a) pushfirst!(tpa, 6, 5, 4, 3, 2) @test tpa.data == reverse(collect(1:6)) end + +@testset "copyto! with tuple" begin + randtype(n) = rand(Bool) ? 1.0 : 2 + @test copyto!(fill(0.0, 100), ntuple(randtype, 100))[end] != 0.0 + @test copyto!(fill(0.0, 100), ntuple(x->1.0, 100))[end] != 0.0 + @test copyto!(fill(0.0, 100), ntuple(randtype, 50))[end] == 0.0 + @test_throws BoundsError copyto!(fill(0.0, 50), ntuple(randtype, 100)) + @test_throws BoundsError copyto!(fill(0.0, 50), ntuple(x->1.0, 100)) + @test_throws ArgumentError copyto!(fill(0.0, 5), ntuple(randtype, 7)) +end From 82d79ce18f88923c14d322b70699da43a72e6b32 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 31 Dec 2020 02:00:17 -0500 Subject: [PATCH 013/239] Add `ismutabletype` (#39037) Determines whether a type was declared using `mutable struct`. Naming follows from the `ismutable` query we already have, analogous to `isbits`/`isbitstype`. Replaces #18168. --- base/exports.jl | 1 + base/reflection.jl | 17 +++++++++++++++++ test/reflection.jl | 3 +++ 3 files changed, 21 insertions(+) diff --git a/base/exports.jl b/base/exports.jl index 702c1bf485c3b..440b28fb155b2 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -656,6 +656,7 @@ export isbits, isequal, ismutable, + ismutabletype, isless, isunordered, ifelse, diff --git a/base/reflection.jl b/base/reflection.jl index 9558731a277d1..d13601ff6d16a 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -460,6 +460,23 @@ true """ ismutable(@nospecialize(x)) = (@_pure_meta; typeof(x).mutable) + +""" + ismutabletype(T) -> Bool + +Determine whether type `T` was declared as a mutable type +(i.e. using `mutable struct` keyword). + +!!! compat "Julia 1.7" + This function requires at least Julia 1.7. +""" +function ismutabletype(@nospecialize(t::Type)) + t = unwrap_unionall(t) + # TODO: what to do for `Union`? + return isa(t, DataType) && t.mutable +end + + """ isstructtype(T) -> Bool diff --git a/test/reflection.jl b/test/reflection.jl index ea54b833aeef0..63101796804bb 100644 --- a/test/reflection.jl +++ b/test/reflection.jl @@ -113,6 +113,9 @@ not_const = 1 @test ismutable(1) == false @test ismutable([]) == true +@test ismutabletype(Int) == false +@test ismutabletype(Vector{Any}) == true +@test ismutabletype(Union{Int, Vector{Any}}) == false ## find bindings tests @test ccall(:jl_get_module_of_binding, Any, (Any, Any), Base, :sin)==Base From 5ee2d601edcf2dcdd467041ba9f08c43bf23e1a3 Mon Sep 17 00:00:00 2001 From: Shikhar Goswami <44720861+shikhargoswami@users.noreply.github.com> Date: Fri, 1 Jan 2021 16:18:37 +0530 Subject: [PATCH 014/239] Written tests for typemin/typemax (#39057) * Written tests for typemin/typemax * Added test w.r.t Int128 --- test/int.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/int.jl b/test/int.jl index 160e42d04e6d9..f0e157711c808 100644 --- a/test/int.jl +++ b/test/int.jl @@ -395,3 +395,27 @@ end @test bitreverse(Int64(456618293)) === Int64(-6012608040035942400) @test bitreverse(Int32(456618293)) === Int32(-1399919400) end + +@testset "min/max of datatype" begin + @test typemin(Int8) == Int8(-128) + @test typemin(UInt8) == UInt8(0) + @test typemin(Int16) == Int16(-32768) + @test typemin(UInt16) == UInt16(0) + @test typemin(Int32) == Int32(-2147483648) + @test typemin(UInt32) == UInt32(0) + @test typemin(Int64) == Int64(-9223372036854775808) + @test typemin(UInt64) == UInt64(0) + @test typemin(Int128) == Int128(-170141183460469231731687303715884105728) + @test typemin(UInt128) == UInt128(0) + + @test typemax(Int8) == Int8(127) + @test typemax(UInt8) == UInt8(255) + @test typemax(Int16) == Int16(32767) + @test typemax(UInt16) == UInt16(65535) + @test typemax(Int32) == Int32(2147483647) + @test typemax(UInt32) == UInt32(4294967295) + @test typemax(Int64) == Int64(9223372036854775807) + @test typemax(UInt64) == UInt64(0xffffffffffffffff) + @test typemax(Int128) == Int128(170141183460469231731687303715884105727) + @test typemax(UInt128) == UInt128(0xffffffffffffffffffffffffffffffff) +end From 628b7acbb51da9886d7c1d33fd96b32a5316b37d Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Sun, 3 Jan 2021 12:58:15 +0900 Subject: [PATCH 015/239] minor typing improvements for `(frame::InferenceState).stmt_edges` --- base/compiler/inferencestate.jl | 20 +++++++++++--------- base/compiler/typeinfer.jl | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/base/compiler/inferencestate.jl b/base/compiler/inferencestate.jl index de41849c2323c..d1733d7d743ad 100644 --- a/base/compiler/inferencestate.jl +++ b/base/compiler/inferencestate.jl @@ -17,7 +17,7 @@ mutable struct InferenceState valid_worlds::WorldRange nargs::Int stmt_types::Vector{Any} - stmt_edges::Vector{Any} + stmt_edges::Vector{Union{Nothing, Vector{Any}}} stmt_info::Vector{Any} # return type bestguess #::Type @@ -66,7 +66,7 @@ mutable struct InferenceState stmt_info = Any[ nothing for i = 1:length(code) ] n = length(code) - s_edges = Any[ nothing for i = 1:n ] + s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ] s_types = Any[ nothing for i = 1:n ] # initial types @@ -245,21 +245,23 @@ end # temporarily accumulate our edges to later add as backedges in the callee function add_backedge!(li::MethodInstance, caller::InferenceState) isa(caller.linfo.def, Method) || return # don't add backedges to toplevel exprs - if caller.stmt_edges[caller.currpc] === nothing - caller.stmt_edges[caller.currpc] = [] + edges = caller.stmt_edges[caller.currpc] + if edges === nothing + edges = caller.stmt_edges[caller.currpc] = [] end - push!(caller.stmt_edges[caller.currpc], li) + push!(edges, li) nothing end # used to temporarily accumulate our no method errors to later add as backedges in the callee method table function add_mt_backedge!(mt::Core.MethodTable, @nospecialize(typ), caller::InferenceState) isa(caller.linfo.def, Method) || return # don't add backedges to toplevel exprs - if caller.stmt_edges[caller.currpc] === nothing - caller.stmt_edges[caller.currpc] = [] + edges = caller.stmt_edges[caller.currpc] + if edges === nothing + edges = caller.stmt_edges[caller.currpc] = [] end - push!(caller.stmt_edges[caller.currpc], mt) - push!(caller.stmt_edges[caller.currpc], typ) + push!(edges, mt) + push!(edges, typ) nothing end diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 1162d05721944..243c1ab410ccd 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -432,7 +432,7 @@ function store_backedges(frame::InferenceResult, edges::Vector{Any}) nothing end -function store_backedges(caller::MethodInstance, edges::Vector) +function store_backedges(caller::MethodInstance, edges::Vector{Any}) i = 1 while i <= length(edges) to = edges[i] From 8d643a29ed3c3f8a3aab073b611344dc9d5a1c9e Mon Sep 17 00:00:00 2001 From: Stefano Sgorlon Date: Mon, 4 Jan 2021 04:44:08 +0000 Subject: [PATCH 016/239] LICENSE: copyright end date 2019 -> 2021 (#39084) --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index d1438a5f68bfc..e2b9c6606b1fd 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -3,7 +3,7 @@ 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. -> Copyright (c) 2009-2019: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, +> Copyright (c) 2009-2021: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, > and other contributors: > > https://github.com/JuliaLang/julia/contributors From 974e6ecc56d2502706e71bfed094f208d7f960b9 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Mon, 4 Jan 2021 17:32:19 +0000 Subject: [PATCH 017/239] Remove outdated TODO about string encodings (#39077) --- base/regex.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/base/regex.jl b/base/regex.jl index d03938f3177ad..3b954c53fd7ab 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -141,9 +141,6 @@ end """ abstract type AbstractMatch end -# TODO: map offsets into strings in other encodings back to original indices. -# or maybe it's better to just fail since that would be quite slow - struct RegexMatch <: AbstractMatch match::SubString{String} captures::Vector{Union{Nothing,SubString{String}}} From 1dc380411545627d7e8af51b87d1bafaceade194 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 4 Jan 2021 13:21:04 -0500 Subject: [PATCH 018/239] Small drive-by cleanup: Make constant explicit (#39056) This code is a bit of a leftover from when we still had `nfields(::Type)`, but at this point it was always just returning the number of fields of `DataType`. I was a bit confused by this code, so I thought just using `jl_datatype_t` here explicitly makes clear that it does actually just return said constant. --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 144c3d8636e95..83fcf690215f7 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3068,7 +3068,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, else if (jl_is_type_type(obj.typ)) { jl_value_t *tp0 = jl_tparam0(obj.typ); if (jl_is_datatype(tp0) && jl_is_datatype_singleton((jl_datatype_t*)tp0)) - nf = jl_datatype_nfields(jl_typeof(tp0)); + nf = jl_datatype_nfields((jl_value_t*)jl_datatype_type); } else if (jl_is_concrete_type(obj.typ)) { nf = jl_datatype_nfields(obj.typ); From e2f40737c5b3456f04519ba78a8114f878811717 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 4 Jan 2021 19:44:04 +0000 Subject: [PATCH 019/239] Fixes for non-Int based lengths (#37741) --- base/abstractarray.jl | 23 +++++++------- base/arrayshow.jl | 12 ++++--- base/range.jl | 3 ++ base/reshapedarray.jl | 4 +-- base/subarray.jl | 6 ++-- test/abstractarray.jl | 5 +++ test/subarray.jl | 14 ++++++++ test/testhelpers/InfiniteArrays.jl | 51 ++++++++++++++++++++++++++++++ 8 files changed, 97 insertions(+), 21 deletions(-) create mode 100644 test/testhelpers/InfiniteArrays.jl diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 327815fde932c..9c88f1f96cc87 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -86,7 +86,7 @@ julia> axes(A) """ function axes(A) @_inline_meta - map(OneTo, size(A)) + map(oneto, size(A)) end """ @@ -107,10 +107,10 @@ require_one_based_indexing(A...) = !has_offset_axes(A...) || throw(ArgumentError # in other applications. axes1(A::AbstractArray{<:Any,0}) = OneTo(1) axes1(A::AbstractArray) = (@_inline_meta; axes(A)[1]) -axes1(iter) = OneTo(length(iter)) +axes1(iter) = oneto(length(iter)) unsafe_indices(A) = axes(A) -unsafe_indices(r::AbstractRange) = (OneTo(unsafe_length(r)),) # Ranges use checked_sub for size +unsafe_indices(r::AbstractRange) = (oneto(unsafe_length(r)),) # Ranges use checked_sub for size keys(a::AbstractArray) = CartesianIndices(axes(a)) keys(a::AbstractVector) = LinearIndices(a) @@ -308,7 +308,7 @@ function eachindex(A::AbstractArray, B::AbstractArray...) @_inline_meta eachindex(IndexStyle(A,B...), A, B...) end -eachindex(::IndexLinear, A::AbstractArray) = (@_inline_meta; OneTo(length(A))) +eachindex(::IndexLinear, A::AbstractArray) = (@_inline_meta; oneto(length(A))) eachindex(::IndexLinear, A::AbstractVector) = (@_inline_meta; axes1(A)) function eachindex(::IndexLinear, A::AbstractArray, B::AbstractArray...) @_inline_meta @@ -1483,12 +1483,11 @@ vcat(V::AbstractVector{T}...) where {T} = typed_vcat(T, V...) # but that solution currently fails (see #27188 and #27224) AbstractVecOrTuple{T} = Union{AbstractVector{<:T}, Tuple{Vararg{T}}} -function _typed_vcat(::Type{T}, V::AbstractVecOrTuple{AbstractVector}) where T - n = 0 - for Vk in V - n += Int(length(Vk))::Int - end - a = similar(V[1], T, n) +_typed_vcat_similar(V, T, n) = similar(V[1], T, n) +_typed_vcat(::Type{T}, V::AbstractVecOrTuple{AbstractVector}) where T = + _typed_vcat!(_typed_vcat_similar(V, T, mapreduce(length, +, V)), V) + +function _typed_vcat!(a::AbstractVector{T}, V::AbstractVecOrTuple{AbstractVector}) where T pos = 1 for k=1:Int(length(V))::Int Vk = V[k] @@ -1634,7 +1633,7 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) @inline cat_t(::Type{T}, X...; dims) where {T} = _cat_t(dims, T, X...) @inline function _cat_t(dims, ::Type{T}, X...) where {T} catdims = dims2cat(dims) - shape = cat_shape(catdims, map(cat_size, X)::Tuple{Vararg{Union{Int,Dims}}})::Dims + shape = cat_shape(catdims, map(cat_size, X)) A = cat_similar(X[1], T, shape) if count(!iszero, catdims)::Int > 1 fill!(A, zero(T)) @@ -1642,7 +1641,7 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) return __cat(A, shape, catdims, X...) end -function __cat(A, shape::NTuple{M,Int}, catdims, X...) where M +function __cat(A, shape::NTuple{M}, catdims, X...) where M N = M::Int offsets = zeros(Int, N) inds = Vector{UnitRange{Int}}(undef, N) diff --git a/base/arrayshow.jl b/base/arrayshow.jl index f355d9e2dd8b4..37adaf13f669e 100644 --- a/base/arrayshow.jl +++ b/base/arrayshow.jl @@ -58,9 +58,9 @@ Alignment is reported as a vector of (left,right) tuples, one for each column going across the screen. """ function alignment(io::IO, X::AbstractVecOrMat, - rows::AbstractVector, cols::AbstractVector, - cols_if_complete::Integer, cols_otherwise::Integer, sep::Integer) - a = Tuple{Int, Int}[] + rows::AbstractVector{T}, cols::AbstractVector{V}, + cols_if_complete::Integer, cols_otherwise::Integer, sep::Integer) where {T,V} + a = Tuple{T, V}[] for j in cols # need to go down each column one at a time l = r = 0 for i in rows # plumb down and see what largest element sizes are @@ -166,6 +166,11 @@ function print_matrix(io::IO, @nospecialize(X::AbstractVecOrMat), vdots::AbstractString = "\u22ee", ddots::AbstractString = " \u22f1 ", hmod::Integer = 5, vmod::Integer = 5) + # use invokelatest to avoid backtracing in type invalidation, ref #37741 + invokelatest(_print_matrix, io, X, pre, sep, post, hdots, vdots, ddots, hmod, vmod, unitrange(axes(X,1)), unitrange(axes(X,2))) +end + +function _print_matrix(io, @nospecialize(X::AbstractVecOrMat), pre, sep, post, hdots, vdots, ddots, hmod, vmod, rowsA, colsA) hmod, vmod = Int(hmod)::Int, Int(vmod)::Int if !(get(io, :limit, false)::Bool) screenheight = screenwidth = typemax(Int) @@ -178,7 +183,6 @@ function print_matrix(io::IO, @nospecialize(X::AbstractVecOrMat), postsp = "" @assert textwidth(hdots) == textwidth(ddots) sepsize = length(sep)::Int - rowsA, colsA = UnitRange{Int}(axes(X,1)), UnitRange{Int}(axes(X,2)) m, n = length(rowsA), length(colsA) # To figure out alignments, only need to look at as many rows as could # fit down screen. If screen has at least as many rows as A, look at A. diff --git a/base/range.jl b/base/range.jl index b275e95c7c266..63f4c1aed02e2 100644 --- a/base/range.jl +++ b/base/range.jl @@ -295,6 +295,8 @@ unitrange_last(start::T, stop::T) where {T} = ifelse(stop >= start, convert(T,start+floor(stop-start)), convert(T,start-oneunit(stop-start))) +unitrange(x) = UnitRange(x) + if isdefined(Main, :Base) # Constant-fold-able indexing into tuples to functionally expose Base.tail and Base.front function getindex(@nospecialize(t::Tuple), r::UnitRange) @@ -332,6 +334,7 @@ struct OneTo{T<:Integer} <: AbstractUnitRange{T} end OneTo(stop::T) where {T<:Integer} = OneTo{T}(stop) OneTo(r::AbstractRange{T}) where {T<:Integer} = OneTo{T}(r) +oneto(r) = OneTo(r) ## Step ranges parameterized by length diff --git a/base/reshapedarray.jl b/base/reshapedarray.jl index 3534049a7a10b..d9a9f4eafaa80 100644 --- a/base/reshapedarray.jl +++ b/base/reshapedarray.jl @@ -153,7 +153,7 @@ rdims(out::Tuple{}, inds::NTuple{M,Any}) where {M} = () rdims(out::Tuple{Any}, inds::Tuple{}) = out # N == 1, M == 0 rdims(out::NTuple{N,Any}, inds::Tuple{}) where {N} = out # N > 1, M == 0 rdims(out::Tuple{Any}, inds::Tuple{Any}) = inds # N == 1, M == 1 -rdims(out::Tuple{Any}, inds::NTuple{M,Any}) where {M} = (OneTo(rdims_trailing(inds...)),) # N == 1, M > 1 +rdims(out::Tuple{Any}, inds::NTuple{M,Any}) where {M} = (oneto(rdims_trailing(inds...)),) # N == 1, M > 1 rdims(out::NTuple{N,Any}, inds::NTuple{N,Any}) where {N} = inds # N > 1, M == N rdims(out::NTuple{N,Any}, inds::NTuple{M,Any}) where {N,M} = (first(inds), rdims(tail(out), tail(inds))...) # N > 1, M > 1, M != N @@ -207,7 +207,7 @@ size(A::ReshapedArray) = A.dims similar(A::ReshapedArray, eltype::Type, dims::Dims) = similar(parent(A), eltype, dims) IndexStyle(::Type{<:ReshapedArrayLF}) = IndexLinear() parent(A::ReshapedArray) = A.parent -parentindices(A::ReshapedArray) = map(OneTo, size(parent(A))) +parentindices(A::ReshapedArray) = map(oneto, size(parent(A))) reinterpret(::Type{T}, A::ReshapedArray, dims::Dims) where {T} = reinterpret(T, parent(A), dims) elsize(::Type{<:ReshapedArray{<:Any,<:Any,P}}) where {P} = elsize(P) diff --git a/base/subarray.jl b/base/subarray.jl index 3b232d896d3c0..d1207ec094037 100644 --- a/base/subarray.jl +++ b/base/subarray.jl @@ -60,7 +60,7 @@ viewindexing(I::Tuple{Vararg{Any}}) = IndexCartesian() viewindexing(I::Tuple{AbstractArray, Vararg{Any}}) = IndexCartesian() # Simple utilities -size(V::SubArray) = (@_inline_meta; map(n->Int(unsafe_length(n)), axes(V))) +size(V::SubArray) = (@_inline_meta; map(unsafe_length, axes(V))) similar(V::SubArray, T::Type, dims::Dims) = similar(V.parent, T, dims) @@ -90,7 +90,7 @@ julia> parentindices(V) (1, Base.Slice(Base.OneTo(2))) ``` """ -parentindices(a::AbstractArray) = map(OneTo, size(a)) +parentindices(a::AbstractArray) = map(oneto, size(a)) ## Aliasing detection dataids(A::SubArray) = (dataids(A.parent)..., _splatmap(dataids, A.indices)...) @@ -107,7 +107,7 @@ function unaliascopy(V::SubArray{T,N,A,I,LD}) where {T,N,A<:Array,I<:Tuple{Varar end # Transform indices to be "dense" _trimmedindex(i::Real) = oftype(i, 1) -_trimmedindex(i::AbstractUnitRange) = oftype(i, OneTo(length(i))) +_trimmedindex(i::AbstractUnitRange) = oftype(i, oneto(length(i))) _trimmedindex(i::AbstractArray) = oftype(i, reshape(eachindex(IndexLinear(), i), axes(i))) ## SubArray creation diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 958e62e1ecdc1..6d052bfb9a2ae 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1234,6 +1234,11 @@ end @test Base.rest(a, st) == [3, 2, 4] end +@testset "issue #37741, non-int cat" begin + @test [1; 1:BigInt(5)] == [1; 1:5] + @test [1:BigInt(5); 1] == [1:5; 1] +end + @testset "Base.isstored" begin a = rand(3, 4, 5) @test Base.isstored(a, 1, 2, 3) diff --git a/test/subarray.jl b/test/subarray.jl index 4fd189e2ae441..985b481438c5b 100644 --- a/test/subarray.jl +++ b/test/subarray.jl @@ -698,3 +698,17 @@ import InteractiveUtils @test M*v == copy(M)*v @test (InteractiveUtils.@which M*v) == (InteractiveUtils.@which copy(M)*v) end + + +isdefined(Main, :InfiniteArrays) || @eval Main include("testhelpers/InfiniteArrays.jl") +using .Main.InfiniteArrays, Base64 + +@testset "PR #37741: non-Int sizes" begin + r = BigInt(1):BigInt(100_000_000)^100 + v = SubArray(r, (r,)) + @test size(v) == (last(r),) + + v = SubArray(OneToInf(), (OneToInf(),)) + @test size(v) == (Infinity(),) + @test stringmime("text/plain", v; context=(:limit => true)) == "$(Infinity())-element view(::$(OneToInf{Int}), 1:1:$(Infinity())) with eltype $Int with indices 1:1:$(Infinity()):\n 1\n 2\n 3\n 4\n 5\n 6\n 7\n 8\n 9\n 10\n ⋮" +end diff --git a/test/testhelpers/InfiniteArrays.jl b/test/testhelpers/InfiniteArrays.jl new file mode 100644 index 0000000000000..bc6de1afc5503 --- /dev/null +++ b/test/testhelpers/InfiniteArrays.jl @@ -0,0 +1,51 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +# InfiniteArrays (arrays with infinite size) + +# This test file is designed to exercise support for generic sizing, +# even though infinite arrays aren't implemented in Base. + +module InfiniteArrays + +export OneToInf, Infinity + +""" + Infinity() + +represents infinite cardinality. Note that `Infinity <: Integer` to support +being treated as an index. +""" +struct Infinity <: Integer end + +Base.:(==)(::Infinity, ::Int) = false +Base.:(==)(::Int, ::Infinity) = false +Base.:(<)(::Int, ::Infinity) = true +Base.:(≤)(::Int, ::Infinity) = true +Base.:(≤)(::Infinity, ::Int) = false +Base.:(≤)(::Infinity, ::Infinity) = true +Base.:(-)(::Infinity, ::Int) = Infinity() +Base.:(+)(::Infinity, ::Int) = Infinity() +Base.:(:)(::Infinity, ::Infinity) = 1:0 + +""" + OneToInf(n) + +Define an `AbstractInfUnitRange` that behaves like `1:∞`, with the added +distinction that the limits are guaranteed (by the type system) to +be 1 and ∞. +""" +struct OneToInf{T<:Integer} <: AbstractUnitRange{T} end + +OneToInf() = OneToInf{Int}() + +Base.axes(r::OneToInf) = (r,) +Base.unsafe_indices(r::OneToInf) = (r,) +Base.unsafe_length(r::OneToInf) = Infinity() +Base.size(r::OneToInf) = (Infinity(),) +Base.first(r::OneToInf{T}) where {T} = oneunit(T) +Base.length(r::OneToInf{T}) where {T} = Infinity() +Base.last(r::OneToInf{T}) where {T} = Infinity() +Base.unitrange(r::OneToInf) = r +Base.oneto(::Infinity) = OneToInf() + +end \ No newline at end of file From 1a333a9b7719ffd0cf1d7063af1f63d25c7aeb61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Besan=C3=A7on?= Date: Tue, 5 Jan 2021 00:44:04 +0100 Subject: [PATCH 020/239] fix inf rational (#39063) --- base/rational.jl | 24 +++++++++++++++++++++++- test/rational.jl | 8 ++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/base/rational.jl b/base/rational.jl index 12b5113e8e475..a998787f69685 100644 --- a/base/rational.jl +++ b/base/rational.jl @@ -278,13 +278,35 @@ function -(x::Rational{T}) where T<:Unsigned x end -for (op,chop) in ((:+,:checked_add), (:-,:checked_sub), (:rem,:rem), (:mod,:mod)) +function +(x::Rational, y::Rational) + xp, yp = promote(x, y) + if isinf(x) && x == y + return xp + end + xd, yd = divgcd(promote(x.den, y.den)...) + Rational(checked_add(checked_mul(x.num,yd), checked_mul(y.num,xd)), checked_mul(x.den,yd)) +end + +function -(x::Rational, y::Rational) + xp, yp = promote(x, y) + if isinf(x) && x == -y + return xp + end + xd, yd = divgcd(promote(x.den, y.den)...) + Rational(checked_sub(checked_mul(x.num,yd), checked_mul(y.num,xd)), checked_mul(x.den,yd)) +end + +for (op,chop) in ((:rem,:rem), (:mod,:mod)) @eval begin function ($op)(x::Rational, y::Rational) xd, yd = divgcd(promote(x.den, y.den)...) Rational(($chop)(checked_mul(x.num,yd), checked_mul(y.num,xd)), checked_mul(x.den,yd)) end + end +end +for (op,chop) in ((:+,:checked_add), (:-,:checked_sub), (:rem,:rem), (:mod,:mod)) + @eval begin function ($op)(x::Rational, y::Integer) unsafe_rational(($chop)(x.num, checked_mul(x.den, y)), x.den) end diff --git a/test/rational.jl b/test/rational.jl index 961eb93a94ed9..07e312543318f 100644 --- a/test/rational.jl +++ b/test/rational.jl @@ -116,6 +116,14 @@ using Test @test abs(one(Rational{UInt})) === one(Rational{UInt}) @test abs(one(Rational{Int})) === one(Rational{Int}) @test abs(-one(Rational{Int})) === one(Rational{Int}) + + # inf addition + @test 1//0 + 1//0 == 1//0 + @test -1//0 - 1//0 == -1//0 + @test_throws DivideError 1//0 - 1//0 + @test_throws DivideError -1//0 + 1//0 + @test Int128(1)//0 + 1//0 isa Rational{Int128} + @test 1//0 + Int128(1)//0 isa Rational{Int128} end @testset "Rational methods" begin From 7dae29da2a87e083c12e31e62c236e2fc906b199 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 5 Jan 2021 06:48:34 +0000 Subject: [PATCH 021/239] [Artifacts]: Download to temporary directories, not `stdlib` We can't assume that `stdlib` is in a writable location; always download temporary testing files to `$TMPDIR`. --- stdlib/Artifacts/test/.gitignore | 1 - stdlib/Artifacts/test/refresh_artifacts.jl | 4 +--- stdlib/Artifacts/test/runtests.jl | 9 ++++----- 3 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 stdlib/Artifacts/test/.gitignore diff --git a/stdlib/Artifacts/test/.gitignore b/stdlib/Artifacts/test/.gitignore deleted file mode 100644 index 37beecae3371b..0000000000000 --- a/stdlib/Artifacts/test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/artifacts/ diff --git a/stdlib/Artifacts/test/refresh_artifacts.jl b/stdlib/Artifacts/test/refresh_artifacts.jl index 2f1d7d75b71b0..a70e13db1ee93 100644 --- a/stdlib/Artifacts/test/refresh_artifacts.jl +++ b/stdlib/Artifacts/test/refresh_artifacts.jl @@ -1,13 +1,11 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license using Artifacts: with_artifacts_directory -# using Pkg.Artifacts: ensure_all_artifacts_installed using Pkg.Artifacts: load_artifacts_toml, ensure_artifact_installed let - tempdir = joinpath(@__DIR__, "artifacts") toml = joinpath(@__DIR__, "Artifacts.toml") unused = Base.BinaryPlatforms.Platform(string(Sys.ARCH), "linux") - with_artifacts_directory(tempdir) do + with_artifacts_directory(ARGS[1]) do # ensure_all_artifacts_installed(toml; include_lazy=false) dict = load_artifacts_toml(toml) for (name, meta) in dict diff --git a/stdlib/Artifacts/test/runtests.jl b/stdlib/Artifacts/test/runtests.jl index 5e89f97bfba35..1433d89d3b5fb 100644 --- a/stdlib/Artifacts/test/runtests.jl +++ b/stdlib/Artifacts/test/runtests.jl @@ -4,7 +4,8 @@ using Artifacts, Test, Base.BinaryPlatforms using Artifacts: with_artifacts_directory, pack_platform!, unpack_platform # prepare for the package tests by ensuring the required artifacts are downloaded now -run(addenv(`$(Base.julia_cmd()) --color=no $(joinpath(@__DIR__, "refresh_artifacts.jl"))`, "TERM"=>"dumb")) +artifacts_dir = mktempdir() +run(addenv(`$(Base.julia_cmd()) --color=no $(joinpath(@__DIR__, "refresh_artifacts.jl")) $(artifacts_dir)`, "TERM"=>"dumb")) @testset "Artifact Paths" begin mktempdir() do tempdir @@ -81,8 +82,7 @@ end end @testset "Artifact Slash-indexing" begin - tempdir = joinpath(@__DIR__, "artifacts") - with_artifacts_directory(tempdir) do + with_artifacts_directory(artifacts_dir) do exeext = Sys.iswindows() ? ".exe" : "" # simple lookup, gives us the directory for `c_simple` for the current architecture @@ -112,8 +112,7 @@ end end @testset "@artifact_str Platform passing" begin - tempdir = joinpath(@__DIR__, "artifacts") - with_artifacts_directory(tempdir) do + with_artifacts_directory(artifacts_dir) do win64 = Platform("x86_64", "windows") mac64 = Platform("x86_64", "macos") @test basename(@artifact_str("c_simple", win64)) == "444cecb70ff39e8961dd33e230e151775d959f37" From 383db9262e286d147e922e45309a58510bd97dcf Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Tue, 5 Jan 2021 20:44:11 +1300 Subject: [PATCH 022/239] Bump Documenter to 0.26.1 (#39097) --- doc/Manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Manifest.toml b/doc/Manifest.toml index ad30f0c8f67ac..87c8830eba14c 100644 --- a/doc/Manifest.toml +++ b/doc/Manifest.toml @@ -21,9 +21,9 @@ version = "0.8.3" [[Documenter]] deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"] -git-tree-sha1 = "c01a7e8bcf7a6693444a52a0c5ac8b4e9528600e" +git-tree-sha1 = "b7715ae18be02110a8cf9cc8ed2ccdb1e3e3aba2" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.26.0" +version = "0.26.1" [[Downloads]] deps = ["ArgTools", "LibCURL", "NetworkOptions"] @@ -86,9 +86,9 @@ uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" [[Parsers]] deps = ["Dates"] -git-tree-sha1 = "6370b5b3cf2ce5a3d2b6f7ab2dc10f374e4d7d2b" +git-tree-sha1 = "50c9a9ed8c714945e01cd53a21007ed3865ed714" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "1.0.14" +version = "1.0.15" [[Pkg]] deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs"] From 7a6f423dadbef8c144f376266156b1adce1e79ae Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 5 Jan 2021 07:59:57 +0000 Subject: [PATCH 023/239] [REPL]: Don't write to the user's home directory Instead of writing out to actual `$HOME`, create a temporary directory and set that as `$HOME`/`$USERPROFILE`. --- stdlib/REPL/test/replcompletions.jl | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/stdlib/REPL/test/replcompletions.jl b/stdlib/REPL/test/replcompletions.jl index 2478ca3c77720..d42b2b8012d55 100644 --- a/stdlib/REPL/test/replcompletions.jl +++ b/stdlib/REPL/test/replcompletions.jl @@ -699,20 +699,22 @@ let s, c, r end # Tests homedir expansion - let path, s, c, r - path = homedir() - dir = joinpath(path, "tmpfoobar") - mkdir(dir) - s = "\"" * path * "/tmpfoob" - c,r = test_complete(s) - @test "tmpfoobar/" in c - l = 3 + length(path) - @test r == l:l+6 - @test s[r] == "tmpfoob" - s = "\"~" - @test "tmpfoobar/" in c - c,r = test_complete(s) - rm(dir) + mktempdir() do tmphome + withenv("HOME" => tmphome, "USERPROFILE" => tmphome) do + path = homedir() + dir = joinpath(path, "tmpfoobar") + mkdir(dir) + s = "\"" * path * "/tmpfoob" + c,r = test_complete(s) + @test "tmpfoobar/" in c + l = 3 + length(path) + @test r == l:l+6 + @test s[r] == "tmpfoob" + s = "\"~" + @test "tmpfoobar/" in c + c,r = test_complete(s) + rm(dir) + end end # Tests detecting of files in the env path (in shell mode) From fd671b33483a82c26a1e5acb6f3e2086d237156a Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 5 Jan 2021 03:35:46 -0500 Subject: [PATCH 024/239] [REPL] Do not require test to run within `/tmp` --- stdlib/REPL/test/replcompletions.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stdlib/REPL/test/replcompletions.jl b/stdlib/REPL/test/replcompletions.jl index d42b2b8012d55..8a1d2f39a18f4 100644 --- a/stdlib/REPL/test/replcompletions.jl +++ b/stdlib/REPL/test/replcompletions.jl @@ -663,11 +663,14 @@ let s, c, r @test s[r] == "tmp" # This should match things that are inside the tmp directory - if !isdir("/tmp/tmp") - s = "/tmp/" + s = tempdir() + if !endswith(s, "/") + s = string(s, "/") + end + if !isdir(joinpath(s, "tmp")) c,r = test_scomplete(s) @test !("tmp/" in c) - @test r === 6:5 + @test r === length(s) + 1:0 @test s[r] == "" end From ee6f6f1caf06f78c130c37ca8791a97aed0116ef Mon Sep 17 00:00:00 2001 From: mroavi Date: Tue, 5 Jan 2021 10:50:03 +0100 Subject: [PATCH 025/239] fix typo in metaprogramming.md (#39095) Fix typo --- doc/src/manual/metaprogramming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/manual/metaprogramming.md b/doc/src/manual/metaprogramming.md index eac6605ff3771..9880bf4417867 100644 --- a/doc/src/manual/metaprogramming.md +++ b/doc/src/manual/metaprogramming.md @@ -149,7 +149,7 @@ julia> :(::) The second syntactic purpose of the `:` character is to create expression objects without using the explicit [`Expr`](@ref) constructor. This is referred to as *quoting*. The `:` character, followed by paired parentheses around a single statement of Julia code, produces an `Expr` object based -on the enclosed code. Here is example of the short form used to quote an arithmetic expression: +on the enclosed code. Here is an example of the short form used to quote an arithmetic expression: ```jldoctest julia> ex = :(a+b*c+1) From 3931b225430d4165cc3603ad3c2919ca4e28fdfa Mon Sep 17 00:00:00 2001 From: Mustafa M Date: Tue, 5 Jan 2021 13:15:52 -0500 Subject: [PATCH 026/239] filesystem: use libuv for rmdir directly (#39013) --- base/file.jl | 13 ++++++++----- test/file.jl | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/base/file.jl b/base/file.jl index c58addbe997eb..7d0211693d25b 100644 --- a/base/file.jl +++ b/base/file.jl @@ -282,12 +282,15 @@ function rm(path::AbstractString; force::Bool=false, recursive::Bool=false) rm(joinpath(path, p), force=force, recursive=true) end end - @static if Sys.iswindows() - ret = ccall(:_wrmdir, Int32, (Cwstring,), path) - else - ret = ccall(:rmdir, Int32, (Cstring,), path) + req = Libc.malloc(_sizeof_uv_fs) + try + ret = ccall(:uv_fs_rmdir, Cint, (Ptr{Cvoid}, Ptr{Cvoid}, Cstring, Ptr{Cvoid}), C_NULL, req, path, C_NULL) + uv_fs_req_cleanup(req) + ret < 0 && uv_error("rm($(repr(path)))", ret) + nothing + finally + Libc.free(req) end - systemerror(:rmdir, ret != 0, extrainfo=path) end end diff --git a/test/file.jl b/test/file.jl index 2a2de0d793215..7cd7655583e20 100644 --- a/test/file.jl +++ b/test/file.jl @@ -444,8 +444,8 @@ cp(newfile, c_file) @test isdir(c_subdir) @test isfile(c_file) -@test_throws SystemError rm(c_tmpdir) -@test_throws SystemError rm(c_tmpdir, force=true) +@test_throws Base.IOError rm(c_tmpdir) +@test_throws Base.IOError rm(c_tmpdir, force=true) # create temp dir in specific directory d_tmpdir = mktempdir(c_tmpdir) From f46da9e36a06702a95e9a17885d8dec6a2be5c01 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 30 Dec 2020 14:45:48 -0500 Subject: [PATCH 027/239] mark integer parameters as sext/zext --- src/codegen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index 83fcf690215f7..a07a3429e0c92 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5668,6 +5668,11 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx, Module *M, String else if (isboxed && jl_is_immutable_datatype(jt)) { attributes = attributes.addParamAttribute(jl_LLVMContext, argno, Attribute::ReadOnly); } + else if (jl_is_primitivetype(jt) && ty->isIntegerTy()) { + bool issigned = jl_signed_type && jl_subtype(jt, (jl_value_t*)jl_signed_type); + Attribute::AttrKind attr = issigned ? Attribute::SExt : Attribute::ZExt; + attributes = attributes.addParamAttribute(jl_LLVMContext, argno, attr); + } fsig.push_back(ty); } From 158e22f9faef08a33fcf6ec3f34f1550776ca4c7 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Wed, 6 Jan 2021 03:09:19 -0500 Subject: [PATCH 028/239] Measure compile time only when using time macros pt.2: handling when code under test throws and make compile timing thread-local (#38915) * ensure compile timing disables in time & timev macros * make comp measurement switching threadsafe --- base/timing.jl | 78 ++++++++++++++++++++++++-------------------- src/aotcompile.cpp | 14 ++++---- src/gf.c | 9 +++-- src/jitlayers.cpp | 38 ++++++++++++--------- src/julia_internal.h | 4 +-- src/threading.c | 4 +++ 6 files changed, 83 insertions(+), 64 deletions(-) diff --git a/base/timing.jl b/base/timing.jl index 93fb2abe74360..80f6aee0aa02f 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -115,41 +115,44 @@ function format_bytes(bytes) # also used by InteractiveUtils end end -function time_print(elapsedtime, bytes=0, gctime=0, allocs=0, compile_time=0) +function time_print(elapsedtime, bytes=0, gctime=0, allocs=0, compile_time=0, newline=false) timestr = Ryu.writefixed(Float64(elapsedtime/1e9), 6) - length(timestr) < 10 && print(" "^(10 - length(timestr))) - print(timestr, " seconds") - parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0 - parens && print(" (") - if bytes != 0 || allocs != 0 - allocs, ma = prettyprint_getunits(allocs, length(_cnt_units), Int64(1000)) - if ma == 1 - print(Int(allocs), _cnt_units[ma], allocs==1 ? " allocation: " : " allocations: ") - else - print(Ryu.writefixed(Float64(allocs), 2), _cnt_units[ma], " allocations: ") - end - print(format_bytes(bytes)) - end - if gctime > 0 + str = sprint() do io + print(io, length(timestr) < 10 ? (" "^(10 - length(timestr))) : "") + print(io, timestr, " seconds") + parens = bytes != 0 || allocs != 0 || gctime > 0 || compile_time > 0 + parens && print(io, " (") if bytes != 0 || allocs != 0 - print(", ") + allocs, ma = prettyprint_getunits(allocs, length(_cnt_units), Int64(1000)) + if ma == 1 + print(io, Int(allocs), _cnt_units[ma], allocs==1 ? " allocation: " : " allocations: ") + else + print(io, Ryu.writefixed(Float64(allocs), 2), _cnt_units[ma], " allocations: ") + end + print(io, format_bytes(bytes)) end - print(Ryu.writefixed(Float64(100*gctime/elapsedtime), 2), "% gc time") - end - if compile_time > 0 - if bytes != 0 || allocs != 0 || gctime > 0 - print(", ") + if gctime > 0 + if bytes != 0 || allocs != 0 + print(io, ", ") + end + print(io, Ryu.writefixed(Float64(100*gctime/elapsedtime), 2), "% gc time") end - print(Ryu.writefixed(Float64(100*compile_time/elapsedtime), 2), "% compilation time") + if compile_time > 0 + if bytes != 0 || allocs != 0 || gctime > 0 + print(io, ", ") + end + print(io, Ryu.writefixed(Float64(100*compile_time/elapsedtime), 2), "% compilation time") + end + parens && print(io, ")") end - parens && print(")") + newline ? println(str) : print(str) nothing end function timev_print(elapsedtime, diff::GC_Diff, compile_time) allocs = gc_alloc_count(diff) - time_print(elapsedtime, diff.allocd, diff.total_time, allocs, compile_time) - print("\nelapsed time (ns): $elapsedtime\n") + time_print(elapsedtime, diff.allocd, diff.total_time, allocs, compile_time, true) + print("elapsed time (ns): $elapsedtime\n") padded_nonzero_print(diff.total_time, "gc time (ns)") padded_nonzero_print(diff.allocd, "bytes allocated") padded_nonzero_print(diff.poolalloc, "pool allocs") @@ -200,13 +203,14 @@ macro time(ex) local stats = gc_num() local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() - local val = $(esc(ex)) - elapsedtime = time_ns() - elapsedtime - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime + local val = try + $(esc(ex)) + finally + elapsedtime = time_ns() - elapsedtime + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime + end local diff = GC_Diff(gc_num(), stats) - time_print(elapsedtime, diff.allocd, diff.total_time, - gc_alloc_count(diff), compile_elapsedtime) - println() + time_print(elapsedtime, diff.allocd, diff.total_time, gc_alloc_count(diff), compile_elapsedtime, true) val end end @@ -248,10 +252,14 @@ macro timev(ex) local stats = gc_num() local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() - local val = $(esc(ex)) - elapsedtime = time_ns() - elapsedtime - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime - timev_print(elapsedtime, GC_Diff(gc_num(), stats), compile_elapsedtime) + local val = try + $(esc(ex)) + finally + elapsedtime = time_ns() - elapsedtime + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime + end + local diff = GC_Diff(gc_num(), stats) + timev_print(elapsedtime, diff, compile_elapsedtime) val end end diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index 7988fcc253025..c95d6430e04dd 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -293,7 +293,8 @@ void *jl_create_native(jl_array_t *methods, const jl_cgparams_t cgparams, int _p JL_GC_PUSH1(&src); JL_LOCK(&codegen_lock); uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); CompilationPolicy policy = (CompilationPolicy) _policy; @@ -417,8 +418,8 @@ void *jl_create_native(jl_array_t *methods, const jl_cgparams_t cgparams, int _p } data->M = std::move(clone); - if (jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); // Might GC return (void*)data; } @@ -896,7 +897,8 @@ void *jl_get_llvmf_defn(jl_method_instance_t *mi, size_t world, char getwrapper, jl_llvm_functions_t decls; JL_LOCK(&codegen_lock); uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); std::tie(m, decls) = jl_emit_code(mi, src, jlrettype, output); @@ -921,8 +923,8 @@ void *jl_get_llvmf_defn(jl_method_instance_t *mi, size_t world, char getwrapper, m.release(); // the return object `llvmf` will be the owning pointer } JL_GC_POP(); - if (jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); // Might GC if (F) return F; diff --git a/src/gf.c b/src/gf.c index 5f0b8b5b5c79a..52ed2d75250e7 100644 --- a/src/gf.c +++ b/src/gf.c @@ -3147,21 +3147,20 @@ int jl_has_concrete_subtype(jl_value_t *typ) //static jl_mutex_t typeinf_lock; #define typeinf_lock codegen_lock -uint8_t jl_measure_compile_time = 0; -uint64_t jl_cumulative_compile_time = 0; static uint64_t inference_start_time = 0; JL_DLLEXPORT void jl_typeinf_begin(void) { JL_LOCK(&typeinf_lock); - if (jl_measure_compile_time) + if (jl_measure_compile_time[jl_threadid()]) inference_start_time = jl_hrtime(); } JL_DLLEXPORT void jl_typeinf_end(void) { - if (typeinf_lock.count == 1 && jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - inference_start_time); + int tid = jl_threadid(); + if (typeinf_lock.count == 1 && jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - inference_start_time); JL_UNLOCK(&typeinf_lock); } diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 0d510784cdea6..6269607ae575c 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -78,14 +78,16 @@ void jl_jit_globals(std::map &globals) extern "C" JL_DLLEXPORT uint64_t jl_cumulative_compile_time_ns_before() { - jl_measure_compile_time = 1; - return jl_cumulative_compile_time; + int tid = jl_threadid(); + jl_measure_compile_time[tid] = 1; + return jl_cumulative_compile_time[tid]; } extern "C" JL_DLLEXPORT uint64_t jl_cumulative_compile_time_ns_after() { - jl_measure_compile_time = 0; - return jl_cumulative_compile_time; + int tid = jl_threadid(); + jl_measure_compile_time[tid] = 0; + return jl_cumulative_compile_time[tid]; } // this generates llvm code for the lambda info @@ -231,7 +233,8 @@ int jl_compile_extern_c(void *llvmmod, void *p, void *sysimg, jl_value_t *declrt { JL_LOCK(&codegen_lock); uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); jl_codegen_params_t params; jl_codegen_params_t *pparams = (jl_codegen_params_t*)p; @@ -255,8 +258,8 @@ int jl_compile_extern_c(void *llvmmod, void *p, void *sysimg, jl_value_t *declrt if (success && llvmmod == NULL) jl_add_to_ee(std::unique_ptr(into)); } - if (codegen_lock.count == 1 && jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (codegen_lock.count == 1 && jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); return success; } @@ -314,7 +317,8 @@ jl_code_instance_t *jl_generate_fptr(jl_method_instance_t *mi JL_PROPAGATES_ROOT { JL_LOCK(&codegen_lock); // also disables finalizers, to prevent any unexpected recursion uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); // if we don't have any decls already, try to generate it now jl_code_info_t *src = NULL; @@ -352,8 +356,8 @@ jl_code_instance_t *jl_generate_fptr(jl_method_instance_t *mi JL_PROPAGATES_ROOT else { codeinst = NULL; } - if (codegen_lock.count == 1 && jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (codegen_lock.count == 1 && jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); JL_GC_POP(); return codeinst; @@ -367,7 +371,8 @@ void jl_generate_fptr_for_unspecialized(jl_code_instance_t *unspec) } JL_LOCK(&codegen_lock); uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); if (unspec->invoke == NULL) { jl_code_info_t *src = NULL; @@ -395,8 +400,8 @@ void jl_generate_fptr_for_unspecialized(jl_code_instance_t *unspec) } JL_GC_POP(); } - if (codegen_lock.count == 1 && jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (codegen_lock.count == 1 && jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); // Might GC } @@ -419,7 +424,8 @@ jl_value_t *jl_dump_method_asm(jl_method_instance_t *mi, size_t world, // so create an exception here so we can print pretty our lies JL_LOCK(&codegen_lock); // also disables finalizers, to prevent any unexpected recursion uint64_t compiler_start_time = 0; - if (jl_measure_compile_time) + int tid = jl_threadid(); + if (jl_measure_compile_time[tid]) compiler_start_time = jl_hrtime(); specfptr = (uintptr_t)codeinst->specptr.fptr; if (specfptr == 0) { @@ -444,8 +450,8 @@ jl_value_t *jl_dump_method_asm(jl_method_instance_t *mi, size_t world, } JL_GC_POP(); } - if (jl_measure_compile_time) - jl_cumulative_compile_time += (jl_hrtime() - compiler_start_time); + if (jl_measure_compile_time[tid]) + jl_cumulative_compile_time[tid] += (jl_hrtime() - compiler_start_time); JL_UNLOCK(&codegen_lock); } if (specfptr != 0) diff --git a/src/julia_internal.h b/src/julia_internal.h index 371ce1f3adf2d..03a1274ace7f8 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -124,8 +124,8 @@ static inline uint64_t cycleclock(void) #include "timing.h" -extern uint8_t jl_measure_compile_time; -extern uint64_t jl_cumulative_compile_time; +extern uint8_t *jl_measure_compile_time; +extern uint64_t *jl_cumulative_compile_time; #ifdef _COMPILER_MICROSOFT_ # define jl_return_address() ((uintptr_t)_ReturnAddress()) diff --git a/src/threading.c b/src/threading.c index 83227854d7558..ffdcd578f34ae 100644 --- a/src/threading.c +++ b/src/threading.c @@ -222,6 +222,8 @@ jl_get_ptls_states_func jl_get_ptls_states_getter(void) #endif jl_ptls_t *jl_all_tls_states JL_GLOBALLY_ROOTED; +uint8_t *jl_measure_compile_time = NULL; +uint64_t *jl_cumulative_compile_time = NULL; // return calling thread's ID // Also update the suspended_threads list in signals-mach when changing the @@ -405,6 +407,8 @@ void jl_init_threading(void) } if (jl_n_threads <= 0) jl_n_threads = 1; + jl_measure_compile_time = realloc( jl_measure_compile_time, jl_n_threads * sizeof *jl_measure_compile_time ); + jl_cumulative_compile_time = realloc( jl_cumulative_compile_time, jl_n_threads * sizeof *jl_cumulative_compile_time ); #ifndef __clang_analyzer__ jl_all_tls_states = (jl_ptls_t*)calloc(jl_n_threads, sizeof(void*)); #endif From 9f8bdc2645cac4abf5143bf6f8b59577b3a79435 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Wed, 6 Jan 2021 09:09:40 +0100 Subject: [PATCH 029/239] fix Meta.partially_inline! again (#39112) forgot to take `statement_offset` into account in #38519 --- base/meta.jl | 2 +- test/meta.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/base/meta.jl b/base/meta.jl index 9f545b108353b..98bbcc8cdd358 100644 --- a/base/meta.jl +++ b/base/meta.jl @@ -354,7 +354,7 @@ function _partially_inline!(@nospecialize(x), slot_replacements::Vector{Any}, return Core.GotoIfNot( _partially_inline!(x.cond, slot_replacements, type_signature, static_param_values, slot_offset, statement_offset, boundscheck), - x.dest, + x.dest + statement_offset, ) end if isa(x, Expr) diff --git a/test/meta.jl b/test/meta.jl index e13d986e667e3..ab073668677c6 100644 --- a/test/meta.jl +++ b/test/meta.jl @@ -243,3 +243,5 @@ g(::Val{x}) where {x} = x ? 1 : 0 ci = code_lowered(g, Tuple{Val{true}})[1] @test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[Val{true}], 0, 0, :propagate)[1] == Core.GotoIfNot(QuoteNode(Val{true}), 3) +@test Meta.partially_inline!(ci.code, [], Tuple{typeof(g),Val{true}}, Any[Val{true}], 0, 2, :propagate)[1] == + Core.GotoIfNot(QuoteNode(Val{true}), 5) From ed89ae75cc2eeaa7fd58c52ca6bea427bba0c38c Mon Sep 17 00:00:00 2001 From: Mustafa M Date: Wed, 6 Jan 2021 12:00:37 -0500 Subject: [PATCH 030/239] Test for Windows delete permissions in system folders (#39078) --- test/file.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/file.jl b/test/file.jl index 7cd7655583e20..b47e44266a16d 100644 --- a/test/file.jl +++ b/test/file.jl @@ -1543,3 +1543,16 @@ end chmod(dir, 0o777; recursive=true) end end + +if Sys.iswindows() +@testset "mkdir/rm permissions" begin + # test delete permission in system folders (i.e. impliclty test chmod permissions) + # issue #38433 + @test withenv("TMP" => "C:\\") do + mktempdir() do dir end + end === nothing + # same as above, but test rm explicitly + tmp = mkdir(tempname("C:\\")) + @test rm(tmp) === nothing +end +end From 5c6e21edbfd8f0c7d16ea01c91d1c75c30d4eaa1 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Thu, 7 Jan 2021 03:22:03 +0900 Subject: [PATCH 031/239] inference: minor typing improvements for `InferenceState.stmt_types` (#39096) --- base/compiler/abstractinterpretation.jl | 2 +- base/compiler/inferencestate.jl | 4 ++-- base/compiler/typeinfer.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 4ef63f3cbaae1..11056f2131874 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1364,7 +1364,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState) frame.cur_hand = Pair{Any,Any}(l, frame.cur_hand) # propagate type info to exception handler old = s[l] - new = s[pc]::Array{Any,1} + new = s[pc]::VarTable newstate_catch = stupdate!(old, new) if newstate_catch !== false if l < frame.pc´´ diff --git a/base/compiler/inferencestate.jl b/base/compiler/inferencestate.jl index d1733d7d743ad..988f2eefa261e 100644 --- a/base/compiler/inferencestate.jl +++ b/base/compiler/inferencestate.jl @@ -16,7 +16,7 @@ mutable struct InferenceState world::UInt valid_worlds::WorldRange nargs::Int - stmt_types::Vector{Any} + stmt_types::Vector{Union{Nothing, Vector{Any}}} # ::Vector{Union{Nothing, VarTable}} stmt_edges::Vector{Union{Nothing, Vector{Any}}} stmt_info::Vector{Any} # return type @@ -67,7 +67,7 @@ mutable struct InferenceState n = length(code) s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ] - s_types = Any[ nothing for i = 1:n ] + s_types = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ] # initial types nslots = length(src.slotflags) diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 243c1ab410ccd..5082b01ea5036 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -568,7 +568,7 @@ function type_annotate!(sv::InferenceState) src = sv.src states = sv.stmt_types nargs = sv.nargs - nslots = length(states[1]::Array{Any,1}) + nslots = length(states[1]::VarTable) undefs = fill(false, nslots) body = src.code::Array{Any,1} nexpr = length(body) From 0949eb27e2b0c14e15b9c8f8ed53a94862afe35e Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 30 Dec 2020 14:50:22 -0500 Subject: [PATCH 032/239] silence unused variable warning --- src/codegen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/codegen.cpp b/src/codegen.cpp index a07a3429e0c92..84a726a421bad 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -5631,6 +5631,7 @@ static jl_returninfo_t get_specsig_function(jl_codectx_t &ctx, Module *M, String unsigned argno = 1; #if JL_LLVM_VERSION < 120000 attributes = attributes.addAttribute(jl_LLVMContext, argno, Attribute::StructRet); + (void)srt; // silence unused variable error #else Attribute sret = Attribute::getWithStructRetType(jl_LLVMContext, srt); attributes = attributes.addAttribute(jl_LLVMContext, argno, sret); From 86639e1abae97a7f46e8daa9ec83466865c854f4 Mon Sep 17 00:00:00 2001 From: Jose Manuel de Frutos Date: Thu, 7 Jan 2021 07:20:18 +0100 Subject: [PATCH 033/239] Add a warning that HTML should not be used #38909 (#39072) * Add a warning that HTML should not be used #38909 --- base/docs/utils.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base/docs/utils.jl b/base/docs/utils.jl index b1f3327086808..841af2d2c2b9b 100644 --- a/base/docs/utils.jl +++ b/base/docs/utils.jl @@ -18,6 +18,11 @@ You can also use a stream for large amounts of data: HTML() do io println(io, "
foo
") end + +!!! warning + `HTML` is currently exported to maintain + backwards-compatibility, but is considered + to be deprecated and should not be used. """ mutable struct HTML{T} content::T @@ -63,6 +68,11 @@ You can also use a stream for large amounts of data: Text() do io println(io, "foo") end + +!!! warning + `Text` is currently exported to maintain + backwards-compatibility, but is considered + to be deprecated and should not be used. """ mutable struct Text{T} content::T From 03957db184a70a255c54f3b1bb54ac5639892700 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 7 Jan 2021 10:36:15 -0500 Subject: [PATCH 034/239] Remove try from at-time and close compile timer during throw (#39133) * remove try from at-time and close compile timer during throw * add scope tests for at-time and aat-timev --- base/timing.jl | 18 ++++++------------ src/task.c | 3 +++ test/core.jl | 13 +++++++++++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/base/timing.jl b/base/timing.jl index 80f6aee0aa02f..976bda7962676 100644 --- a/base/timing.jl +++ b/base/timing.jl @@ -203,12 +203,9 @@ macro time(ex) local stats = gc_num() local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() - local val = try - $(esc(ex)) - finally - elapsedtime = time_ns() - elapsedtime - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime - end + local val = $(esc(ex)) + elapsedtime = time_ns() - elapsedtime + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime local diff = GC_Diff(gc_num(), stats) time_print(elapsedtime, diff.allocd, diff.total_time, gc_alloc_count(diff), compile_elapsedtime, true) val @@ -252,12 +249,9 @@ macro timev(ex) local stats = gc_num() local compile_elapsedtime = cumulative_compile_time_ns_before() local elapsedtime = time_ns() - local val = try - $(esc(ex)) - finally - elapsedtime = time_ns() - elapsedtime - compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime - end + local val = $(esc(ex)) + elapsedtime = time_ns() - elapsedtime + compile_elapsedtime = cumulative_compile_time_ns_after() - compile_elapsedtime local diff = GC_Diff(gc_num(), stats) timev_print(elapsedtime, diff, compile_elapsedtime) val diff --git a/src/task.c b/src/task.c index 0927b685cb5ce..0ab4075ac0067 100644 --- a/src/task.c +++ b/src/task.c @@ -584,6 +584,9 @@ static void JL_NORETURN throw_internal(jl_value_t *exception JL_MAYBE_UNROOTED) { jl_ptls_t ptls = jl_get_ptls_states(); ptls->io_wait = 0; + // @time needs its compile timer disabled on error, + // and cannot use a try-finally as it would break scope for assignments + jl_measure_compile_time[ptls->tid] = 0; if (ptls->safe_restore) jl_longjmp(*ptls->safe_restore, 1); // During startup diff --git a/test/core.jl b/test/core.jl index 88b54eb25a90b..2e275de6edf93 100644 --- a/test/core.jl +++ b/test/core.jl @@ -5080,6 +5080,19 @@ end @test f17255(10000)[1] GC.enable(true) +# PR #39133, ensure that @time evaluates in the same scope +function time_macro_scope() + @time time_macro_local_var = 1 + time_macro_local_var +end +@test time_macro_scope() == 1 + +function timev_macro_scope() + @timev timev_macro_local_var = 1 + timev_macro_local_var +end +@time timev_macro_scope() == 1 + # issue #18710 bad_tvars() where {T} = 1 @test isa(which(bad_tvars, ()), Method) From a319ae45a15fb005c7d7e29e3f3a62f27e18e3a6 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 7 Jan 2021 10:45:27 -0500 Subject: [PATCH 035/239] Revert "Improve copyto! for short heterogeneous tuples (#39035)" (#39128) This reverts commit b00e9f0bac05de913d5b869739bcc93ac259c9f7, which has a 1/64 chance of failing tests. --- base/abstractarray.jl | 6 ++---- base/ntuple.jl | 44 ------------------------------------------- test/abstractarray.jl | 10 ---------- 3 files changed, 2 insertions(+), 58 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 9c88f1f96cc87..ad32a102fa7aa 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -831,14 +831,12 @@ end ## from general iterable to any array -@noinline throw_dest_too_short() = - throw(ArgumentError("destination has fewer elements than required")) - function copyto!(dest::AbstractArray, src) destiter = eachindex(dest) y = iterate(destiter) for x in src - y === nothing && throw_dest_too_short() + y === nothing && + throw(ArgumentError("destination has fewer elements than required")) dest[y[1]] = x y = iterate(destiter, y[2]) end diff --git a/base/ntuple.jl b/base/ntuple.jl index b6874f3fbe6d5..a5608dfa927c3 100644 --- a/base/ntuple.jl +++ b/base/ntuple.jl @@ -91,47 +91,3 @@ end (t..., fill(val, N-M)...) end end - -# Specializations for copyto! of various `NTuple`s -function check_inds_compatible(dest::AbstractArray, src::Tuple) - length(dest) >= length(src) || throw_dest_too_short() -end - -function _copyto_generated!(dest::AbstractArray, src::NTuple{N, Any}) where N - if @generated - ret = quote - check_inds_compatible(dest, src) - idxs = eachindex(dest) - end - state = () - for n in 1:N - append!(ret.args, (quote - ind, state = iterate(idxs, $(state...)) - @inbounds dest[ind] = src[$n] - end).args) - state = (:state,) - end - push!(ret.args, :(return dest)) - ret - else - length(src) == 0 && return dest - return copyto!(dest, firstindex(dest), src, firstindex(src)) - end -end - -# Non-homogeneous tuples -function copyto!(dest::AbstractArray, src::Tuple) - if length(src) < 10 - # Manual optimization for short tuples - # TODO: Better support for homogeneous tuple tails - return _copyto_generated!(dest, src) - else - return copyto!(dest, firstindex(dest), src, firstindex(src)) - end -end - -# Specialization for homogeneous tuples -function copyto!(dest::AbstractArray, src::Tuple{Vararg{T}} where T) - length(src) == 0 && return dest - copyto!(dest, firstindex(dest), src, firstindex(src)) -end diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 6d052bfb9a2ae..f00f1f80332bb 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1263,13 +1263,3 @@ Base.pushfirst!(tpa::TestPushArray{T}, a::T) where T = pushfirst!(tpa.data, a) pushfirst!(tpa, 6, 5, 4, 3, 2) @test tpa.data == reverse(collect(1:6)) end - -@testset "copyto! with tuple" begin - randtype(n) = rand(Bool) ? 1.0 : 2 - @test copyto!(fill(0.0, 100), ntuple(randtype, 100))[end] != 0.0 - @test copyto!(fill(0.0, 100), ntuple(x->1.0, 100))[end] != 0.0 - @test copyto!(fill(0.0, 100), ntuple(randtype, 50))[end] == 0.0 - @test_throws BoundsError copyto!(fill(0.0, 50), ntuple(randtype, 100)) - @test_throws BoundsError copyto!(fill(0.0, 50), ntuple(x->1.0, 100)) - @test_throws ArgumentError copyto!(fill(0.0, 5), ntuple(randtype, 7)) -end From f5c8e67edd060aa9e7679e790c3d65bb03e3aede Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 7 Jan 2021 17:49:43 +0100 Subject: [PATCH 036/239] Fix alloc opt pass on LLVM 11+. (#39119) --- src/llvm-alloc-opt.cpp | 2 +- test/llvmpasses/alloc-opt3.jl | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/llvmpasses/alloc-opt3.jl diff --git a/src/llvm-alloc-opt.cpp b/src/llvm-alloc-opt.cpp index 4bf6038361541..c6d9dce9b8548 100644 --- a/src/llvm-alloc-opt.cpp +++ b/src/llvm-alloc-opt.cpp @@ -66,7 +66,7 @@ static bool hasObjref(Type *ty) return ptrty->getAddressSpace() == AddressSpace::Tracked; #if JL_LLVM_VERSION >= 110000 if (isa(ty) || isa(ty)) - return GetElementPtrInst::getTypeAtIndex(ty, (uint64_t)0); + return hasObjref(GetElementPtrInst::getTypeAtIndex(ty, (uint64_t)0)); #else if (auto seqty = dyn_cast(ty)) return hasObjref(seqty->getElementType()); diff --git a/test/llvmpasses/alloc-opt3.jl b/test/llvmpasses/alloc-opt3.jl new file mode 100644 index 0000000000000..9437913e4054b --- /dev/null +++ b/test/llvmpasses/alloc-opt3.jl @@ -0,0 +1,23 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +# RUN: julia --startup-file=no %s %t -O +# RUN: cat %t/* | FileCheck %s + +include(joinpath("..", "testhelpers", "llvmpasses.jl")) + +# JuliaLang/julia#38922 +function haszerolayout(x::NTuple{32, VecElement{UInt8}}) + rx = Ref(x) + GC.@preserve rx begin + lower = iszero(unsafe_load(Ptr{UInt128}(pointer_from_objref(rx)), 1)) + upper = iszero(unsafe_load(Ptr{UInt128}(pointer_from_objref(rx)), 2)) + lower & upper + end +end + +# CHECK-LABEL: @julia_haszerolayout +# CHECK: top: +# CHECK-NOT: @jl_gc_pool_alloc +# CHECK: extractelement +# CHECK: ret i8 +emit(haszerolayout, NTuple{32,VecElement{UInt8}}) From c70a5bc90101e3686be8be8beb7087b08e27d31d Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 7 Jan 2021 11:51:48 -0500 Subject: [PATCH 037/239] fix part of #38936, getfield elim handling union of tuples (#39107) This fixes the regression since 1.5 --- base/compiler/ssair/passes.jl | 3 +++ base/compiler/typeutils.jl | 18 ++++++++++++++++++ test/compiler/irpasses.jl | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 3b60da09b180d..ff5fb1877ae62 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -634,6 +634,9 @@ function getfield_elim_pass!(ir::IRCode) isa(field, Union{Int, Symbol}) || continue struct_typ = unwrap_unionall(widenconst(compact_exprtype(compact, stmt.args[2]))) + if isa(struct_typ, Union) && struct_typ <: Tuple + struct_typ = unswitchtupleunion(struct_typ) + end isa(struct_typ, DataType) || continue def, typeconstraint = stmt.args[2], struct_typ diff --git a/base/compiler/typeutils.jl b/base/compiler/typeutils.jl index 98528a8738ca9..1a2157923086a 100644 --- a/base/compiler/typeutils.jl +++ b/base/compiler/typeutils.jl @@ -222,3 +222,21 @@ function improvable_via_constant_propagation(@nospecialize(t)) end return false end + +# convert a Union of Tuple types to a Tuple of Unions +function unswitchtupleunion(u::Union) + ts = uniontypes(u) + n = -1 + for t in ts + if t isa DataType && t.name === Tuple.name && !isvarargtype(t.parameters[end]) + if n == -1 + n = length(t.parameters) + elseif n != length(t.parameters) + return u + end + else + return u + end + end + Tuple{Any[ Union{Any[t.parameters[i] for t in ts]...} for i in 1:n ]...} +end diff --git a/test/compiler/irpasses.jl b/test/compiler/irpasses.jl index c8fff2c1d522f..6a78380f01a97 100644 --- a/test/compiler/irpasses.jl +++ b/test/compiler/irpasses.jl @@ -352,3 +352,20 @@ let code = code_typed(pi_on_argument, Tuple{Any})[1].first.code, @test nisa == 1 @test found_pi end + +# issue #38936 +# check that getfield elim can handle unions of tuple types +mutable struct S38936{T} content::T end +struct PrintAll{T} <: Function + parts::T +end +function (f::PrintAll)(io::IO) + for x in f.parts + print(io, x) + end +end +let f = PrintAll((S38936(""), "data", S38936(" Date: Thu, 7 Jan 2021 08:55:50 -0800 Subject: [PATCH 038/239] `addenv()`, by default, should inherit from `ENV` (#39100) The spirit of `addenv()` is to be non-destructive, however because a `Cmd` object with an `env` member that is set to `nothing` (the default) inherts from the current environment when it is run. This means that the following, rather surprising behavior holds true on current master: ``` julia> ENV["FOO"] = "foo" run(`/bin/bash -c "echo \$FOO \$BAR"`) run(addenv(`/bin/bash -c "echo \$FOO \$BAR"`, "BAR" => "bar")) foo bar ``` This PR adds an `inherit` flag to `addenv()` to allow keeping this behavior if it is actually desired (this might make sense if you are constructing `.env` blocks over a series of `addenv()` calls and you don't want to have to special-case your first operation as a `setenv()` rather than an `addenv()`. --- base/cmd.jl | 21 +++++++++++++-------- test/spawn.jl | 22 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/base/cmd.jl b/base/cmd.jl index 4fc7c65094166..e1f93413a2fbc 100644 --- a/base/cmd.jl +++ b/base/cmd.jl @@ -246,14 +246,19 @@ setenv(cmd::Cmd, env::Pair{<:AbstractString}...; dir="") = setenv(cmd::Cmd; dir="") = Cmd(cmd; dir=dir) """ - addenv(command::Cmd, env...) + addenv(command::Cmd, env...; inherit::Bool = true) Merge new environment mappings into the given `Cmd` object, returning a new `Cmd` object. -Duplicate keys are replaced. +Duplicate keys are replaced. If `command` does not contain any environment values set already, +it inherits the current environment at time of `addenv()` call if `inherit` is `true`. """ -function addenv(cmd::Cmd, env::Dict) +function addenv(cmd::Cmd, env::Dict; inherit::Bool = true) new_env = Dict{String,String}() - if cmd.env !== nothing + if cmd.env === nothing + if inherit + merge!(new_env, ENV) + end + else for (k, v) in split.(cmd.env, "=") new_env[string(k)::String] = string(v)::String end @@ -264,12 +269,12 @@ function addenv(cmd::Cmd, env::Dict) return setenv(cmd, new_env) end -function addenv(cmd::Cmd, pairs::Pair{<:AbstractString}...) - return addenv(cmd, Dict(k => v for (k, v) in pairs)) +function addenv(cmd::Cmd, pairs::Pair{<:AbstractString}...; inherit::Bool = true) + return addenv(cmd, Dict(k => v for (k, v) in pairs); inherit) end -function addenv(cmd::Cmd, env::Vector{<:AbstractString}) - return addenv(cmd, Dict(k => v for (k, v) in split.(env, "="))) +function addenv(cmd::Cmd, env::Vector{<:AbstractString}; inherit::Bool = true) + return addenv(cmd, Dict(k => v for (k, v) in split.(env, "=")); inherit) end (&)(left::AbstractCmd, right::AbstractCmd) = AndCmds(left, right) diff --git a/test/spawn.jl b/test/spawn.jl index 236b9f280d799..4f826b05df93d 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -711,6 +711,28 @@ end @test strip(String(read(cmd))) == "bar bar" cmd = addenv(cmd, ["FOO=baz"]) @test strip(String(read(cmd))) == "baz bar" + + # Test that `addenv()` works properly with `inherit` + withenv("FOO" => "foo") do + cmd = Cmd(`$shcmd -c "echo \$FOO \$BAR"`) + @test strip(String(read(cmd))) == "foo" + + cmd2 = addenv(cmd, "BAR" => "bar"; inherit=false) + @test strip(String(read(cmd2))) == "bar" + + cmd2 = addenv(cmd, "BAR" => "bar"; inherit=true) + @test strip(String(read(cmd2))) == "foo bar" + + # Changing the environment doesn't effect the command, + # because it was baked in at `addenv()` time + withenv("FOO" => "baz") do + @test strip(String(read(cmd2))) == "foo bar" + end + + # Even with inheritance, `addenv()` dominates: + cmd2 = addenv(cmd, "FOO" => "foo2", "BAR" => "bar"; inherit=true) + @test strip(String(read(cmd2))) == "foo2 bar" + end end From 59eb9f98ce9860cf25ec2a58ddab451d6b15c2c7 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 7 Jan 2021 11:57:16 -0500 Subject: [PATCH 039/239] remove Core._apply Builtin (#39115) We can emulate this deprecated function, until we delete it in v2. This in turn revealed some missing error checks, which we also add. Fixes #39113 --- base/boot.jl | 3 +++ base/compiler/abstractinterpretation.jl | 20 ++++++-------------- base/compiler/compiler.jl | 4 ++-- base/compiler/optimize.jl | 6 +++--- base/compiler/ssair/inlining.jl | 8 ++++---- base/compiler/types.jl | 6 +++--- src/builtin_proto.h | 2 +- src/builtins.c | 20 ++++---------------- src/codegen.cpp | 11 ++++------- src/module.c | 2 ++ src/staticdata.c | 5 ++--- src/toplevel.c | 8 +++----- stdlib/InteractiveUtils/src/macros.jl | 10 +++++----- test/compiler/inference.jl | 9 +++++---- test/compiler/inline.jl | 2 +- 15 files changed, 48 insertions(+), 68 deletions(-) diff --git a/base/boot.jl b/base/boot.jl index 149b940d5d352..65dc5137d34cb 100644 --- a/base/boot.jl +++ b/base/boot.jl @@ -803,4 +803,7 @@ Integer(x::Union{Float16, Float32, Float64}) = Int(x) # The internal jl_parse which will call into Core._parse if not `nothing`. _parse = nothing +# support for deprecated uses of internal _apply function +_apply(x...) = Core._apply_iterate(Main.Base.iterate, x...) + ccall(:jl_set_istopmod, Cvoid, (Any, Bool), Core, true) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 11056f2131874..589de2d4eb229 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -577,13 +577,7 @@ end # simulate iteration protocol on container type up to fixpoint function abstract_iteration(interp::AbstractInterpreter, @nospecialize(itft), @nospecialize(itertype), sv::InferenceState) - if !isdefined(Main, :Base) || !isdefined(Main.Base, :iterate) || !isconst(Main.Base, :iterate) - return Any[Vararg{Any}], nothing - end - if itft === nothing - iteratef = getfield(Main.Base, :iterate) - itft = Const(iteratef) - elseif isa(itft, Const) + if isa(itft, Const) iteratef = itft.val else return Any[Vararg{Any}], nothing @@ -595,6 +589,7 @@ function abstract_iteration(interp::AbstractInterpreter, @nospecialize(itft), @n # Return Bottom if this is not an iterator. # WARNING: Changes to the iteration protocol must be reflected here, # this is not just an optimization. + # TODO: this doesn't realize that Array, SimpleVector, Tuple, and NamedTuple do not use the iterate protocol stateordonet === Bottom && return Any[Bottom], AbstractIterationInfo(CallMeta[CallMeta(Bottom, info)]) valtype = statetype = Bottom ret = Any[] @@ -658,7 +653,7 @@ function abstract_apply(interp::AbstractInterpreter, @nospecialize(itft), @nospe aftw = widenconst(aft) if !isa(aft, Const) && (!isType(aftw) || has_free_typevars(aftw)) if !isconcretetype(aftw) || (aftw <: Builtin) - add_remark!(interp, sv, "Core._apply called on a function of a non-concrete type") + add_remark!(interp, sv, "Core._apply_iterate called on a function of a non-concrete type") # bail now, since it seems unlikely that abstract_call will be able to do any better after splitting # this also ensures we don't call abstract_call_gf_by_type below on an IntrinsicFunction or Builtin return CallMeta(Any, false) @@ -805,7 +800,8 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::U end rt = builtin_tfunction(interp, f, argtypes[2:end], sv) if f === getfield && isa(fargs, Vector{Any}) && la == 3 && isa(argtypes[3], Const) && isa(argtypes[3].val, Int) && argtypes[2] ⊑ Tuple - cti, _ = precise_container_type(interp, nothing, argtypes[2], sv) + # TODO: why doesn't this use the getfield_tfunc? + cti, _ = precise_container_type(interp, iterate, argtypes[2], sv) idx = argtypes[3].val if 1 <= idx <= length(cti) rt = unwrapva(cti[idx]) @@ -923,11 +919,7 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f), la = length(argtypes) if isa(f, Builtin) - if f === _apply - ft = argtype_by_index(argtypes, 2) - ft === Bottom && return CallMeta(Bottom, false) - return abstract_apply(interp, nothing, ft, argtype_tail(argtypes, 3), sv, max_methods) - elseif f === _apply_iterate + if f === _apply_iterate itft = argtype_by_index(argtypes, 2) ft = argtype_by_index(argtypes, 3) (itft === Bottom || ft === Bottom) && return CallMeta(Bottom, false) diff --git a/base/compiler/compiler.jl b/base/compiler/compiler.jl index 37e281f2f2724..0b1d03f61b704 100644 --- a/base/compiler/compiler.jl +++ b/base/compiler/compiler.jl @@ -1,11 +1,11 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -getfield(getfield(Main, :Core), :eval)(getfield(Main, :Core), :(baremodule Compiler +getfield(Core, :eval)(Core, :(baremodule Compiler using Core.Intrinsics, Core.IR import Core: print, println, show, write, unsafe_write, stdout, stderr, - _apply, _apply_iterate, svec, apply_type, Builtin, IntrinsicFunction, + _apply_iterate, svec, apply_type, Builtin, IntrinsicFunction, MethodInstance, CodeInstance, MethodMatch const getproperty = Core.getfield diff --git a/base/compiler/optimize.jl b/base/compiler/optimize.jl index 9d9bc45dc1e9f..f66d797b866db 100644 --- a/base/compiler/optimize.jl +++ b/base/compiler/optimize.jl @@ -326,19 +326,19 @@ function statement_cost(ex::Expr, line::Int, src::CodeInfo, sptypes::Vector{Any} # The efficiency of operations like a[i] and s.b # depend strongly on whether the result can be # inferred, so check the type of ex - if f === Main.Core.getfield || f === Main.Core.tuple + if f === Core.getfield || f === Core.tuple # we might like to penalize non-inferrability, but # tuple iteration/destructuring makes that impossible # return plus_saturate(argcost, isknowntype(extyp) ? 1 : params.inline_nonleaf_penalty) return 0 - elseif f === Main.Core.isa + elseif f === Core.isa # If we're in a union context, we penalize type computations # on union types. In such cases, it is usually better to perform # union splitting on the outside. if union_penalties && isa(argextype(ex.args[2], src, sptypes, slottypes), Union) return params.inline_nonleaf_penalty end - elseif (f === Main.Core.arrayref || f === Main.Core.const_arrayref) && length(ex.args) >= 3 + elseif (f === Core.arrayref || f === Core.const_arrayref) && length(ex.args) >= 3 atyp = argextype(ex.args[3], src, sptypes, slottypes) return isknowntype(atyp) ? 4 : error_path ? params.inline_error_path_cost : params.inline_nonleaf_penalty end diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 22b905096d85e..043272fed7f1c 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -573,7 +573,7 @@ function batch_inline!(todo::Vector{Pair{Int, Any}}, ir::IRCode, linetable::Vect return ir end -# This assumes the caller has verified that all arguments to the _apply call are Tuples. +# This assumes the caller has verified that all arguments to the _apply_iterate call are Tuples. function rewrite_apply_exprargs!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int, argexprs::Vector{Any}, atypes::Vector{Any}, arginfos::Vector{Any}, arg_start::Int, et::Union{EdgeTracker, Nothing}, caches::Union{InferenceCaches, Nothing}, @@ -909,7 +909,7 @@ end function inline_apply!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int, sig::Signature, et, caches, params::OptimizationParams) stmt = ir.stmts[idx][:inst] - while sig.f === Core._apply || sig.f === Core._apply_iterate + while sig.f === Core._apply_iterate info = ir.stmts[idx][:info] if isa(info, UnionSplitApplyCallInfo) if length(info.infos) != 1 @@ -923,7 +923,7 @@ function inline_apply!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int, sig:: @assert info === nothing || info === false new_info = info = nothing end - arg_start = sig.f === Core._apply ? 2 : 3 + arg_start = 3 atypes = sig.atypes if arg_start > length(atypes) return nothing @@ -1010,7 +1010,7 @@ function process_simple!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int, sta sig = call_sig(ir, stmt) sig === nothing && return nothing - # Handle _apply + # Handle _apply_iterate sig = inline_apply!(ir, todo, idx, sig, state.et, state.caches, state.params) sig === nothing && return nothing diff --git a/base/compiler/types.jl b/base/compiler/types.jl index 1a1cbb0890e65..24e8c24379886 100644 --- a/base/compiler/types.jl +++ b/base/compiler/types.jl @@ -102,14 +102,14 @@ struct InferenceParams # before computing the set of matching methods MAX_UNION_SPLITTING::Int # the maximum number of union-tuples to swap / expand - # when inferring a call to _apply + # when inferring a call to _apply_iterate MAX_APPLY_UNION_ENUM::Int # parameters limiting large (tuple) types TUPLE_COMPLEXITY_LIMIT_DEPTH::Int - # when attempting to inlining _apply, abort the optimization if the tuple - # contains more than this many elements + # when attempting to inline _apply_iterate, abort the optimization if the + # tuple contains more than this many elements MAX_TUPLE_SPLAT::Int function InferenceParams(; diff --git a/src/builtin_proto.h b/src/builtin_proto.h index e66af64eb4118..c4d6166a5c194 100644 --- a/src/builtin_proto.h +++ b/src/builtin_proto.h @@ -22,7 +22,7 @@ extern "C" { DECLARE_BUILTIN(throw); DECLARE_BUILTIN(is); DECLARE_BUILTIN(typeof); DECLARE_BUILTIN(sizeof); DECLARE_BUILTIN(issubtype); DECLARE_BUILTIN(isa); -DECLARE_BUILTIN(_apply); DECLARE_BUILTIN(_apply_pure); +DECLARE_BUILTIN(_apply_pure); DECLARE_BUILTIN(_call_latest); DECLARE_BUILTIN(_apply_iterate); DECLARE_BUILTIN(_call_in_world); DECLARE_BUILTIN(isdefined); DECLARE_BUILTIN(nfields); diff --git a/src/builtins.c b/src/builtins.c index 96637080af537..088203acda37e 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -525,7 +525,7 @@ STATIC_INLINE void _grow_to(jl_value_t **root, jl_value_t ***oldargs, jl_svec_t static jl_function_t *jl_iterate_func JL_GLOBALLY_ROOTED; -static jl_value_t *do_apply(jl_value_t *F, jl_value_t **args, uint32_t nargs, jl_value_t *iterate) +static jl_value_t *do_apply( jl_value_t **args, uint32_t nargs, jl_value_t *iterate) { jl_function_t *f = args[0]; if (nargs == 2) { @@ -567,12 +567,7 @@ static jl_value_t *do_apply(jl_value_t *F, jl_value_t **args, uint32_t nargs, jl } } if (extra && iterate == NULL) { - if (jl_iterate_func == NULL) { - jl_iterate_func = jl_get_function(jl_top_module, "iterate"); - if (jl_iterate_func == NULL) - jl_undefined_var_error(jl_symbol("iterate")); - } - iterate = jl_iterate_func; + jl_undefined_var_error(jl_symbol("iterate")); } // allocate space for the argument array and gc roots for it // based on our previous estimates @@ -696,13 +691,7 @@ static jl_value_t *do_apply(jl_value_t *F, jl_value_t **args, uint32_t nargs, jl JL_CALLABLE(jl_f__apply_iterate) { JL_NARGSV(_apply_iterate, 2); - return do_apply(F, args+1, nargs-1, args[0]); -} - -JL_CALLABLE(jl_f__apply) -{ - JL_NARGSV(_apply, 1); - return do_apply(F, args, nargs, NULL); + return do_apply(args + 1, nargs - 1, args[0]); } // this is like `_apply`, but with quasi-exact checks to make sure it is pure @@ -720,7 +709,7 @@ JL_CALLABLE(jl_f__apply_pure) // and `promote` works better this way size_t last_age = ptls->world_age; ptls->world_age = jl_world_counter; - ret = jl_f__apply(NULL, args, nargs); + ret = do_apply(args, nargs, NULL); ptls->world_age = last_age; ptls->in_pure_callback = last_in; } @@ -1578,7 +1567,6 @@ void jl_init_primitives(void) JL_GC_DISABLED // internal functions jl_builtin_apply_type = add_builtin_func("apply_type", jl_f_apply_type); - jl_builtin__apply = add_builtin_func("_apply", jl_f__apply); jl_builtin__apply_iterate = add_builtin_func("_apply_iterate", jl_f__apply_iterate); jl_builtin__expr = add_builtin_func("_expr", jl_f__expr); jl_builtin_svec = add_builtin_func("svec", jl_f_svec); diff --git a/src/codegen.cpp b/src/codegen.cpp index 83fcf690215f7..40f0999667b09 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -838,7 +838,6 @@ static const std::map builtin_func_map = { { &jl_f_isa, new JuliaFunction{"jl_f_isa", get_func_sig, get_func_attrs} }, { &jl_f_typeassert, new JuliaFunction{"jl_f_typeassert", get_func_sig, get_func_attrs} }, { &jl_f_ifelse, new JuliaFunction{"jl_f_ifelse", get_func_sig, get_func_attrs} }, - { &jl_f__apply, new JuliaFunction{"jl_f__apply", get_func_sig, get_func_attrs} }, { &jl_f__apply_iterate, new JuliaFunction{"jl_f__apply_iterate", get_func_sig, get_func_attrs} }, { &jl_f__apply_pure, new JuliaFunction{"jl_f__apply_pure", get_func_sig, get_func_attrs} }, { &jl_f__call_latest, new JuliaFunction{"jl_f__call_latest", get_func_sig, get_func_attrs} }, @@ -2684,13 +2683,11 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } } - else if (((f == jl_builtin__apply && nargs == 2) || - (f == jl_builtin__apply_iterate && nargs == 3)) && ctx.vaSlot > 0) { - int arg_start = f == jl_builtin__apply ? 2 : 3; - // turn Core._apply(f, Tuple) ==> f(Tuple...) using the jlcall calling convention if Tuple is the va allocation - if (LoadInst *load = dyn_cast_or_null(argv[arg_start].V)) { + else if ((f == jl_builtin__apply_iterate && nargs == 3) && ctx.vaSlot > 0) { + // turn Core._apply_iterate(iter, f, Tuple) ==> f(Tuple...) using the jlcall calling convention if Tuple is the va allocation + if (LoadInst *load = dyn_cast_or_null(argv[3].V)) { if (load->getPointerOperand() == ctx.slots[ctx.vaSlot].boxroot && ctx.argArray) { - Value *theF = boxed(ctx, argv[arg_start-1]); + Value *theF = boxed(ctx, argv[2]); Value *nva = emit_n_varargs(ctx); #ifdef _P64 nva = ctx.builder.CreateTrunc(nva, T_int32); diff --git a/src/module.c b/src/module.c index 3bc1f22ea4cbc..20c119bedc27c 100644 --- a/src/module.c +++ b/src/module.c @@ -623,6 +623,8 @@ JL_DLLEXPORT jl_value_t *jl_get_global(jl_module_t *m, jl_sym_t *var) JL_DLLEXPORT void jl_set_global(jl_module_t *m JL_ROOTING_ARGUMENT, jl_sym_t *var, jl_value_t *val JL_ROOTED_ARGUMENT) { + JL_TYPECHK(jl_set_global, module, (jl_value_t*)m); + JL_TYPECHK(jl_set_global, symbol, (jl_value_t*)var); jl_binding_t *bp = jl_get_binding_wr(m, var, 1); JL_GC_PROMISE_ROOTED(bp); jl_checked_assignment(bp, val); diff --git a/src/staticdata.c b/src/staticdata.c index 1b827bd12af17..9b599c0ff1a7f 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -30,7 +30,7 @@ extern "C" { // TODO: put WeakRefs on the weak_refs list during deserialization // TODO: handle finalizers -#define NUM_TAGS 145 +#define NUM_TAGS 144 // An array of references that need to be restored from the sysimg // This is a manually constructed dual of the gvars array, which would be produced by codegen for Julia code, for C. @@ -175,7 +175,6 @@ jl_value_t **const*const get_tags(void) { INSERT_TAG(jl_builtin_issubtype); INSERT_TAG(jl_builtin_isa); INSERT_TAG(jl_builtin_typeassert); - INSERT_TAG(jl_builtin__apply); INSERT_TAG(jl_builtin__apply_iterate); INSERT_TAG(jl_builtin_isdefined); INSERT_TAG(jl_builtin_nfields); @@ -235,7 +234,7 @@ void *native_functions; // This is a manually constructed dual of the fvars array, which would be produced by codegen for Julia code, for C. static const jl_fptr_args_t id_to_fptrs[] = { &jl_f_throw, &jl_f_is, &jl_f_typeof, &jl_f_issubtype, &jl_f_isa, - &jl_f_typeassert, &jl_f__apply, &jl_f__apply_iterate, &jl_f__apply_pure, + &jl_f_typeassert, &jl_f__apply_iterate, &jl_f__apply_pure, &jl_f__call_latest, &jl_f__call_in_world, &jl_f_isdefined, &jl_f_tuple, &jl_f_svec, &jl_f_intrinsic_call, &jl_f_invoke_kwsorter, &jl_f_getfield, &jl_f_setfield, &jl_f_fieldtype, &jl_f_nfields, diff --git a/src/toplevel.c b/src/toplevel.c index 5ddf139e5f086..56523f2d09b54 100644 --- a/src/toplevel.c +++ b/src/toplevel.c @@ -45,15 +45,13 @@ JL_DLLEXPORT void jl_add_standard_imports(jl_module_t *m) // create a new top-level module void jl_init_main_module(void) { - if (jl_main_module != NULL) - jl_error("Main module already initialized."); - + assert(jl_main_module == NULL); jl_main_module = jl_new_module(jl_symbol("Main")); jl_main_module->parent = jl_main_module; jl_set_const(jl_main_module, jl_symbol("Core"), (jl_value_t*)jl_core_module); - jl_set_global(jl_core_module, jl_symbol("Main"), - (jl_value_t*)jl_main_module); + jl_set_const(jl_core_module, jl_symbol("Main"), + (jl_value_t*)jl_main_module); } static jl_function_t *jl_module_get_initializer(jl_module_t *m JL_PROPAGATES_ROOT) diff --git a/stdlib/InteractiveUtils/src/macros.jl b/stdlib/InteractiveUtils/src/macros.jl index dd637c8169b87..3805e2e97832b 100644 --- a/stdlib/InteractiveUtils/src/macros.jl +++ b/stdlib/InteractiveUtils/src/macros.jl @@ -153,12 +153,12 @@ function gen_call_with_extracted_types(__module__, fcn, ex0, kws=Expr[]) exret = Expr(:none) if ex.head === :call if any(e->(isa(e, Expr) && e.head === :(...)), ex0.args) && - (ex.args[1] === GlobalRef(Core,:_apply) || - ex.args[1] === GlobalRef(Base,:_apply)) + (ex.args[1] === GlobalRef(Core,:_apply_iterate) || + ex.args[1] === GlobalRef(Base,:_apply_iterate)) # check for splatting - exret = Expr(:call, ex.args[1], fcn, - Expr(:tuple, esc(ex.args[2]), - Expr(:call, typesof, map(esc, ex.args[3:end])...))) + exret = Expr(:call, ex.args[2], fcn, + Expr(:tuple, esc(ex.args[3]), + Expr(:call, typesof, map(esc, ex.args[4:end])...))) else exret = Expr(:call, fcn, esc(ex.args[1]), Expr(:call, typesof, map(esc, ex.args[2:end])...), kws...) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 304a704856ebb..df9d511c90b07 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -855,7 +855,7 @@ end aa20704(x) = x(nothing) @test code_typed(aa20704, (typeof(a20704),))[1][1].pure -#issue #21065, elision of _apply when splatted expression is not effect_free +#issue #21065, elision of _apply_iterate when splatted expression is not effect_free function f21065(x,y) println("x=$x, y=$y") return x, y @@ -865,7 +865,7 @@ function test_no_apply(expr::Expr) return all(test_no_apply, expr.args) end function test_no_apply(ref::GlobalRef) - return ref.mod != Core || ref.name !== :_apply + return ref.mod != Core || ref.name !== :_apply_iterate end test_no_apply(::Any) = true @test all(test_no_apply, code_typed(g21065, Tuple{Int,Int})[1].first.code) @@ -2041,6 +2041,7 @@ T27078 = Vector{Vector{T}} where T # issue #28070 g28070(f, args...) = f(args...) @test @inferred g28070(Core._apply, Base.:/, (1.0, 1.0)) == 1.0 +@test @inferred g28070(Core._apply_iterate, Base.iterate, Base.:/, (1.0, 1.0)) == 1.0 # issue #28079 struct Foo28079 end @@ -2298,9 +2299,9 @@ end @test @inferred(g28955((1,), 1.0)) === Bool -# Test that inlining can look through repeated _applys +# Test that inlining can look through repeated _apply_iterates foo_inlining_apply(args...) = ccall(:jl_, Nothing, (Any,), args[1]) -bar_inlining_apply() = Core._apply(Core._apply, (foo_inlining_apply,), ((1,),)) +bar_inlining_apply() = Core._apply_iterate(iterate, Core._apply_iterate, (iterate,), (foo_inlining_apply,), ((1,),)) let ci = code_typed(bar_inlining_apply, Tuple{})[1].first @test length(ci.code) == 2 @test ci.code[1].head == :foreigncall diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index 2c1992ccd2cd8..8f7c6b831e185 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -175,7 +175,7 @@ end # 2 for now because the compiler leaves a GotoNode around @test_broken length(code_typed(f_ifelse, (String,))[1][1].code) <= 2 -# Test that inlining of _apply properly hits the inference cache +# Test that inlining of _apply_iterate properly hits the inference cache @noinline cprop_inline_foo1() = (1, 1) @noinline cprop_inline_foo2() = (2, 2) function cprop_inline_bar(x...) From 66c9f6a9b58130d35fa9cf10a7e16daf5847e575 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 7 Jan 2021 11:58:28 -0500 Subject: [PATCH 040/239] fix #39117, overly-specific type from `default_eltype` (#39130) --- base/array.jl | 16 +++++++++++++++- test/dict.jl | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/base/array.jl b/base/array.jl index 854842e5132de..e81d26294c5d8 100644 --- a/base/array.jl +++ b/base/array.jl @@ -624,6 +624,20 @@ function _collect_indices(indsA, A) copyto!(B, CartesianIndices(axes(B)), A, CartesianIndices(indsA)) end +# NOTE: this function is not meant to be called, only inferred, for the +# purpose of bounding the types of values generated by an iterator. +function _iterator_upper_bound(itr) + x = iterate(itr) + while x !== nothing + val = getfield(x, 1) + if inferencebarrier(nothing) + return val + end + x = iterate(itr, getfield(x, 2)) + end + throw(nothing) +end + # define this as a macro so that the call to Core.Compiler # gets inlined into the caller before recursion detection # gets a chance to see it, so that recursive calls to the caller @@ -635,7 +649,7 @@ if isdefined(Core, :Compiler) if $I isa Generator && ($I).f isa Type ($I).f else - Core.Compiler.return_type(first, Tuple{typeof($I)}) + Core.Compiler.return_type(_iterator_upper_bound, Tuple{typeof($I)}) end end end diff --git a/test/dict.jl b/test/dict.jl index 07d9855016e98..c8baa7a6c7159 100644 --- a/test/dict.jl +++ b/test/dict.jl @@ -159,6 +159,9 @@ end d = Dict(i==1 ? (1=>2) : (2.0=>3.0) for i=1:2) @test isa(d, Dict{Real,Real}) @test d == Dict{Real,Real}(2.0=>3.0, 1=>2) + + # issue #39117 + @test Dict(t[1]=>t[2] for t in zip((1,"2"), (2,"2"))) == Dict{Any,Any}(1=>2, "2"=>"2") end @testset "type of Dict constructed from varargs of Pairs" begin From 6c421908c0ea13cdc98f21aa299b03e3f0b09257 Mon Sep 17 00:00:00 2001 From: Debaditya Pal Date: Fri, 8 Jan 2021 01:57:24 +0530 Subject: [PATCH 041/239] added automatic keyword assignment support to test macro (#38270) * added automatic keyword assignment support to @test macro * added some tests for test macro using atol keyword * x = a.x syntax support added * Update stdlib/Test/src/Test.jl Co-authored-by: Simeon Schaub Co-authored-by: Simeon Schaub --- stdlib/Test/src/Test.jl | 4 ++++ stdlib/Test/test/runtests.jl | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index c14678903f0aa..ceee6ae727648 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -487,6 +487,10 @@ function get_test_result(ex, source) push!(escaped_kwargs, Expr(:call, :(=>), QuoteNode(a.args[1]), esc(a.args[2]))) elseif isa(a, Expr) && a.head === :... push!(escaped_kwargs, Expr(:..., esc(a.args[1]))) + elseif isa(a, Expr) && a.head === :. + push!(escaped_kwargs, Expr(:call, :(=>), QuoteNode(a.args[2].value), esc(Expr(:., a.args[1], QuoteNode(a.args[2].value))))) + elseif isa(a, Symbol) + push!(escaped_kwargs, Expr(:call, :(=>), QuoteNode(a), esc(a))) end end end diff --git a/stdlib/Test/test/runtests.jl b/stdlib/Test/test/runtests.jl index 140553f134f56..541e8dcc2bf7d 100644 --- a/stdlib/Test/test/runtests.jl +++ b/stdlib/Test/test/runtests.jl @@ -8,6 +8,8 @@ using Distributed: RemoteException import Logging: Debug, Info, Warn @testset "@test" begin + atol = 1 + a = (; atol=2) @test true @test 1 == 1 @test 1 != 2 @@ -20,11 +22,16 @@ import Logging: Debug, Info, Warn @test isapprox(1, 1, atol=0.1) @test isapprox(1, 1; atol=0.1) @test isapprox(1, 1; [(:atol, 0)]...) + @test isapprox(1, 2; atol) + @test isapprox(1, 3; a.atol) end @testset "@test keyword precedence" begin + atol = 2 # post-semicolon keyword, suffix keyword, pre-semicolon keyword @test isapprox(1, 2, atol=0) atol=1 @test isapprox(1, 3, atol=0; atol=2) atol=1 + @test isapprox(1, 2, atol=0; atol) + @test isapprox(1, 3, atol=0; atol) atol=1 end @testset "@test should only evaluate the arguments once" begin g = Int[] From 83bee67631bc3d532b6b0bc47b02753ad5865673 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 7 Jan 2021 21:28:41 -0500 Subject: [PATCH 042/239] fix some compiler warnings (#39142) - unused jl_iterate_func - cast type of realloc in jl_init_threading --- src/builtins.c | 2 -- src/threading.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/builtins.c b/src/builtins.c index 088203acda37e..076e1c4fc44f2 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -523,8 +523,6 @@ STATIC_INLINE void _grow_to(jl_value_t **root, jl_value_t ***oldargs, jl_svec_t *n_alloc = newalloc; } -static jl_function_t *jl_iterate_func JL_GLOBALLY_ROOTED; - static jl_value_t *do_apply( jl_value_t **args, uint32_t nargs, jl_value_t *iterate) { jl_function_t *f = args[0]; diff --git a/src/threading.c b/src/threading.c index ffdcd578f34ae..764cee355a94b 100644 --- a/src/threading.c +++ b/src/threading.c @@ -407,8 +407,8 @@ void jl_init_threading(void) } if (jl_n_threads <= 0) jl_n_threads = 1; - jl_measure_compile_time = realloc( jl_measure_compile_time, jl_n_threads * sizeof *jl_measure_compile_time ); - jl_cumulative_compile_time = realloc( jl_cumulative_compile_time, jl_n_threads * sizeof *jl_cumulative_compile_time ); + jl_measure_compile_time = (uint8_t*)realloc(jl_measure_compile_time, jl_n_threads * sizeof(*jl_measure_compile_time)); + jl_cumulative_compile_time = (uint64_t*)realloc(jl_cumulative_compile_time, jl_n_threads * sizeof(*jl_cumulative_compile_time)); #ifndef __clang_analyzer__ jl_all_tls_states = (jl_ptls_t*)calloc(jl_n_threads, sizeof(void*)); #endif From 6cff73f43ebef43d766dce29652b77ff756aa008 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 8 Jan 2021 04:32:34 -0500 Subject: [PATCH 043/239] make methods of `alloc_buf_hook` return the same types (#39141) --- base/stream.jl | 2 +- stdlib/Sockets/src/Sockets.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/stream.jl b/base/stream.jl index 9ce58744b53f1..f3e252a58a9ab 100644 --- a/base/stream.jl +++ b/base/stream.jl @@ -554,7 +554,7 @@ function alloc_request(buffer::IOBuffer, recommended_size::UInt) ensureroom(buffer, Int(recommended_size)) ptr = buffer.append ? buffer.size + 1 : buffer.ptr nb = min(length(buffer.data), buffer.maxsize) - ptr + 1 - return (pointer(buffer.data, ptr), nb) + return (Ptr{Cvoid}(pointer(buffer.data, ptr)), nb) end notify_filled(buffer::IOBuffer, nread::Int, base::Ptr{Cvoid}, len::UInt) = notify_filled(buffer, nread) diff --git a/stdlib/Sockets/src/Sockets.jl b/stdlib/Sockets/src/Sockets.jl index 99dab5e61e01e..65884bc190cac 100644 --- a/stdlib/Sockets/src/Sockets.jl +++ b/stdlib/Sockets/src/Sockets.jl @@ -367,7 +367,7 @@ function recvfrom(sock::UDPSocket) end end -alloc_buf_hook(sock::UDPSocket, size::UInt) = (Libc.malloc(size), size) # size is always 64k from libuv +alloc_buf_hook(sock::UDPSocket, size::UInt) = (Libc.malloc(size), Int(size)) # size is always 64k from libuv function uv_recvcb(handle::Ptr{Cvoid}, nread::Cssize_t, buf::Ptr{Cvoid}, addr::Ptr{Cvoid}, flags::Cuint) sock = @handle_as handle UDPSocket From 438f9cb46d48581e0e886e8f7e7d1213d5463ada Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 8 Jan 2021 13:32:56 -0500 Subject: [PATCH 044/239] Core printing: improve show of methods (#39135) This adds their environment, so that their TypeVars will print correctly. --- src/rtutils.c | 52 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/src/rtutils.c b/src/rtutils.c index 77d202c3f4a89..09ba2aed85075 100644 --- a/src/rtutils.c +++ b/src/rtutils.c @@ -1199,55 +1199,71 @@ JL_DLLEXPORT size_t jl_static_show(JL_STREAM *out, jl_value_t *v) JL_NOTSAFEPOIN JL_DLLEXPORT size_t jl_static_show_func_sig(JL_STREAM *s, jl_value_t *type) JL_NOTSAFEPOINT { + size_t n = 0; + size_t i; jl_value_t *ftype = (jl_value_t*)jl_first_argument_datatype(type); if (ftype == NULL) return jl_static_show(s, type); - size_t n = 0; + jl_unionall_t *tvars = (jl_unionall_t*)type; + int nvars = jl_subtype_env_size(type); + struct recur_list *depth = NULL; + if (nvars > 0) { + depth = (struct recur_list*)alloca(sizeof(struct recur_list) * nvars); + for (i = 0; i < nvars; i++) { + depth[i].prev = i == 0 ? NULL : &depth[i - 1]; + depth[i].v = type; + type = ((jl_unionall_t*)type)->body; + } + depth += nvars - 1; + } + if (!jl_is_datatype(type)) { + n += jl_static_show(s, type); + return n; + } if (jl_nparams(ftype) == 0 || ftype == ((jl_datatype_t*)ftype)->name->wrapper) { n += jl_printf(s, "%s", jl_symbol_name(((jl_datatype_t*)ftype)->name->mt->name)); } else { n += jl_printf(s, "(::"); - n += jl_static_show(s, ftype); + n += jl_static_show_x(s, ftype, depth); n += jl_printf(s, ")"); } - jl_unionall_t *tvars = (jl_unionall_t*)type; - type = jl_unwrap_unionall(type); - if (!jl_is_datatype(type)) { - n += jl_printf(s, " "); - n += jl_static_show(s, type); - return n; - } size_t tl = jl_nparams(type); n += jl_printf(s, "("); - size_t i; for (i = 1; i < tl; i++) { jl_value_t *tp = jl_tparam(type, i); if (i != tl - 1) { - n += jl_static_show(s, tp); + n += jl_static_show_x(s, tp, depth); n += jl_printf(s, ", "); } else { - if (jl_is_vararg(tp)) { - n += jl_static_show(s, jl_unwrap_vararg(tp)); + if (jl_vararg_kind(tp) == JL_VARARG_UNBOUND) { + tp = jl_unwrap_vararg(tp); + if (jl_is_unionall(tp)) + n += jl_printf(s, "("); + n += jl_static_show_x(s, tp, depth); + if (jl_is_unionall(tp)) + n += jl_printf(s, ")"); n += jl_printf(s, "..."); } else { - n += jl_static_show(s, tp); + n += jl_static_show_x(s, tp, depth); } } } n += jl_printf(s, ")"); if (jl_is_unionall(tvars)) { + depth -= nvars - 1; int first = 1; n += jl_printf(s, " where {"); while (jl_is_unionall(tvars)) { - if (first) - first = 0; - else + if (!first) n += jl_printf(s, ", "); - n += jl_static_show(s, (jl_value_t*)tvars->var); + n += jl_static_show_x(s, (jl_value_t*)tvars->var, first ? NULL : depth); tvars = (jl_unionall_t*)tvars->body; + if (!first) + depth += 1; + first = 0; } n += jl_printf(s, "}"); } From ca075469eb2f09575946e8d122200c6e4d3b0697 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Fri, 8 Jan 2021 19:34:09 +0100 Subject: [PATCH 045/239] fix count(::BitArray; dims) (#39149) Not sure why this worked before #37461, perhaps #9498? --- base/bitarray.jl | 2 +- test/bitarray.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/base/bitarray.jl b/base/bitarray.jl index 94bb94e5a4d03..acc96f7284a54 100644 --- a/base/bitarray.jl +++ b/base/bitarray.jl @@ -1394,7 +1394,7 @@ function bitcount(Bc::Vector{UInt64}; init::T=0) where {T} return n end -count(B::BitArray; init=0) = bitcount(B.chunks; init) +_count(::typeof(identity), B::BitArray, ::Colon, init) = bitcount(B.chunks; init) function unsafe_bitfindnext(Bc::Vector{UInt64}, start::Int) chunk_start = _div64(start-1)+1 diff --git a/test/bitarray.jl b/test/bitarray.jl index ebc99e5fe9568..23cbeae1ffa5c 100644 --- a/test/bitarray.jl +++ b/test/bitarray.jl @@ -1221,6 +1221,7 @@ timesofar("datamove") end @test count(trues(2, 2), init=0x03) === 0x07 + @test count(trues(2, 2, 2), dims=2) == fill(2, 2, 1, 2) end timesofar("find") From 8937f7e522c9b3f96920d2f196f452c9f8a9e248 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 8 Jan 2021 23:17:39 -0500 Subject: [PATCH 046/239] gf: avoid adding cache entries wider than the original method (#39140) Sometimes we want to widen the compilation signature, but then end up with something which does not fit the original pattern. This then can cause problems later, when we try to use the Method (from the cache), but discover it does not actually match the call. Fixes #38999 --- src/gf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gf.c b/src/gf.c index 52ed2d75250e7..09ce60df23f13 100644 --- a/src/gf.c +++ b/src/gf.c @@ -650,7 +650,7 @@ static void jl_compilation_sig( else if (jl_is_type_type(elt)) { // elt isa Type{T} if (very_general_type(decl_i)) { /* - here's a fairly simple heuristic: if this argument slot's + Here's a fairly simple heuristic: if this argument slot's declared type is general (Type or Any), then don't specialize for every Type that got passed. @@ -665,8 +665,9 @@ static void jl_compilation_sig( x::TypeConstructor matches the first but not the second, while also matching all other TypeConstructors. This means neither Type{TC} nor TypeConstructor is more specific. + + But don't apply this heuristic if the argument is called (issue #36783). */ - // don't apply this heuristic if the argument is called (issue #36783) int iscalled = i_arg > 0 && i_arg <= 8 && (definition->called & (1 << (i_arg - 1))); if (!iscalled) { if (!*newparams) *newparams = jl_svec_copy(tt->parameters); @@ -676,13 +677,13 @@ static void jl_compilation_sig( else if (jl_is_type_type(jl_tparam0(elt)) && // try to give up on specializing type parameters for Type{Type{Type{...}}} (jl_is_type_type(jl_tparam0(jl_tparam0(elt))) || !jl_has_free_typevars(decl_i))) { - // TODO: this is probably solidly unsound and would corrupt the cache in many cases /* actual argument was Type{...}, we computed its type as - Type{Type{...}}. we must avoid unbounded nesting here, so - cache the signature as Type{T}, unless something more - specific like Type{Type{Int32}} was actually declared. - this can be determined using a type intersection. + Type{Type{...}}. we like to avoid unbounded nesting here, so + compile (and hopefully cache) the signature as Type{T}, + unless something more specific like Type{Type{Int32}} was + actually declared. this can be determined using a type + intersection. */ if (!*newparams) *newparams = jl_svec_copy(tt->parameters); if (i < nargs || !definition->isva) { @@ -1024,12 +1025,12 @@ static jl_method_instance_t *cache_method( intptr_t nspec = (mt == NULL || mt == jl_type_type_mt || mt == jl_nonfunction_mt ? definition->nargs + 1 : mt->max_args + 2); jl_compilation_sig(tt, sparams, definition, nspec, &newparams); if (newparams) { - cache_with_orig = 0; compilationsig = jl_apply_tuple_type(newparams); temp2 = (jl_value_t*)compilationsig; // In most cases `!jl_isa_compileable_sig(tt, definition))`, // although for some cases, (notably Varargs) // we might choose a replacement type that's preferable but not strictly better + cache_with_orig = !jl_subtype(compilationsig, definition->sig); } // TODO: maybe assert(jl_isa_compileable_sig(compilationsig, definition)); newmeth = jl_specializations_get_linfo(definition, (jl_value_t*)compilationsig, sparams); @@ -1038,7 +1039,6 @@ static jl_method_instance_t *cache_method( jl_svec_t* guardsigs = jl_emptysvec; if (!cache_with_orig && mt) { // now examine what will happen if we chose to use this sig in the cache - // TODO: should we first check `compilationsig <: definition`? size_t min_valid2 = 1; size_t max_valid2 = ~(size_t)0; temp = ml_matches(mt, 0, compilationsig, MAX_UNSPECIALIZED_CONFLICTS, 1, 1, world, 0, &min_valid2, &max_valid2, NULL); From 1393310fc74c3645faecaaf70d399654de7d6aa0 Mon Sep 17 00:00:00 2001 From: Marius Millea Date: Sat, 9 Jan 2021 12:02:56 -0800 Subject: [PATCH 047/239] fix logdet(Diagonal{<:Real}) with negative entries (#39158) --- stdlib/LinearAlgebra/src/diagonal.jl | 1 - stdlib/LinearAlgebra/test/diagonal.jl | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/src/diagonal.jl b/stdlib/LinearAlgebra/src/diagonal.jl index 467dea057bd9e..0426945e24e73 100644 --- a/stdlib/LinearAlgebra/src/diagonal.jl +++ b/stdlib/LinearAlgebra/src/diagonal.jl @@ -595,7 +595,6 @@ function diag(D::Diagonal, k::Integer=0) end tr(D::Diagonal) = sum(tr, D.diag) det(D::Diagonal) = prod(det, D.diag) -logdet(D::Diagonal{<:Real}) = sum(log, D.diag) function logdet(D::Diagonal{<:Complex}) # make sure branch cut is correct z = sum(log, D.diag) complex(real(z), rem2pi(imag(z), RoundNearest)) diff --git a/stdlib/LinearAlgebra/test/diagonal.jl b/stdlib/LinearAlgebra/test/diagonal.jl index 883e6b9b37107..26d4b81627e19 100644 --- a/stdlib/LinearAlgebra/test/diagonal.jl +++ b/stdlib/LinearAlgebra/test/diagonal.jl @@ -361,6 +361,8 @@ Random.seed!(1) d2, s2 = logabsdet(lM) @test d1 ≈ d2 @test s1 == s2 + @test logdet(Diagonal(relty[-1,-2])) ≈ log(2) + @test_throws DomainError logdet(Diagonal(relty[-1,-2,-3])) end @testset "similar" begin From e57501c25abfdae782b4234912ebc86aea72a659 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Sun, 10 Jan 2021 08:43:31 +0900 Subject: [PATCH 048/239] minor code quality improvements (#39159) --- base/accumulate.jl | 2 +- base/toml_parser.jl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/base/accumulate.jl b/base/accumulate.jl index fe06dbc1c2c70..f90f85b315d7c 100644 --- a/base/accumulate.jl +++ b/base/accumulate.jl @@ -441,7 +441,7 @@ function _accumulate1!(op, B, v1, A::AbstractVector, dim::Integer) inds = LinearIndices(A) inds == LinearIndices(B) || throw(DimensionMismatch("LinearIndices of A and B don't match")) dim > 1 && return copyto!(B, A) - (i1, state) = iterate(inds) # We checked earlier that A isn't empty + (i1, state) = iterate(inds)::NTuple{2,Any} # We checked earlier that A isn't empty cur_val = v1 B[i1] = cur_val next = iterate(inds, state) diff --git a/base/toml_parser.jl b/base/toml_parser.jl index 32e0593c1fdc9..d872cfac60864 100644 --- a/base/toml_parser.jl +++ b/base/toml_parser.jl @@ -658,9 +658,12 @@ end function push!!(v::Vector, el) T = eltype(v) - if el isa T || typeof(el) === T + t = typeof(el) + if el isa T || t === T push!(v, el::T) return v + elseif T === Union{} + return t[el] else if typeof(T) === Union newT = Any From ffa966ee227b8133ed20c5bdb07af2b2ae8f4fd9 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Sat, 9 Jan 2021 18:49:00 -0500 Subject: [PATCH 049/239] Remove start_repl_server code from REPL module (#39162) `REPL.start_repl_server(port::Int)` uses outdated API and no longer functions. It should be removed. ```julia julia> import REPL julia> REPL.start_repl_server(8080) ERROR: MethodError: no method matching listen(::REPL.var"#80#81", ::Int64) ``` --- stdlib/REPL/src/REPL.jl | 8 -------- 1 file changed, 8 deletions(-) diff --git a/stdlib/REPL/src/REPL.jl b/stdlib/REPL/src/REPL.jl index 6b6c37425e70b..68f157322facc 100644 --- a/stdlib/REPL/src/REPL.jl +++ b/stdlib/REPL/src/REPL.jl @@ -1232,12 +1232,4 @@ function run_frontend(repl::StreamREPL, backend::REPLBackendRef) nothing end -function start_repl_server(port::Int) - return listen(port) do server, status - client = accept(server) - run_repl(client) - nothing - end -end - end # module From 2924cb038fd61464304c363724fd8cf81d497afc Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Sat, 9 Jan 2021 19:01:21 -0500 Subject: [PATCH 050/239] subtype: rm dead code This code has been dead since #38136. Clean it up some. --- src/subtype.c | 102 +++++++++++++------------------------------------- 1 file changed, 27 insertions(+), 75 deletions(-) diff --git a/src/subtype.c b/src/subtype.c index 7dff42f12aae9..7d21ba3f20db2 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -708,8 +708,29 @@ static int var_occurs_invariant(jl_value_t *v, jl_tvar_t *var, int inv) JL_NOTSA return var_occurs_inside(v, var, 0, 1); } -static int with_tvar(tvar_callback callback, void *context, jl_unionall_t *u, int8_t R, jl_stenv_t *e, int param) +static jl_unionall_t *unalias_unionall(jl_unionall_t *u, jl_stenv_t *e) { + jl_varbinding_t *btemp = e->vars; + // if the var for this unionall (based on identity) already appears somewhere + // in the environment, rename to get a fresh var. + JL_GC_PUSH1(&u); + while (btemp != NULL) { + if (btemp->var == u->var || + // outer var can only refer to inner var if bounds changed + (btemp->lb != btemp->var->lb && jl_has_typevar(btemp->lb, u->var)) || + (btemp->ub != btemp->var->ub && jl_has_typevar(btemp->ub, u->var))) { + u = rename_unionall(u); + break; + } + btemp = btemp->prev; + } + JL_GC_POP(); + return u; +} + +static int subtype_unionall(jl_value_t *t, jl_unionall_t *u, jl_stenv_t *e, int8_t R, int param) +{ + u = unalias_unionall(u, e); jl_varbinding_t vb = { u->var, u->var->lb, u->var->ub, R, 0, 0, 0, 0, R ? e->Rinvdepth : e->invdepth, 0, NULL, 0, e->vars }; JL_GC_PUSH4(&u, &vb.lb, &vb.ub, &vb.innervars); @@ -717,7 +738,7 @@ static int with_tvar(tvar_callback callback, void *context, jl_unionall_t *u, in int ans; if (R) { e->envidx++; - ans = callback(context, R, e, param); + ans = subtype(t, u->body, e, param); e->envidx--; // widen Type{x} to typeof(x) in argument position if (!vb.occurs_inv) @@ -750,7 +771,8 @@ static int with_tvar(tvar_callback callback, void *context, jl_unionall_t *u, in } } else { - ans = callback(context, R, e, param); + ans = R ? subtype(t, u->body, e, param) : + subtype(u->body, t, e, param); } // handle the "diagonal dispatch" rule, which says that a type var occurring more @@ -802,53 +824,6 @@ static int with_tvar(tvar_callback callback, void *context, jl_unionall_t *u, in return ans; } -static jl_unionall_t *unalias_unionall(jl_unionall_t *u, jl_stenv_t *e) -{ - jl_varbinding_t *btemp = e->vars; - // if the var for this unionall (based on identity) already appears somewhere - // in the environment, rename to get a fresh var. - JL_GC_PUSH1(&u); - while (btemp != NULL) { - if (btemp->var == u->var || - // outer var can only refer to inner var if bounds changed - (btemp->lb != btemp->var->lb && jl_has_typevar(btemp->lb, u->var)) || - (btemp->ub != btemp->var->ub && jl_has_typevar(btemp->ub, u->var))) { - u = rename_unionall(u); - break; - } - btemp = btemp->prev; - } - JL_GC_POP(); - return u; -} - -struct subtype_unionall_env { - jl_value_t *t; - jl_value_t *ubody; -}; - -static int subtype_unionall_callback(struct subtype_unionall_env *env, int8_t R, jl_stenv_t *s, int param) { - JL_GC_PROMISE_ROOTED(env->t); - JL_GC_PROMISE_ROOTED(env->ubody); - if (R) { - return subtype(env->t, env->ubody, s, param); - } - else { - return subtype(env->ubody, env->t, s, param); - } -} - -// compare UnionAll type `u` to `t`. `R==1` if `u` came from the right side of A <: B. -static int subtype_unionall(jl_value_t *t, jl_unionall_t *u, jl_stenv_t *e, int8_t R, int param) -{ - u = unalias_unionall(u, e); - struct subtype_unionall_env env = {t, u->body}; - JL_GC_PUSH1(&u); - int res = with_tvar((tvar_callback)subtype_unionall_callback, (void*)&env, u, R, e, param); - JL_GC_POP(); - return res; -} - // check n <: (length of vararg type v) static int check_vararg_length(jl_value_t *v, ssize_t n, jl_stenv_t *e) { @@ -1004,21 +979,7 @@ static int subtype_tuple_tail(struct subtype_tuple_env *env, int8_t R, jl_stenv_ if (env->i == env->lx-1 && env->vvx) { if (!env->vtx) { xi = jl_tparam(env->xd, env->i); - // Unbounded vararg on the LHS without vararg on the RHS should - // have been caught earlier. - assert(env->vvy || !jl_is_unionall(xi)); - if (jl_is_unionall(xi)) { - // TODO: If !var_occurs_inside(jl_tparam0(xid), p1, 0, 1), - // we could avoid introducing the tvar into the environment - jl_unionall_t *u = (jl_unionall_t*)xi; - u = unalias_unionall(u, e); - env->vtx = (jl_value_t*)u; - // goto loop, but with the tvar introduced - JL_GC_PUSH1(&u); - int res = with_tvar((tvar_callback)subtype_tuple_tail, env, u, 0, e, param); - JL_GC_POP(); - return res; - } + assert(jl_is_vararg(xi)); env->vtx = xi; } xi = env->vtx; @@ -1032,16 +993,7 @@ static int subtype_tuple_tail(struct subtype_tuple_env *env, int8_t R, jl_stenv_ if (env->j == env->ly-1 && env->vvy) { if (!env->vty) { yi = jl_tparam(env->yd, env->j); - if (jl_is_unionall(yi)) { - jl_unionall_t *u = (jl_unionall_t*)yi; - u = unalias_unionall(u, e); - env->vty = (jl_value_t*)u; - // goto loop, but with the tvar introduced - JL_GC_PUSH1(&u); - int res = with_tvar((tvar_callback)subtype_tuple_tail, env, u, 1, e, param); - JL_GC_POP(); - return res; - } + assert(jl_is_vararg(yi)); env->vty = yi; } yi = env->vty; From aea60edd23044129df376f13d4d6aef1d7dc20b6 Mon Sep 17 00:00:00 2001 From: Thalassocracy <42811940+Thalassocracy@users.noreply.github.com> Date: Sat, 9 Jan 2021 19:50:50 -0500 Subject: [PATCH 051/239] Replace broken link in distributing.md --- doc/build/distributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/build/distributing.md b/doc/build/distributing.md index 579059603758c..8e74568c54b59 100644 --- a/doc/build/distributing.md +++ b/doc/build/distributing.md @@ -111,7 +111,7 @@ Windows The best supported method of creating a Julia distribution on Windows is to cross-compile from a Linux distribution such as Ubuntu. In-depth compilation instructions [are -available](https://github.com/JuliaLang/julia/blob/master/README.windows.md). +available](https://github.com/JuliaLang/julia/blob/master/doc/build/windows.md). However the important steps for redistribution are to ensure to `make win-extras` in between `make` and `make binary-dist`. After that process is completed, the `.zip` file created in the head Julia directory will From 09076da4fb51cad6fe36d4f5a8e3bac5569e7193 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Sat, 9 Jan 2021 20:09:41 -0500 Subject: [PATCH 052/239] subtype: Clean up tuple vararg path some more Now that we no longer need to introduce tvars, we can get rid of the closure env and reorganize the code a bit. --- src/subtype.c | 232 ++++++++++++++++++++++++-------------------------- 1 file changed, 112 insertions(+), 120 deletions(-) diff --git a/src/subtype.c b/src/subtype.c index 7d21ba3f20db2..6c87395933b95 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -857,10 +857,13 @@ struct subtype_tuple_env { jl_vararg_kind_t vvx, vvy; } JL_ROOTED_VALUE_COLLECTION; -static int subtype_tuple_varargs(struct subtype_tuple_env *env, jl_stenv_t *e, int param) +static int subtype_tuple_varargs( + jl_vararg_t *vtx, jl_vararg_t *vty, + size_t vx, size_t vy, + jl_stenv_t *e, int param) { - jl_value_t *xp0 = jl_unwrap_vararg(env->vtx); jl_value_t *xp1 = jl_unwrap_vararg_num(env->vtx); - jl_value_t *yp0 = jl_unwrap_vararg(env->vty); jl_value_t *yp1 = jl_unwrap_vararg_num(env->vty); + jl_value_t *xp0 = jl_unwrap_vararg(vtx); jl_value_t *xp1 = jl_unwrap_vararg_num(vtx); + jl_value_t *yp0 = jl_unwrap_vararg(vty); jl_value_t *yp1 = jl_unwrap_vararg_num(vty); if (!xp1) { jl_value_t *yl = yp1; @@ -877,31 +880,28 @@ static int subtype_tuple_varargs(struct subtype_tuple_env *env, jl_stenv_t *e, i } } else { - jl_value_t *xl = jl_unwrap_vararg_num(env->vtx); + jl_value_t *xl = jl_unwrap_vararg_num(vtx); if (jl_is_typevar(xl)) { jl_varbinding_t *xlv = lookup(e, (jl_tvar_t*)xl); if (xlv) xl = xlv->lb; } if (jl_is_long(xl)) { - if (jl_unbox_long(xl) + 1 == env->vx) { + if (jl_unbox_long(xl) + 1 == vx) { // LHS is exhausted. We're a subtype if the RHS is either // exhausted as well or unbounded (in which case we need to // set it to 0). - if (jl_is_vararg(env->vty)) { - jl_value_t *yl = jl_unwrap_vararg_num(env->vty); - if (yl) { - if (jl_is_typevar(yl)) { - jl_varbinding_t *ylv = lookup(e, (jl_tvar_t*)yl); - if (ylv) - yl = ylv->lb; - } - if (jl_is_long(yl)) { - return jl_unbox_long(yl) + 1 == env->vy; - } + jl_value_t *yl = jl_unwrap_vararg_num(vty); + if (yl) { + if (jl_is_typevar(yl)) { + jl_varbinding_t *ylv = lookup(e, (jl_tvar_t*)yl); + if (ylv) + yl = ylv->lb; } - } - else { + if (jl_is_long(yl)) { + return jl_unbox_long(yl) + 1 == vy; + } + } else { // We can skip the subtype check, but we still // need to make sure to constrain the length of y // to 0. @@ -955,10 +955,10 @@ static int subtype_tuple_varargs(struct subtype_tuple_env *env, jl_stenv_t *e, i e->invdepth++; e->Rinvdepth++; JL_GC_PUSH2(&xp1, &yp1); - if (xp1 && jl_is_long(xp1) && env->vx != 1) - xp1 = jl_box_long(jl_unbox_long(xp1) - env->vx + 1); - if (jl_is_long(yp1) && env->vy != 1) - yp1 = jl_box_long(jl_unbox_long(yp1) - env->vy + 1); + if (xp1 && jl_is_long(xp1) && vx != 1) + xp1 = jl_box_long(jl_unbox_long(xp1) - vx + 1); + if (jl_is_long(yp1) && vy != 1) + yp1 = jl_box_long(jl_unbox_long(yp1) - vy + 1); int ans = forall_exists_equal(xp1, yp1, e); JL_GC_POP(); e->invdepth--; @@ -966,65 +966,63 @@ static int subtype_tuple_varargs(struct subtype_tuple_env *env, jl_stenv_t *e, i return ans; } -static int subtype_tuple_tail(struct subtype_tuple_env *env, int8_t R, jl_stenv_t *e, int param) +static int subtype_tuple_tail(jl_datatype_t *xd, jl_datatype_t *yd, int8_t R, jl_stenv_t *e, int param) { - int x_reps = 1; -loop: // while (i <= lx) { - if (env->i >= env->lx) - goto done; + size_t lx = jl_nparams(xd); + size_t ly = jl_nparams(yd); + size_t i = 0, j = 0, vx = 0, vy = 0, x_reps = 1; + jl_value_t *lastx = NULL, *lasty = NULL; + jl_value_t *xi = NULL, *yi = NULL; - /* Get the type in the current index. If necessary introduce tvars for - varargs */ - jl_value_t *xi = NULL; - if (env->i == env->lx-1 && env->vvx) { - if (!env->vtx) { - xi = jl_tparam(env->xd, env->i); - assert(jl_is_vararg(xi)); - env->vtx = xi; + for (;;) { + if (i < lx) { + xi = jl_tparam(xd, i); + if (i == lx-1 && (vx || jl_is_vararg(xi))) { + vx += 1; } - xi = env->vtx; - } - else { - xi = jl_tparam(env->xd, env->i); } - jl_value_t *yi = NULL; - if (env->j < env->ly) { - if (env->j == env->ly-1 && env->vvy) { - if (!env->vty) { - yi = jl_tparam(env->yd, env->j); - assert(jl_is_vararg(yi)); - env->vty = yi; - } - yi = env->vty; - } - else { - yi = jl_tparam(env->yd, env->j); + if (j < ly) { + yi = jl_tparam(yd, j); + if (j == ly-1 && (vy || jl_is_vararg(yi))) { + vy += 1; } } - if (env->vtx) - env->vx += 1; - if (env->vty) - env->vy += 1; + if (i >= lx) + break; - if (env->vx && env->vy) { - return subtype_tuple_varargs(env, e, param); + int all_varargs = vx && vy; + if (!all_varargs && vy == 1) { + if (jl_unwrap_vararg(yi) == (jl_value_t*)jl_any_type) { + // Tuple{...} <: Tuple{..., Vararg{Any, _}} + // fast path all the type checks away + xi = jl_tparam(xd, lx-1); + if (jl_is_vararg(xi)) { + all_varargs = 1; + vy += lx - i; + vx = 1; + } else { + break; + } + } } - if (env->vx) { - xi = jl_unwrap_vararg(env->vtx); - if (env->j >= env->ly) - return 1; - } - else if (env->j >= env->ly) { - return 0; + if (all_varargs) { + // Tuple{..., Vararg{xi, _}} <: Tuple{..., Vararg{yi, _}} + return subtype_tuple_varargs( + (jl_vararg_t*)xi, + (jl_vararg_t*)yi, + vx, vy, e, param); } - int x_same = env->lastx && jl_egal(xi, env->lastx); - if (env->vy) { - yi = jl_unwrap_vararg(env->vty); - if (!env->vvx && yi == (jl_value_t*)jl_any_type) - goto done; // if y ends in `Vararg{Any}` skip checking everything + + if (j >= ly) + return !!vx; + + xi = vx ? jl_unwrap_vararg(xi) : xi; + int x_same = lastx && jl_egal(xi, lastx); + if (vy) { + yi = jl_unwrap_vararg(yi); // keep track of number of consecutive identical types compared to Vararg if (x_same) x_reps++; @@ -1036,8 +1034,8 @@ static int subtype_tuple_tail(struct subtype_tuple_env *env, int8_t R, jl_stenv_ // element type on the right more than twice. } else if (x_same && - ((yi == env->lasty && !jl_has_free_typevars(xi) && !jl_has_free_typevars(yi)) || - (yi == env->lasty && !env->vx && env->vy && jl_is_concrete_type(xi)))) { + ((yi == lasty && !jl_has_free_typevars(xi) && !jl_has_free_typevars(yi)) || + (yi == lastx && !vx && vy && jl_is_concrete_type(xi)))) { // fast path for repeated elements } else if (e->Runions.depth == 0 && e->Lunions.depth == 0 && !jl_has_free_typevars(xi) && !jl_has_free_typevars(yi)) { @@ -1048,73 +1046,71 @@ static int subtype_tuple_tail(struct subtype_tuple_env *env, int8_t R, jl_stenv_ else if (!subtype(xi, yi, e, param)) { return 0; } - env->lastx = xi; env->lasty = yi; - if (env->i < env->lx-1 || !env->vx) - env->i++; - if (env->j < env->ly-1 || !env->vy) - env->j++; - - goto loop; - // } (from loop:) + lastx = xi; lasty = yi; + if (i < lx-1 || !vx) + i++; + if (j < ly-1 || !vy) + j++; + } -done: - if (!env->vy && env->j < env->ly && jl_is_vararg(jl_tparam(env->yd, env->j))) - env->vy += 1; - if (env->vy && !env->vx && env->lx+1 >= env->ly) { + if (vy && !vx && lx+1 >= ly) { // in Tuple{...,tn} <: Tuple{...,Vararg{T,N}}, check (lx+1-ly) <: N - if (!check_vararg_length(jl_tparam(env->yd,env->ly-1), env->lx+1-env->ly, e)) + if (!check_vararg_length(yi, lx+1-ly, e)) return 0; } - return (env->lx + env->vx == env->ly + env->vy) || (env->vy && (env->lx >= (env->vx ? env->ly : (env->ly-1)))); + return (lx + vx == ly + vy) || (vy && (lx >= (vx ? ly : (ly-1)))); } static int subtype_tuple(jl_datatype_t *xd, jl_datatype_t *yd, jl_stenv_t *e, int param) { - struct subtype_tuple_env env; - env.xd = xd; - env.yd = yd; - env.lx = jl_nparams(xd); - env.ly = jl_nparams(yd); - if (env.lx == 0 && env.ly == 0) + // Check tuple compatibility based on tuple length only (fastpath) + size_t lx = jl_nparams(xd); + size_t ly = jl_nparams(yd); + + if (lx == 0 && ly == 0) return 1; - env.i = env.j = 0; - env.vx = env.vy = 0; - env.vvx = env.vvy = JL_VARARG_NONE; + + jl_vararg_kind_t vvx = JL_VARARG_NONE; + jl_vararg_kind_t vvy = JL_VARARG_NONE; jl_varbinding_t *xbb = NULL; - if (env.lx > 0) { - env.vvx = jl_vararg_kind(jl_tparam(env.xd, env.lx-1)); - if (env.vvx == JL_VARARG_BOUND) - xbb = lookup(e, (jl_tvar_t *)jl_unwrap_vararg_num(jl_tparam(env.xd, env.lx - 1))); - } - if (env.ly > 0) - env.vvy = jl_vararg_kind(jl_tparam(env.yd, env.ly-1)); - if (env.vvx != JL_VARARG_NONE && env.vvx != JL_VARARG_INT && + jl_value_t *xva = NULL, *yva = NULL; + if (lx > 0) { + xva = jl_tparam(xd, lx-1); + vvx = jl_vararg_kind(xva); + if (vvx == JL_VARARG_BOUND) + xbb = lookup(e, (jl_tvar_t *)jl_unwrap_vararg_num(xva)); + } + if (ly > 0) { + yva = jl_tparam(yd, ly-1); + vvy = jl_vararg_kind(yva); + } + if (vvx != JL_VARARG_NONE && vvx != JL_VARARG_INT && (!xbb || !jl_is_long(xbb->lb))) { - if (env.vvx == JL_VARARG_UNBOUND || (xbb && !xbb->right)) { + if (vvx == JL_VARARG_UNBOUND || (xbb && !xbb->right)) { // Unbounded on the LHS, bounded on the RHS - if (env.vvy == JL_VARARG_NONE || env.vvy == JL_VARARG_INT) + if (vvy == JL_VARARG_NONE || vvy == JL_VARARG_INT) return 0; - else if (env.lx < env.ly) // Unbounded includes N == 0 + else if (lx < ly) // Unbounded includes N == 0 return 0; } - else if (env.vvy == JL_VARARG_NONE && !check_vararg_length(jl_tparam(env.xd, env.lx-1), env.ly+1-env.lx, e)) { + else if (vvy == JL_VARARG_NONE && !check_vararg_length(xva, ly+1-lx, e)) { return 0; } } else { - size_t nx = env.lx; - if (env.vvx == JL_VARARG_INT) - nx += jl_vararg_length(jl_tparam(env.xd, env.lx-1)) - 1; + size_t nx = lx; + if (vvx == JL_VARARG_INT) + nx += jl_vararg_length(xva) - 1; else if (xbb && jl_is_long(xbb->lb)) nx += jl_unbox_long(xbb->lb) - 1; else - assert(env.vvx == JL_VARARG_NONE); - size_t ny = env.ly; - if (env.vvy == JL_VARARG_INT) - ny += jl_vararg_length(jl_tparam(env.yd, env.ly-1)) - 1; - else if (env.vvy != JL_VARARG_NONE) + assert(vvx == JL_VARARG_NONE); + size_t ny = ly; + if (vvy == JL_VARARG_INT) + ny += jl_vararg_length(yva) - 1; + else if (vvy != JL_VARARG_NONE) ny -= 1; - if (env.vvy == JL_VARARG_NONE || env.vvy == JL_VARARG_INT) { + if (vvy == JL_VARARG_NONE || vvy == JL_VARARG_INT) { if (nx != ny) return 0; } @@ -1125,11 +1121,7 @@ static int subtype_tuple(jl_datatype_t *xd, jl_datatype_t *yd, jl_stenv_t *e, in } param = (param == 0 ? 1 : param); - env.lastx = env.lasty = NULL; - env.vtx = env.vty = NULL; - JL_GC_PUSH2(&env.vtx, &env.vty); - int ans = subtype_tuple_tail(&env, 0, e, param); - JL_GC_POP(); + int ans = subtype_tuple_tail(xd, yd, 0, e, param); return ans; } From 6535c23b27f218f13d0a41490af44da7b110d38a Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 9 Jan 2021 22:22:43 -0500 Subject: [PATCH 053/239] Add the public `Dates.periods` function for getting the `Vector` of `Period`s that comprise a `CompoundPeriod` --- NEWS.md | 1 + stdlib/Dates/docs/src/index.md | 1 + stdlib/Dates/src/periods.jl | 7 +++++++ stdlib/Dates/test/periods.jl | 1 + 4 files changed, 10 insertions(+) diff --git a/NEWS.md b/NEWS.md index 7793ba31b7f24..9f7bcf26866a2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -68,6 +68,7 @@ Standard library changes #### Dates +* The `Dates.periods` function can be used to get the `Vector` of `Period`s that comprise a `CompoundPeriod` ([#39169]). #### Statistics diff --git a/stdlib/Dates/docs/src/index.md b/stdlib/Dates/docs/src/index.md index 975c08711fc19..9f48b70b8fb5c 100644 --- a/stdlib/Dates/docs/src/index.md +++ b/stdlib/Dates/docs/src/index.md @@ -747,6 +747,7 @@ Dates.Period(::Any) Dates.CompoundPeriod(::Vector{<:Dates.Period}) Dates.value Dates.default +Dates.periods ``` ### Rounding Functions diff --git a/stdlib/Dates/src/periods.jl b/stdlib/Dates/src/periods.jl index 8d81262af19ec..ac59738c560de 100644 --- a/stdlib/Dates/src/periods.jl +++ b/stdlib/Dates/src/periods.jl @@ -196,6 +196,13 @@ struct CompoundPeriod <: AbstractTime end end +""" + periods(::CompoundPeriod) -> Vector{Period} + +Return the `Vector` of `Period`s that comprise the given `CompoundPeriod`. +""" +periods(x::CompoundPeriod) = x.periods + """ CompoundPeriod(periods) -> CompoundPeriod diff --git a/stdlib/Dates/test/periods.jl b/stdlib/Dates/test/periods.jl index f4dd65d0efd2a..81aacd1a9e54b 100644 --- a/stdlib/Dates/test/periods.jl +++ b/stdlib/Dates/test/periods.jl @@ -366,6 +366,7 @@ end @test isequal(d - h, 2d - 2h - 1d + 1h) @test sprint(show, y + m) == string(y + m) @test convert(Dates.CompoundPeriod, y) + m == y + m + @test Dates.periods(convert(Dates.CompoundPeriod, y)) == convert(Dates.CompoundPeriod, y).periods end @testset "compound period simplification" begin # reduce compound periods into the most basic form From defb85d8b5b486d93462f48a7aa38972edd0429a Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Sun, 10 Jan 2021 04:38:22 -0500 Subject: [PATCH 054/239] Turn check that's always true into an assert --- src/subtype.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/subtype.c b/src/subtype.c index 6c87395933b95..22c212e2d8cd2 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -1058,7 +1058,8 @@ static int subtype_tuple_tail(jl_datatype_t *xd, jl_datatype_t *yd, int8_t R, jl if (!check_vararg_length(yi, lx+1-ly, e)) return 0; } - return (lx + vx == ly + vy) || (vy && (lx >= (vx ? ly : (ly-1)))); + assert((lx + vx == ly + vy) || (vy && (lx >= (vx ? ly : (ly-1))))); + return 1; } static int subtype_tuple(jl_datatype_t *xd, jl_datatype_t *yd, jl_stenv_t *e, int param) From 927c9faab10864802912b5414037304de9be0258 Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Sun, 10 Jan 2021 22:04:39 +0900 Subject: [PATCH 055/239] make lowrankupdate/downdate more permissive (#39150) * make lowrankupdate/downdate more permissive * add tests for abstract vectors --- stdlib/LinearAlgebra/src/cholesky.jl | 16 ++++++++-------- stdlib/LinearAlgebra/test/cholesky.jl | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/stdlib/LinearAlgebra/src/cholesky.jl b/stdlib/LinearAlgebra/src/cholesky.jl index 10aabb35928b8..6c1d87b445f08 100644 --- a/stdlib/LinearAlgebra/src/cholesky.jl +++ b/stdlib/LinearAlgebra/src/cholesky.jl @@ -643,14 +643,14 @@ end rank(C::CholeskyPivoted) = C.rank """ - lowrankupdate!(C::Cholesky, v::StridedVector) -> CC::Cholesky + lowrankupdate!(C::Cholesky, v::AbstractVector) -> CC::Cholesky Update a Cholesky factorization `C` with the vector `v`. If `A = C.U'C.U` then `CC = cholesky(C.U'C.U + v*v')` but the computation of `CC` only uses `O(n^2)` operations. The input factorization `C` is updated in place such that on exit `C == CC`. The vector `v` is destroyed during the computation. """ -function lowrankupdate!(C::Cholesky, v::StridedVector) +function lowrankupdate!(C::Cholesky, v::AbstractVector) A = C.factors n = length(v) if size(C, 1) != n @@ -689,14 +689,14 @@ function lowrankupdate!(C::Cholesky, v::StridedVector) end """ - lowrankdowndate!(C::Cholesky, v::StridedVector) -> CC::Cholesky + lowrankdowndate!(C::Cholesky, v::AbstractVector) -> CC::Cholesky Downdate a Cholesky factorization `C` with the vector `v`. If `A = C.U'C.U` then `CC = cholesky(C.U'C.U - v*v')` but the computation of `CC` only uses `O(n^2)` operations. The input factorization `C` is updated in place such that on exit `C == CC`. The vector `v` is destroyed during the computation. """ -function lowrankdowndate!(C::Cholesky, v::StridedVector) +function lowrankdowndate!(C::Cholesky, v::AbstractVector) A = C.factors n = length(v) if size(C, 1) != n @@ -742,19 +742,19 @@ function lowrankdowndate!(C::Cholesky, v::StridedVector) end """ - lowrankupdate(C::Cholesky, v::StridedVector) -> CC::Cholesky + lowrankupdate(C::Cholesky, v::AbstractVector) -> CC::Cholesky Update a Cholesky factorization `C` with the vector `v`. If `A = C.U'C.U` then `CC = cholesky(C.U'C.U + v*v')` but the computation of `CC` only uses `O(n^2)` operations. """ -lowrankupdate(C::Cholesky, v::StridedVector) = lowrankupdate!(copy(C), copy(v)) +lowrankupdate(C::Cholesky, v::AbstractVector) = lowrankupdate!(copy(C), copy(v)) """ - lowrankdowndate(C::Cholesky, v::StridedVector) -> CC::Cholesky + lowrankdowndate(C::Cholesky, v::AbstractVector) -> CC::Cholesky Downdate a Cholesky factorization `C` with the vector `v`. If `A = C.U'C.U` then `CC = cholesky(C.U'C.U - v*v')` but the computation of `CC` only uses `O(n^2)` operations. """ -lowrankdowndate(C::Cholesky, v::StridedVector) = lowrankdowndate!(copy(C), copy(v)) +lowrankdowndate(C::Cholesky, v::AbstractVector) = lowrankdowndate!(copy(C), copy(v)) diff --git a/stdlib/LinearAlgebra/test/cholesky.jl b/stdlib/LinearAlgebra/test/cholesky.jl index 86a78a9e954fe..dc9d193aee540 100644 --- a/stdlib/LinearAlgebra/test/cholesky.jl +++ b/stdlib/LinearAlgebra/test/cholesky.jl @@ -287,20 +287,30 @@ end @test sum(sum(norm, U'*U - XX)) < eps() end +struct WrappedVector{T} <: AbstractVector{T} + data::Vector{T} +end +Base.copy(v::WrappedVector) = WrappedVector(copy(v.data)) +Base.size(v::WrappedVector) = size(v.data) +Base.getindex(v::WrappedVector, i::Integer) = getindex(v.data, i) +Base.setindex!(v::WrappedVector, val, i::Integer) = setindex!(v.data, val, i) @testset "cholesky up- and downdates" begin A = complex.(randn(10,5), randn(10, 5)) v = complex.(randn(5), randn(5)) + w = WrappedVector(v) for uplo in (:U, :L) AcA = A'*A BcB = AcA + v*v' BcB = (BcB + BcB')/2 F = cholesky(Hermitian(AcA, uplo)) G = cholesky(Hermitian(BcB, uplo)) - @test Base.getproperty(LinearAlgebra.lowrankupdate(F, v), uplo) ≈ Base.getproperty(G, uplo) - @test_throws DimensionMismatch LinearAlgebra.lowrankupdate(F, Vector{eltype(v)}(undef,length(v)+1)) - @test Base.getproperty(LinearAlgebra.lowrankdowndate(G, v), uplo) ≈ Base.getproperty(F, uplo) - @test_throws DimensionMismatch LinearAlgebra.lowrankdowndate(G, Vector{eltype(v)}(undef,length(v)+1)) + @test getproperty(lowrankupdate(F, v), uplo) ≈ getproperty(G, uplo) + @test getproperty(lowrankupdate(F, w), uplo) ≈ getproperty(G, uplo) + @test_throws DimensionMismatch lowrankupdate(F, Vector{eltype(v)}(undef,length(v)+1)) + @test getproperty(lowrankdowndate(G, v), uplo) ≈ getproperty(F, uplo) + @test getproperty(lowrankdowndate(G, w), uplo) ≈ getproperty(F, uplo) + @test_throws DimensionMismatch lowrankdowndate(G, Vector{eltype(v)}(undef,length(v)+1)) end end From c487dd03c5401be0177051e91c844cc774ea3595 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Sun, 10 Jan 2021 14:28:43 -0500 Subject: [PATCH 056/239] inference: fix vararg normalization in rewrap (#39134) Fixes #39082 --- base/compiler/typelattice.jl | 9 +++++---- base/compiler/typeutils.jl | 2 +- test/compiler/inference.jl | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/base/compiler/typelattice.jl b/base/compiler/typelattice.jl index 1ae1f437a6e71..6d9ee8819da3a 100644 --- a/base/compiler/typelattice.jl +++ b/base/compiler/typelattice.jl @@ -122,6 +122,8 @@ function ⊑(@nospecialize(a), @nospecialize(b)) (a === Any || b === NOT_FOUND) && return false a === Union{} && return true b === Union{} && return false + @assert !isa(a, TypeVar) "invalid lattice item" + @assert !isa(b, TypeVar) "invalid lattice item" if isa(a, Conditional) if isa(b, Conditional) return issubconditional(a, b) @@ -177,11 +179,10 @@ function ⊑(@nospecialize(a), @nospecialize(b)) return false elseif isa(a, PartialTypeVar) && b === TypeVar return true - elseif !(isa(a, Type) || isa(a, TypeVar)) || - !(isa(b, Type) || isa(b, TypeVar)) - return a === b - else + elseif isa(a, Type) && isa(b, Type) return a <: b + else # handle this conservatively in the remaining cases + return a === b end end diff --git a/base/compiler/typeutils.jl b/base/compiler/typeutils.jl index 1a2157923086a..a37558870173f 100644 --- a/base/compiler/typeutils.jl +++ b/base/compiler/typeutils.jl @@ -5,7 +5,7 @@ ##################### function rewrap(@nospecialize(t), @nospecialize(u)) - if isa(t, TypeVar) || isa(t, Type) + if isa(t, TypeVar) || isa(t, Type) || isa(t, Core.TypeofVararg) return rewrap_unionall(t, u) end return t diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index df9d511c90b07..e1f2df6efe6e7 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -7,6 +7,14 @@ isdispatchelem(@nospecialize x) = !isa(x, Type) || Core.Compiler.isdispatchelem( using Random, Core.IR using InteractiveUtils: code_llvm +f39082(x::Vararg{T}) where {T <: Number} = x[1] +let ast = only(code_typed(f39082, Tuple{Vararg{Rational}}))[1] + @test ast.slottypes == Any[Const(f39082), Tuple{Vararg{Rational}}] +end +let ast = only(code_typed(f39082, Tuple{Rational, Vararg{Rational}}))[1] + @test ast.slottypes == Any[Const(f39082), Tuple{Rational, Vararg{Rational}}] +end + # demonstrate some of the type-size limits @test Core.Compiler.limit_type_size(Ref{Complex{T} where T}, Ref, Ref, 100, 0) == Ref @test Core.Compiler.limit_type_size(Ref{Complex{T} where T}, Ref{Complex{T} where T}, Ref, 100, 0) == Ref{Complex{T} where T} From 523cb35365874e1d8fadc43abb762da1d8598e33 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 10 Jan 2021 21:18:11 -0500 Subject: [PATCH 057/239] Apply suggestions from code review --- stdlib/Dates/src/periods.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Dates/src/periods.jl b/stdlib/Dates/src/periods.jl index ac59738c560de..0745ab0352e53 100644 --- a/stdlib/Dates/src/periods.jl +++ b/stdlib/Dates/src/periods.jl @@ -197,7 +197,7 @@ struct CompoundPeriod <: AbstractTime end """ - periods(::CompoundPeriod) -> Vector{Period} + Dates.periods(::CompoundPeriod) -> Vector{Period} Return the `Vector` of `Period`s that comprise the given `CompoundPeriod`. """ From dd8b43e0e94d7289b7c1937379a0121c4d15f2c6 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sun, 10 Jan 2021 21:35:24 -0500 Subject: [PATCH 058/239] Fix whitespace --- stdlib/Dates/src/periods.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Dates/src/periods.jl b/stdlib/Dates/src/periods.jl index 0745ab0352e53..2af634bdf104c 100644 --- a/stdlib/Dates/src/periods.jl +++ b/stdlib/Dates/src/periods.jl @@ -199,7 +199,7 @@ end """ Dates.periods(::CompoundPeriod) -> Vector{Period} -Return the `Vector` of `Period`s that comprise the given `CompoundPeriod`. +Return the `Vector` of `Period`s that comprise the given `CompoundPeriod`. """ periods(x::CompoundPeriod) = x.periods From 33237ef7ad47c48c52539f71c1034dabcf129207 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Mon, 11 Jan 2021 10:49:19 +0100 Subject: [PATCH 059/239] Add compat note in Dates.periods docstring (#39189) --- stdlib/Dates/src/periods.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/Dates/src/periods.jl b/stdlib/Dates/src/periods.jl index 2af634bdf104c..22c792cb2f333 100644 --- a/stdlib/Dates/src/periods.jl +++ b/stdlib/Dates/src/periods.jl @@ -200,6 +200,9 @@ end Dates.periods(::CompoundPeriod) -> Vector{Period} Return the `Vector` of `Period`s that comprise the given `CompoundPeriod`. + +!!! compat "Julia 1.7" + This function requires Julia 1.7 or later. """ periods(x::CompoundPeriod) = x.periods From d69b9b7240e46fa0fd52cde1f7f7bb94f72b4008 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 11 Jan 2021 14:25:52 -0500 Subject: [PATCH 060/239] lowering: remove incorrect comprehension eta reduction (#39139) But keep it for `[f(_) for _ in x]`, since that would now triggers a deprecation error (which was previously incorrectly missing for _). Fixes #18621 --- src/julia-syntax.scm | 4 +++- test/core.jl | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index b9043f11b8b94..8571815889e4a 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1714,12 +1714,14 @@ ((eq? expr argname) ;; use `identity` for x->x `(top identity)) + ;; TODO: deprecate this (#18621): ((and (null? splat) (length= expr 3) (eq? (car expr) 'call) (eq? (caddr expr) argname) + (underscore-symbol? argname) (not (dotop-named? (cadr expr))) (not (expr-contains-eq argname (cadr expr)))) - ;; eta reduce `x->f(x)` => `f` + ;; eta reduce `_->f(_)` => `f` (cadr expr)) (else (let ((expr (cond ((and flat (pair? expr) (eq? (car expr) 'generator)) diff --git a/test/core.jl b/test/core.jl index 2e275de6edf93..bd16867527240 100644 --- a/test/core.jl +++ b/test/core.jl @@ -7541,3 +7541,12 @@ const RedefineVarargN{N} = Tuple{Vararg{RedefineVararg, N}} # NTuples with non-types @test NTuple{3, 2} == Tuple{2, 2, 2} + +# issue #18621 +function f18621() + g = (k(i) for i in 1:5) + k = identity + return collect(g) +end +@test f18621() == 1:5 +@test [_ for _ in 1:5] == 1:5 From 986b8b736d375f777f4af0a72919f9b8c1cda5c7 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 11 Jan 2021 14:28:15 -0500 Subject: [PATCH 061/239] improve redirect_std* functions (#39132) Handles Pipe now as an argument (as documented), and reduces use of metaprogramming by introducing a name for the common functionality. Fixes #13519 --- base/stream.jl | 163 +++++++++++++++++++++++++------------------------ 1 file changed, 84 insertions(+), 79 deletions(-) diff --git a/base/stream.jl b/base/stream.jl index f3e252a58a9ab..81adf0c639623 100644 --- a/base/stream.jl +++ b/base/stream.jl @@ -1127,105 +1127,119 @@ function _fd(x::Union{LibuvStream, LibuvServer}) return fd[] end -for (x, writable, unix_fd, c_symbol) in - ((:stdin, false, 0, :jl_uv_stdin), - (:stdout, true, 1, :jl_uv_stdout), - (:stderr, true, 2, :jl_uv_stderr)) - f = Symbol("redirect_", lowercase(string(x))) - _f = Symbol("_", f) - @eval begin - function ($_f)(stream) - global $x - posix_fd = _fd(stream) - @static if Sys.iswindows() - ccall(:SetStdHandle, stdcall, Int32, (Int32, OS_HANDLE), - $(-10 - unix_fd), Libc._get_osfhandle(posix_fd)) - end - dup(posix_fd, RawFD($unix_fd)) - $x = stream - nothing - end - function ($f)(handle::Union{LibuvStream, IOStream}) - $(_f)(handle) - unsafe_store!(cglobal($(Expr(:quote, c_symbol)), Ptr{Cvoid}), - handle.handle) - return handle - end - function ($f)() - p = link_pipe!(Pipe()) - read, write = p.out, p.in - ($f)($(writable ? :write : :read)) - return (read, write) - end - function ($f)(::DevNull) - global $x - nulldev = @static Sys.iswindows() ? "NUL" : "/dev/null" - handle = open(nulldev, write=$writable) - $(_f)(handle) - close(handle) # handle has been dup'ed in $(_f) - $x = devnull - return devnull - end - function ($f)(io::IOContext) - io2, _dict = unwrapcontext(io) - ($f)(io2) - global $x = io - return io +struct redirect_stdio <: Function + unix_fd::Int + writable::Bool +end +for (f, writable, unix_fd) in + ((:redirect_stdin, false, 0), + (:redirect_stdout, true, 1), + (:redirect_stderr, true, 2)) + @eval const ($f) = redirect_stdio($unix_fd, $writable) +end +function _redirect_io_libc(stream, unix_fd::Int) + posix_fd = _fd(stream) + @static if Sys.iswindows() + if 0 <= unix_fd <= 2 + ccall(:SetStdHandle, stdcall, Int32, (Int32, OS_HANDLE), + -10 - unix_fd, Libc._get_osfhandle(posix_fd)) end end + dup(posix_fd, RawFD(unix_fd)) + nothing +end +function _redirect_io_global(io, unix_fd::Int) + unix_fd == 0 && (global stdin = io) + unix_fd == 1 && (global stdout = io) + unix_fd == 2 && (global stderr = io) + nothing +end +function (f::redirect_stdio)(handle::Union{LibuvStream, IOStream}) + _redirect_io_libc(handle, f.unix_fd) + c_sym = f.unix_fd == 0 ? cglobal(:jl_uv_stdin, Ptr{Cvoid}) : + f.unix_fd == 1 ? cglobal(:jl_uv_stdout, Ptr{Cvoid}) : + f.unix_fd == 2 ? cglobal(:jl_uv_stderr, Ptr{Cvoid}) : + C_NULL + c_sym == C_NULL || unsafe_store!(c_sym, handle.handle) + _redirect_io_global(handle, f.unix_fd) + return handle +end +function (f::redirect_stdio)(::DevNull) + nulldev = @static Sys.iswindows() ? "NUL" : "/dev/null" + handle = open(nulldev, write=f.writable) + _redirect_io_libc(handle, f.unix_fd) + close(handle) # handle has been dup'ed in _redirect_io_libc + _redirect_io_global(devnull, f.unix_fd) + return devnull +end +function (f::redirect_stdio)(io::AbstractPipe) + io2 = (f.writable ? pipe_writer : pipe_reader)(io) + f(io2) + _redirect_io_global(io, f.unix_fd) + return io +end +function (f::redirect_stdio)(p::Pipe) + if p.in.status == StatusInit && p.out.status == StatusInit + link_pipe!(p) + end + io2 = getfield(p, f.writable ? :in : :out) + f(io2) + return p end +(f::redirect_stdio)() = f(Pipe()) + +# Deprecate these in v2 (redirect_stdio support) +iterate(p::Pipe) = (p.out, 1) +iterate(p::Pipe, i::Int) = i == 1 ? (p.in, 2) : nothing +getindex(p::Pipe, key::Int) = key == 1 ? p.out : key == 2 ? p.in : throw(KeyError(key)) """ - redirect_stdout([stream]) -> (rd, wr) + redirect_stdout([stream]) -> stream Create a pipe to which all C and Julia level [`stdout`](@ref) output -will be redirected. -Returns a tuple `(rd, wr)` representing the pipe ends. +will be redirected. Return a stream representing the pipe ends. Data written to [`stdout`](@ref) may now be read from the `rd` end of -the pipe. The `wr` end is given for convenience in case the old -[`stdout`](@ref) object was cached by the user and needs to be replaced -elsewhere. - -If called with the optional `stream` argument, then returns `stream` itself. +the pipe. !!! note - `stream` must be an `IOStream`, a `TTY`, a `Pipe`, a socket, or `devnull`. + `stream` must be a compatible objects, such as an `IOStream`, `TTY`, + `Pipe`, socket, or `devnull`. """ redirect_stdout """ - redirect_stderr([stream]) -> (rd, wr) + redirect_stderr([stream]) -> stream Like [`redirect_stdout`](@ref), but for [`stderr`](@ref). !!! note - `stream` must be an `IOStream`, a `TTY`, a `Pipe`, a socket, or `devnull`. + `stream` must be a compatible objects, such as an `IOStream`, `TTY`, + `Pipe`, socket, or `devnull`. """ redirect_stderr """ - redirect_stdin([stream]) -> (rd, wr) + redirect_stdin([stream]) -> stream Like [`redirect_stdout`](@ref), but for [`stdin`](@ref). -Note that the order of the return tuple is still `(rd, wr)`, -i.e. data to be read from [`stdin`](@ref) may be written to `wr`. +Note that the direction of the stream is reversed. !!! note - `stream` must be an `IOStream`, a `TTY`, a `Pipe`, a socket, or `devnull`. + `stream` must be a compatible objects, such as an `IOStream`, `TTY`, + `Pipe`, socket, or `devnull`. """ redirect_stdin -for (F,S) in ((:redirect_stdin, :stdin), (:redirect_stdout, :stdout), (:redirect_stderr, :stderr)) - @eval function $F(f::Function, stream) - STDOLD = $S - local ret - $F(stream) - try - ret = f() - finally - $F(STDOLD) - end - ret +function (f::redirect_stdio)(thunk::Function, stream) + stdold = f.unix_fd == 0 ? stdin : + f.unix_fd == 1 ? stdout : + f.unix_fd == 2 ? stderr : + throw(ArgumentError("Not implemented to get old handle of fd except for stdio")) + f(stream) + try + return thunk() + finally + f(stdold) end end @@ -1234,9 +1248,6 @@ end Run the function `f` while redirecting [`stdout`](@ref) to `stream`. Upon completion, [`stdout`](@ref) is restored to its prior setting. - -!!! note - `stream` must be a `TTY`, a `Pipe`, or a socket. """ redirect_stdout(f::Function, stream) @@ -1245,9 +1256,6 @@ redirect_stdout(f::Function, stream) Run the function `f` while redirecting [`stderr`](@ref) to `stream`. Upon completion, [`stderr`](@ref) is restored to its prior setting. - -!!! note - `stream` must be a `TTY`, a `Pipe`, or a socket. """ redirect_stderr(f::Function, stream) @@ -1256,9 +1264,6 @@ redirect_stderr(f::Function, stream) Run the function `f` while redirecting [`stdin`](@ref) to `stream`. Upon completion, [`stdin`](@ref) is restored to its prior setting. - -!!! note - `stream` must be a `TTY`, a `Pipe`, or a socket. """ redirect_stdin(f::Function, stream) From b260a25a583d6453ee51d4efaaf6e87859cf1199 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 11 Jan 2021 14:37:24 -0500 Subject: [PATCH 062/239] Docs and news for #38952 (#39032) * Update the docs for the `JULIA_NUM_THREADS` environment variable * Add NEWS for #38952 --- NEWS.md | 2 +- doc/src/manual/environment-variables.md | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index 9f7bcf26866a2..2ffad60400815 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,7 +18,7 @@ Command-line option changes Multi-threading changes ----------------------- - +* If the `JULIA_NUM_THREADS` environment variable is set to `auto`, then the number of threads will be set to the number of CPU threads ([#38952]) Build system changes -------------------- diff --git a/doc/src/manual/environment-variables.md b/doc/src/manual/environment-variables.md index 597e65510421a..c89a9c6b18321 100644 --- a/doc/src/manual/environment-variables.md +++ b/doc/src/manual/environment-variables.md @@ -190,20 +190,24 @@ a master process to establish a connection before dying. ### [`JULIA_NUM_THREADS`](@id JULIA_NUM_THREADS) An unsigned 64-bit integer (`uint64_t`) that sets the maximum number of threads -available to Julia. If `$JULIA_NUM_THREADS` exceeds the number of available -CPU threads (logical cores), then the number of threads is set to the number of CPU threads. If -`$JULIA_NUM_THREADS` is not positive or is not set, or if the number of CPU -threads cannot be determined through system calls, then the number of threads is -set to `1`. +available to Julia. If `$JULIA_NUM_THREADS` is not positive or is not set, or +if the number of CPU threads cannot be determined through system calls, then the +number of threads is set to `1`. -!!! note +If `$JULIA_NUM_THREADS` is set to `auto`, then the number of threads will be set +to the number of CPU threads. - `JULIA_NUM_THREADS` must be defined before starting julia; defining it in `startup.jl` is too late in the startup process. +!!! note + `JULIA_NUM_THREADS` must be defined before starting julia; defining it in + `startup.jl` is too late in the startup process. !!! compat "Julia 1.5" In Julia 1.5 and above the number of threads can also be specified on startup using the `-t`/`--threads` command line argument. +!!! compat "Julia 1.7" + The `auto` value for `$JULIA_NUM_THREADS` requires Julia 1.7 or above. + ### `JULIA_THREAD_SLEEP_THRESHOLD` If set to a string that starts with the case-insensitive substring `"infinite"`, From 0f8eaa66ee04ae4198a8dab78976a0875853d83f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 11 Jan 2021 14:32:53 -0800 Subject: [PATCH 063/239] Fix `p7zip_jll` environment setup (#39155) --- stdlib/p7zip_jll/src/p7zip_jll.jl | 48 +++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/stdlib/p7zip_jll/src/p7zip_jll.jl b/stdlib/p7zip_jll/src/p7zip_jll.jl index cbefc20803c5e..c3b31cee68435 100644 --- a/stdlib/p7zip_jll/src/p7zip_jll.jl +++ b/stdlib/p7zip_jll/src/p7zip_jll.jl @@ -21,9 +21,51 @@ else const p7zip_exe = "7z" end -# These functions look a little strange, but they're mimicking the JLLWrappers signature -p7zip(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) = f(p7zip_path) -p7zip(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) = Cmd([p7zip_path]) +if Sys.iswindows() + const LIBPATH_env = "PATH" + const LIBPATH_default = "" + const pathsep = ';' +elseif Sys.isapple() + const LIBPATH_env = "DYLD_FALLBACK_LIBRARY_PATH" + const LIBPATH_default = "~/lib:/usr/local/lib:/lib:/usr/lib" + const pathsep = ':' +else + const LIBPATH_env = "LD_LIBRARY_PATH" + const LIBPATH_default = "" + const pathsep = ':' +end + +function adjust_ENV!(env::Dict, PATH::String, LIBPATH::String, adjust_PATH::Bool, adjust_LIBPATH::Bool) + if adjust_LIBPATH + LIBPATH_base = get(env, LIBPATH_env, expanduser(LIBPATH_default)) + if !isempty(LIBPATH_base) + env[LIBPATH_env] = string(LIBPATH, pathsep, LIBPATH_base) + else + env[LIBPATH_env] = LIBPATH + end + end + if adjust_PATH && (LIBPATH_env != "PATH" || !adjust_LIBPATH) + if adjust_PATH + if !isempty(get(env, "PATH", "")) + env["PATH"] = string(PATH, pathsep, env["PATH"]) + else + env["PATH"] = PATH + end + end + end + return env +end + +function p7zip(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH) + withenv(env...) do + return f(p7zip_path) + end +end +function p7zip(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) + env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH) + return Cmd(Cmd([p7zip_path]); env) +end function init_p7zip_path() # Prefer our own bundled p7zip, but if we don't have one, pick it up off of the PATH From eb352b763f28be0f392c087dc773c8472219c98b Mon Sep 17 00:00:00 2001 From: OvidiusCicero Date: Mon, 11 Jan 2021 23:58:57 +0100 Subject: [PATCH 064/239] update latest release in README (#39197) README should advise to checkout last bugfix release 1.5.3 instead of first full 1.5.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 316e339ac7597..ca913ec539b48 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Julia. However, most users should use the most recent stable version of Julia. You can get this version by changing to the Julia directory and running: - git checkout v1.5.0 + git checkout v1.5.3 Now run `make` to build the `julia` executable. From c1f41ad15d631d27cfcec52af58096b2065debf5 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Tue, 12 Jan 2021 09:36:58 +0100 Subject: [PATCH 065/239] improve inferrability of tuple slicing (#39074) * RFC: improve inferrability of tuple slicing This makes slicing tuples type stable in a lot more cases. This now only calls `ntuple` if the resulting tuple has no more than 10 elements, as just relying on the fallback in `ntuple` did have some compile-time overhead in my artificial benchmarks. I also widened the signature to `AbstractUnitRange`, since I don't see why we shouldn't have this for ranges like `OneTo` as well. * add check for offset ranges and more tests * add guard if OffsetArrays is already imported Co-authored-by: Matt Bauman * import OffsetArrays correctly Co-authored-by: Matt Bauman --- base/range.jl | 20 +++++++++++--------- test/tuple.jl | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/base/range.jl b/base/range.jl index 63f4c1aed02e2..b5c10aa4085ce 100644 --- a/base/range.jl +++ b/base/range.jl @@ -299,16 +299,18 @@ unitrange(x) = UnitRange(x) if isdefined(Main, :Base) # Constant-fold-able indexing into tuples to functionally expose Base.tail and Base.front - function getindex(@nospecialize(t::Tuple), r::UnitRange) + function getindex(@nospecialize(t::Tuple), r::AbstractUnitRange) @_inline_meta - r.start > r.stop && return () - if r.start == 1 - r.stop == length(t) && return t - r.stop == length(t)-1 && return front(t) - r.stop == length(t)-2 && return front(front(t)) - elseif r.stop == length(t) - r.start == 2 && return tail(t) - r.start == 3 && return tail(tail(t)) + require_one_based_indexing(r) + if length(r) <= 10 + return ntuple(i -> t[i + first(r) - 1], length(r)) + elseif first(r) == 1 + last(r) == length(t) && return t + last(r) == length(t)-1 && return front(t) + last(r) == length(t)-2 && return front(front(t)) + elseif last(r) == length(t) + first(r) == 2 && return tail(t) + first(r) == 3 && return tail(tail(t)) end return (eltype(t)[t[ri] for ri in r]...,) end diff --git a/test/tuple.jl b/test/tuple.jl index 64e593873215f..768a1050c09c0 100644 --- a/test/tuple.jl +++ b/test/tuple.jl @@ -1,5 +1,8 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license +isdefined(Main, :OffsetArrays) || @eval Main include("testhelpers/OffsetArrays.jl") +using .Main.OffsetArrays + struct BitPerm_19352 p::NTuple{8,UInt8} function BitPerm(p::NTuple{8,UInt8}) @@ -598,3 +601,24 @@ end # issue #38837 f38837(xs) = map((F,x)->F(x), (Float32, Float64), xs) @test @inferred(f38837((1,2))) === (1.0f0, 2.0) + +@testset "indexing with UnitRanges" begin + f(t) = t[3:end-2] + @test @inferred(f(Tuple(1:10))) === Tuple(3:8) + @test @inferred(f((true, 2., 3, 4f0, 0x05, 6, 7.))) === (3, 4f0, 0x05) + + f(t) = t[Base.OneTo(5)] + @test @inferred(f(Tuple(1:10))) === Tuple(1:5) + @test @inferred(f((true, 2., 3, 4f0, 0x05, 6, 7.))) === (true, 2., 3, 4f0, 0x05) + + @test @inferred((t -> t[1:end])(Tuple(1:15))) === Tuple(1:15) + @test @inferred((t -> t[2:end])(Tuple(1:15))) === Tuple(2:15) + @test @inferred((t -> t[3:end])(Tuple(1:15))) === Tuple(3:15) + @test @inferred((t -> t[1:end-1])(Tuple(1:15))) === Tuple(1:14) + @test @inferred((t -> t[1:end-2])(Tuple(1:15))) === Tuple(1:13) + @test @inferred((t -> t[3:2])(Tuple(1:15))) === () + + @test_throws BoundsError (1, 2)[1:4] + @test_throws BoundsError (1, 2)[0:2] + @test_throws ArgumentError (1, 2)[OffsetArrays.IdOffsetRange(1:2, -1)] +end From 97bd48c0686ab341a7685f6aa66cdd56790a2398 Mon Sep 17 00:00:00 2001 From: Jan Weidner Date: Tue, 12 Jan 2021 14:48:02 +0100 Subject: [PATCH 066/239] Improve range: refactor, support start as an optional kwarg, clearer docs and error messages (#38041) Mathematically a range is uniquely determined by three out of four of start, step, stop, length. Furthermore if one assumes step=1 any combination of two others macthematically suffices to specify a range. With this PR the range function reflects this. Any combination of three (two non step) arguments will be accepted. Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Co-authored-by: Johnny Chen Co-authored-by: Mark Kittisopikul Co-authored-by: Matt Bauman --- NEWS.md | 1 + base/range.jl | 183 +++++++++++++++++++++++++++++------------ base/twiceprecision.jl | 4 +- test/ranges.jl | 20 +++++ 4 files changed, 154 insertions(+), 54 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2ffad60400815..e4c88c5b25177 100644 --- a/NEWS.md +++ b/NEWS.md @@ -40,6 +40,7 @@ Standard library changes ------------------------ * `count` and `findall` now accept an `AbstractChar` argument to search for a character in a string ([#38675]). +* `range` now supports `start` as an optional keyword argument ([#38041]). * `islowercase` and `isuppercase` are now compliant with the Unicode lower/uppercase categories ([#38574]). * `iseven` and `isodd` functions now support non-`Integer` numeric types ([#38976]). * `escape_string` can now receive a collection of characters in the keyword diff --git a/base/range.jl b/base/range.jl index b5c10aa4085ce..6e5a86f9c863f 100644 --- a/base/range.jl +++ b/base/range.jl @@ -47,25 +47,16 @@ function _colon(start::T, step, stop::T) where T end """ - range(start[, stop]; length, stop, step=1) + range(start, stop; length, step) + range(start; length, stop, step) + range(;start, length, stop, step) -Given a starting value, construct a range either by length or from `start` to `stop`, -optionally with a given step (defaults to 1, a [`UnitRange`](@ref)). -One of `length` or `stop` is required. If `length`, `stop`, and `step` are all specified, they must agree. - -If `length` and `stop` are provided and `step` is not, the step size will be computed -automatically such that there are `length` linearly spaced elements in the range. - -If `step` and `stop` are provided and `length` is not, the overall range length will be computed -automatically such that the elements are `step` spaced. - -Special care is taken to ensure intermediate values are computed rationally. -To avoid this induced overhead, see the [`LinRange`](@ref) constructor. - -`stop` may be specified as either a positional or keyword argument. - -!!! compat "Julia 1.1" - `stop` as a positional argument requires at least Julia 1.1. +Construct a specialized array with evenly spaced elements and optimized storage (an [`AbstractRange`](@ref)) from the arguments. +Mathematically a range is uniquely determined by any three of `start`, `step`, `stop` and `length`. +Valid invocations of range are: +* Call `range` with any three of `start`, `step`, `stop`, `length`. +* Call `range` with two of `start`, `stop`, `length`. In this case `step` will be assumed +to be one. If both arguments are Integers, a [`UnitRange`](@ref) will be returned. # Examples ```jldoctest @@ -86,51 +77,139 @@ julia> range(1, 10, length=101) julia> range(1, 100, step=5) 1:5:96 + +julia> range(stop=10, length=5) +6:10 + +julia> range(stop=10, step=1, length=5) +6:1:10 + +julia> range(start=1, step=1, stop=10) +1:1:10 ``` +If `length` is not specified and `stop - start` is not an integer multiple of `step`, a range that ends before `stop` will be produced. +```jldoctest +julia> range(1, 3.5, step=2) +1.0:2.0:3.0 +``` + +Special care is taken to ensure intermediate values are computed rationally. +To avoid this induced overhead, see the [`LinRange`](@ref) constructor. + +Both `start` and `stop` may be specified as either a positional or keyword arguments. +If both are specified as positional arguments, one of `step` or `length` must also be provided. + +!!! compat "Julia 1.1" + `stop` as a positional argument requires at least Julia 1.1. + +!!! compat "Julia 1.7" + `start` as a keyword argument requires at least Julia 1.7. """ -range(start; length::Union{Integer,Nothing}=nothing, stop=nothing, step=nothing) = +function range end + +range(start; stop=nothing, length::Union{Integer,Nothing}=nothing, step=nothing) = _range(start, step, stop, length) -range(start, stop; length::Union{Integer,Nothing}=nothing, step=nothing) = - _range2(start, step, stop, length) +function range(start, stop; length::Union{Integer,Nothing}=nothing, step=nothing) + # For code clarity, the user must pass step or length + # See https://github.com/JuliaLang/julia/pull/28708#issuecomment-420034562 + if step === length === nothing + msg = """ + Neither `step` nor `length` was provided. To fix this do one of the following: + * Pass one of them + * Use `$(start):$(stop)` + * Use `range($start, stop=$stop)` + """ + throw(ArgumentError(msg)) + end + _range(start, step, stop, length) +end -_range2(start, ::Nothing, stop, ::Nothing) = - throw(ArgumentError("At least one of `length` or `step` must be specified")) +range(;start=nothing, stop=nothing, length::Union{Integer, Nothing}=nothing, step=nothing) = + _range(start, step, stop, length) -_range2(start, step, stop, length) = _range(start, step, stop, length) +_range(start::Nothing, step::Nothing, stop::Nothing, len::Nothing) = range_error(start, step, stop, len) +_range(start::Nothing, step::Nothing, stop::Nothing, len::Any ) = range_error(start, step, stop, len) +_range(start::Nothing, step::Nothing, stop::Any , len::Nothing) = range_error(start, step, stop, len) +_range(start::Nothing, step::Nothing, stop::Any , len::Any ) = range_stop_length(stop, len) +_range(start::Nothing, step::Any , stop::Nothing, len::Nothing) = range_error(start, step, stop, len) +_range(start::Nothing, step::Any , stop::Nothing, len::Any ) = range_error(start, step, stop, len) +_range(start::Nothing, step::Any , stop::Any , len::Nothing) = range_error(start, step, stop, len) +_range(start::Nothing, step::Any , stop::Any , len::Any ) = range_step_stop_length(step, stop, len) +_range(start::Any , step::Nothing, stop::Nothing, len::Nothing) = range_error(start, step, stop, len) +_range(start::Any , step::Nothing, stop::Nothing, len::Any ) = range_start_length(start, len) +_range(start::Any , step::Nothing, stop::Any , len::Nothing) = range_start_stop(start, stop) +_range(start::Any , step::Nothing, stop::Any , len::Any ) = range_start_stop_length(start, stop, len) +_range(start::Any , step::Any , stop::Nothing, len::Nothing) = range_error(start, step, stop, len) +_range(start::Any , step::Any , stop::Nothing, len::Any ) = range_start_step_length(start, step, len) +_range(start::Any , step::Any , stop::Any , len::Nothing) = range_start_step_stop(start, step, stop) +_range(start::Any , step::Any , stop::Any , len::Any ) = range_error(start, step, stop, len) + +range_stop_length(stop, length) = (stop-length+1):stop + +range_step_stop_length(step, stop, length) = reverse(range_start_step_length(stop, -step, length)) + +range_start_length(a::Real, len::Integer) = UnitRange{typeof(a)}(a, oftype(a, a+len-1)) +range_start_length(a::AbstractFloat, len::Integer) = range_start_step_length(a, oftype(a, 1), len) +range_start_length(a, len::Integer) = range_start_step_length(a, oftype(a-a, 1), len) + +range_start_stop(start, stop) = start:stop + +function range_start_step_length(a::AbstractFloat, step::AbstractFloat, len::Integer) + range_start_step_length(promote(a, step)..., len) +end -# Range from start to stop: range(a, [step=s,] stop=b), no length -_range(start, step, stop, ::Nothing) = (:)(start, step, stop) -_range(start, ::Nothing, stop, ::Nothing) = (:)(start, stop) +function range_start_step_length(a::Real, step::AbstractFloat, len::Integer) + range_start_step_length(float(a), step, len) +end -# Range of a given length: range(a, [step=s,] length=l), no stop -_range(a::Real, ::Nothing, ::Nothing, len::Integer) = UnitRange{typeof(a)}(a, oftype(a, a+len-1)) -_range(a::AbstractFloat, ::Nothing, ::Nothing, len::Integer) = _range(a, oftype(a, 1), nothing, len) -_range(a::AbstractFloat, st::AbstractFloat, ::Nothing, len::Integer) = _range(promote(a, st)..., nothing, len) -_range(a::Real, st::AbstractFloat, ::Nothing, len::Integer) = _range(float(a), st, nothing, len) -_range(a::AbstractFloat, st::Real, ::Nothing, len::Integer) = _range(a, float(st), nothing, len) -_range(a, ::Nothing, ::Nothing, len::Integer) = _range(a, oftype(a-a, 1), nothing, len) +function range_start_step_length(a::AbstractFloat, step::Real, len::Integer) + range_start_step_length(a, float(step), len) +end -_range(a::T, step::T, ::Nothing, len::Integer) where {T <: AbstractFloat} = +function range_start_step_length(a::T, step::T, len::Integer) where {T <: AbstractFloat} _rangestyle(OrderStyle(T), ArithmeticStyle(T), a, step, len) -_range(a::T, step, ::Nothing, len::Integer) where {T} = +end + +function range_start_step_length(a::T, step, len::Integer) where {T} _rangestyle(OrderStyle(T), ArithmeticStyle(T), a, step, len) +end + _rangestyle(::Ordered, ::ArithmeticWraps, a::T, step::S, len::Integer) where {T,S} = StepRange{typeof(a+zero(step)),S}(a, step, a+step*(len-1)) _rangestyle(::Any, ::Any, a::T, step::S, len::Integer) where {T,S} = StepRangeLen{typeof(a+zero(step)),T,S}(a, step, len) -# Malformed calls -_range(start, step, ::Nothing, ::Nothing) = # range(a, step=s) - throw(ArgumentError("At least one of `length` or `stop` must be specified")) -_range(start, ::Nothing, ::Nothing, ::Nothing) = # range(a) - throw(ArgumentError("At least one of `length` or `stop` must be specified")) -_range(::Nothing, ::Nothing, ::Nothing, ::Nothing) = # range(nothing) - throw(ArgumentError("At least one of `length` or `stop` must be specified")) -_range(start::Real, step::Real, stop::Real, length::Integer) = # range(a, step=s, stop=b, length=l) - throw(ArgumentError("Too many arguments specified; try passing only one of `stop` or `length`")) -_range(::Nothing, ::Nothing, ::Nothing, ::Integer) = # range(nothing, length=l) - throw(ArgumentError("Can't start a range at `nothing`")) +range_start_step_stop(start, step, stop) = start:step:stop + +function range_error(start, step, stop, length) + hasstart = start !== nothing + hasstep = step !== nothing + hasstop = stop !== nothing + haslength = start !== nothing + + hint = if hasstart && hasstep && hasstop && haslength + "Try specifying only three arguments" + elseif !hasstop && !haslength + "At least one of `length` or `stop` must be specified." + elseif !hasstep && !haslength + "At least one of `length` or `step` must be specified." + elseif !hasstart && !hasstop + "At least one of `start` or `stop` must be specified." + else + "Try specifying more arguments." + end + + msg = """ + Cannot construct range from arguments: + start = $start + step = $step + stop = $stop + length = $length + $hint + """ + throw(ArgumentError(msg)) +end ## 1-dimensional ranges ## @@ -434,13 +513,13 @@ function LinRange(start, stop, len::Integer) LinRange{T}(start, stop, len) end -function _range(start::T, ::Nothing, stop::S, len::Integer) where {T,S} +function range_start_stop_length(start::T, stop::S, len::Integer) where {T,S} a, b = promote(start, stop) - _range(a, nothing, b, len) + range_start_stop_length(a, b, len) end -_range(start::T, ::Nothing, stop::T, len::Integer) where {T<:Real} = LinRange{T}(start, stop, len) -_range(start::T, ::Nothing, stop::T, len::Integer) where {T} = LinRange{T}(start, stop, len) -_range(start::T, ::Nothing, stop::T, len::Integer) where {T<:Integer} = +range_start_stop_length(start::T, stop::T, len::Integer) where {T<:Real} = LinRange{T}(start, stop, len) +range_start_stop_length(start::T, stop::T, len::Integer) where {T} = LinRange{T}(start, stop, len) +range_start_stop_length(start::T, stop::T, len::Integer) where {T<:Integer} = _linspace(float(T), start, stop, len) ## for Float16, Float32, and Float64 we hit twiceprecision.jl to lift to higher precision StepRangeLen # for all other types we fall back to a plain old LinRange diff --git a/base/twiceprecision.jl b/base/twiceprecision.jl index 1490a0624c7d6..e7a2e5041f4ef 100644 --- a/base/twiceprecision.jl +++ b/base/twiceprecision.jl @@ -427,7 +427,7 @@ end step(r::StepRangeLen{T,TwicePrecision{T},TwicePrecision{T}}) where {T<:AbstractFloat} = T(r.step) step(r::StepRangeLen{T,TwicePrecision{T},TwicePrecision{T}}) where {T} = T(r.step) -function _range(a::T, st::T, ::Nothing, len::Integer) where T<:Union{Float16,Float32,Float64} +function range_start_step_length(a::T, st::T, len::Integer) where T<:Union{Float16,Float32,Float64} start_n, start_d = rat(a) step_n, step_d = rat(st) if start_d != 0 && step_d != 0 && @@ -591,7 +591,7 @@ end ## LinRange # For Float16, Float32, and Float64, this returns a StepRangeLen -function _range(start::T, ::Nothing, stop::T, len::Integer) where {T<:IEEEFloat} +function range_start_stop_length(start::T, stop::T, len::Integer) where {T<:IEEEFloat} len < 2 && return _linspace1(T, start, stop, len) if start == stop return steprangelen_hp(T, start, zero(T), 0, len, 1) diff --git a/test/ranges.jl b/test/ranges.jl index 6fcfc18b50529..b9f77f211193d 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1,5 +1,25 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license +@testset "range construction" begin + @testset "range(;kw...)" begin + @test_throws ArgumentError range(start=1, step=1, stop=2, length=10) + @test_throws ArgumentError range(start=1, step=1, stop=10, length=11) + + r = 3.0:2:11 + @test r == range(start=first(r), step=step(r), stop=last(r) ) + @test r == range(start=first(r), step=step(r), length=length(r)) + @test r == range(start=first(r), stop=last(r), length=length(r)) + @test r == range( step=step(r), stop=last(r), length=length(r)) + + r = 4:9 + @test r === range(start=first(r), stop=last(r) ) + @test r === range(start=first(r), length=length(r)) + # the next one uses ==, because it changes the eltype + @test r == range(start=first(r), stop=last(r), length=length(r)) + @test r === range( stop=last(r), length=length(r)) + end +end + using Dates, Random isdefined(Main, :PhysQuantities) || @eval Main include("testhelpers/PhysQuantities.jl") using .Main.PhysQuantities From 3d1598e9448c173b3c8d3da2c4f914e5f9611a38 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Tue, 12 Jan 2021 08:48:30 -0600 Subject: [PATCH 067/239] Test & CoreLogging: improve inference & (no)specialization (#39177) This adjusts specialization in both Base.CoreLogging and Test, and transitions to concrete types in some Test structs. It also fixes a couple of inference problems. Co-authored-by: Jameson Nash --- base/logging.jl | 2 +- stdlib/Test/src/Test.jl | 16 ++++++++-------- stdlib/Test/src/logging.jl | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/base/logging.jl b/base/logging.jl index 1727fc8b16f76..72bdb425b010a 100644 --- a/base/logging.jl +++ b/base/logging.jl @@ -101,7 +101,7 @@ struct NullLogger <: AbstractLogger; end min_enabled_level(::NullLogger) = AboveMaxLevel shouldlog(::NullLogger, args...) = false handle_message(::NullLogger, args...; kwargs...) = - error("Null logger handle_message() should not be called") + (@nospecialize; error("Null logger handle_message() should not be called")) #------------------------------------------------------------------------------- diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index ceee6ae727648..9005b2a8468b6 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -284,14 +284,14 @@ function eval_test(evaluated::Expr, quoted::Expr, source::LineNumberNode, negate elseif evaluated.head === :call op = evaled_args[1] - kwargs = evaled_args[2].args # Keyword arguments from `Expr(:parameters, ...)` + kwargs = (evaled_args[2]::Expr).args # Keyword arguments from `Expr(:parameters, ...)` args = evaled_args[3:n] res = op(args...; kwargs...) # Create "Evaluated" expression which looks like the original call but has all of # the arguments evaluated - func_sym = quoted_args[1] + func_sym = quoted_args[1]::Union{Symbol,Expr} if isempty(kwargs) quoted = Expr(:call, func_sym, args...) elseif func_sym === :≈ && !res @@ -312,7 +312,7 @@ function eval_test(evaluated::Expr, quoted::Expr, source::LineNumberNode, negate Returned(res, # stringify arguments in case of failure, for easy remote printing - res === true ? quoted : sprint(io->print(IOContext(io, :limit => true), quoted))*kw_suffix, + res === true ? quoted : sprint(print, quoted, context=(:limit => true)) * kw_suffix, source) end @@ -758,7 +758,7 @@ struct FallbackTestSet <: AbstractTestSet end fallback_testset = FallbackTestSet() struct FallbackTestSetException <: Exception - msg::AbstractString + msg::String end function Base.showerror(io::IO, ex::FallbackTestSetException, bt; backtrace=true) @@ -785,13 +785,13 @@ are any `Fail`s or `Error`s, an exception will be thrown only at the end, along with a summary of the test results. """ mutable struct DefaultTestSet <: AbstractTestSet - description::AbstractString - results::Vector + description::String + results::Vector{Any} n_passed::Int anynonpass::Bool verbose::Bool end -DefaultTestSet(desc; verbose = false) = DefaultTestSet(desc, [], 0, false, verbose) +DefaultTestSet(desc::AbstractString; verbose::Bool = false) = DefaultTestSet(String(desc)::String, [], 0, false, verbose) # For a broken result, simply store the result record(ts::DefaultTestSet, t::Broken) = (push!(ts.results, t); t) @@ -1462,7 +1462,7 @@ want to set this to `false`. See [`Base.isambiguous`](@ref). function detect_ambiguities(mods...; recursive::Bool = false, ambiguous_bottom::Bool = false) - @nospecialize mods + @nospecialize ambs = Set{Tuple{Method,Method}}() mods = collect(mods)::Vector{Module} function sortdefs(m1::Method, m2::Method) diff --git a/stdlib/Test/src/logging.jl b/stdlib/Test/src/logging.jl index 25a5e8c0cc9ad..7df7acbdd55e7 100644 --- a/stdlib/Test/src/logging.jl +++ b/stdlib/Test/src/logging.jl @@ -40,6 +40,7 @@ end function handle_message(logger::TestLogger, level, msg, _module, group, id, file, line; kwargs...) + @nospecialize push!(logger.logs, LogRecord(level, msg, _module, group, id, file, line, kwargs)) end From a3369df2644b0865b74381869b0f5e50d93d4e44 Mon Sep 17 00:00:00 2001 From: Daniel Karrasch Date: Tue, 12 Jan 2021 16:01:16 +0100 Subject: [PATCH 068/239] [WIP] Speed up dense-sparse matmul (#38876) * Speed up dense-sparse matmul * add one at-simd, minor edits * improve A_mul_Bq for dense-sparse * revert ineffective changes * shift at-inbounds annotation --- stdlib/SparseArrays/src/linalg.jl | 158 ++++++++++++------------------ 1 file changed, 65 insertions(+), 93 deletions(-) diff --git a/stdlib/SparseArrays/src/linalg.jl b/stdlib/SparseArrays/src/linalg.jl index 37d95b12a8978..25ddb3222f6b2 100644 --- a/stdlib/SparseArrays/src/linalg.jl +++ b/stdlib/SparseArrays/src/linalg.jl @@ -34,10 +34,10 @@ function mul!(C::StridedVecOrMat, A::AbstractSparseMatrixCSC, B::Union{StridedVe if β != 1 β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) end - for k = 1:size(C, 2) - @inbounds for col = 1:size(A, 2) + for k in 1:size(C, 2) + @inbounds for col in 1:size(A, 2) αxj = B[col,k] * α - for j = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) + for j in nzrange(A, col) C[rv[j], k] += nzv[j]*αxj end end @@ -49,67 +49,38 @@ end *(A::SparseMatrixCSCUnion{TA}, B::AdjOrTransStridedOrTriangularMatrix{Tx}) where {TA,Tx} = (T = promote_op(matprod, TA, Tx); mul!(similar(B, T, (size(A, 1), size(B, 2))), A, B, true, false)) -function mul!(C::StridedVecOrMat, adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}, α::Number, β::Number) - A = adjA.parent - size(A, 2) == size(C, 1) || throw(DimensionMismatch()) - size(A, 1) == size(B, 1) || throw(DimensionMismatch()) - size(B, 2) == size(C, 2) || throw(DimensionMismatch()) - nzv = nonzeros(A) - rv = rowvals(A) - if β != 1 - β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) - end - for k = 1:size(C, 2) - @inbounds for col = 1:size(A, 2) - tmp = zero(eltype(C)) - for j = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) - tmp += adjoint(nzv[j])*B[rv[j],k] +for (T, t) in ((Adjoint, adjoint), (Transpose, transpose)) + @eval function mul!(C::StridedVecOrMat, xA::$T{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}, α::Number, β::Number) + A = xA.parent + size(A, 2) == size(C, 1) || throw(DimensionMismatch()) + size(A, 1) == size(B, 1) || throw(DimensionMismatch()) + size(B, 2) == size(C, 2) || throw(DimensionMismatch()) + nzv = nonzeros(A) + rv = rowvals(A) + if β != 1 + β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) + end + for k in 1:size(C, 2) + @inbounds for col in 1:size(A, 2) + tmp = zero(eltype(C)) + for j in nzrange(A, col) + tmp += $t(nzv[j])*B[rv[j],k] + end + C[col,k] += tmp * α end - C[col,k] += tmp * α end + C end - C end *(adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, x::StridedVector{Tx}) where {Tx} = (T = promote_op(matprod, eltype(adjA), Tx); mul!(similar(x, T, size(adjA, 1)), adjA, x, true, false)) *(adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, B::AdjOrTransStridedOrTriangularMatrix) = (T = promote_op(matprod, eltype(adjA), eltype(B)); mul!(similar(B, T, (size(adjA, 1), size(B, 2))), adjA, B, true, false)) - -function mul!(C::StridedVecOrMat, transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}, α::Number, β::Number) - A = transA.parent - size(A, 2) == size(C, 1) || throw(DimensionMismatch()) - size(A, 1) == size(B, 1) || throw(DimensionMismatch()) - size(B, 2) == size(C, 2) || throw(DimensionMismatch()) - nzv = nonzeros(A) - rv = rowvals(A) - if β != 1 - β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) - end - for k = 1:size(C, 2) - @inbounds for col = 1:size(A, 2) - tmp = zero(eltype(C)) - for j = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) - tmp += transpose(nzv[j])*B[rv[j],k] - end - C[col,k] += tmp * α - end - end - C -end *(transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}, x::StridedVector{Tx}) where {Tx} = (T = promote_op(matprod, eltype(transA), Tx); mul!(similar(x, T, size(transA, 1)), transA, x, true, false)) *(transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}, B::AdjOrTransStridedOrTriangularMatrix) = (T = promote_op(matprod, eltype(transA), eltype(B)); mul!(similar(B, T, (size(transA, 1), size(B, 2))), transA, B, true, false)) -# For compatibility with dense multiplication API. Should be deleted when dense multiplication -# API is updated to follow BLAS API. -mul!(C::StridedVecOrMat, A::AbstractSparseMatrixCSC, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}) = - mul!(C, A, B, true, false) -mul!(C::StridedVecOrMat, adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}) = - mul!(C, adjA, B, true, false) -mul!(C::StridedVecOrMat, transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}, B::Union{StridedVector,AdjOrTransStridedOrTriangularMatrix}) = - mul!(C, transA, B, true, false) - function mul!(C::StridedVecOrMat, X::AdjOrTransStridedOrTriangularMatrix, A::AbstractSparseMatrixCSC, α::Number, β::Number) mX, nX = size(X) nX == size(A, 1) || throw(DimensionMismatch()) @@ -120,49 +91,50 @@ function mul!(C::StridedVecOrMat, X::AdjOrTransStridedOrTriangularMatrix, A::Abs if β != 1 β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) end - @inbounds for multivec_row=1:mX, col = 1:size(A, 2), k=getcolptr(A)[col]:(getcolptr(A)[col+1]-1) - C[multivec_row, col] += α * X[multivec_row, rv[k]] * nzv[k] # perhaps suboptimal position of α? + if X isa StridedOrTriangularMatrix + @inbounds for col in 1:size(A, 2), k in nzrange(A, col) + Aiα = nzv[k] * α + rvk = rv[k] + @simd for multivec_row in 1:mX + C[multivec_row, col] += X[multivec_row, rvk] * Aiα + end + end + else # X isa Adjoint or Transpose + for multivec_row in 1:mX, col in 1:size(A, 2) + @inbounds for k in nzrange(A, col) + C[multivec_row, col] += X[multivec_row, rv[k]] * nzv[k] * α + end + end end C end *(X::AdjOrTransStridedOrTriangularMatrix, A::SparseMatrixCSCUnion{TvA}) where {TvA} = (T = promote_op(matprod, eltype(X), TvA); mul!(similar(X, T, (size(X, 1), size(A, 2))), X, A, true, false)) -function mul!(C::StridedVecOrMat, X::AdjOrTransStridedOrTriangularMatrix, adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}, α::Number, β::Number) - A = adjA.parent - mX, nX = size(X) - nX == size(A, 2) || throw(DimensionMismatch()) - mX == size(C, 1) || throw(DimensionMismatch()) - size(A, 1) == size(C, 2) || throw(DimensionMismatch()) - rv = rowvals(A) - nzv = nonzeros(A) - if β != 1 - β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) - end - @inbounds for col = 1:size(A, 2), k=getcolptr(A)[col]:(getcolptr(A)[col+1]-1), multivec_col=1:mX - C[multivec_col, rv[k]] += α * X[multivec_col, col] * adjoint(nzv[k]) # perhaps suboptimal position of α? +for (T, t) in ((Adjoint, adjoint), (Transpose, transpose)) + @eval function mul!(C::StridedVecOrMat, X::AdjOrTransStridedOrTriangularMatrix, xA::$T{<:Any,<:AbstractSparseMatrixCSC}, α::Number, β::Number) + A = xA.parent + mX, nX = size(X) + nX == size(A, 2) || throw(DimensionMismatch()) + mX == size(C, 1) || throw(DimensionMismatch()) + size(A, 1) == size(C, 2) || throw(DimensionMismatch()) + rv = rowvals(A) + nzv = nonzeros(A) + if β != 1 + β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) + end + @inbounds for col in 1:size(A, 2), k in nzrange(A, col) + Aiα = $t(nzv[k]) * α + rvk = rv[k] + @simd for multivec_col in 1:mX + C[multivec_col, rvk] += X[multivec_col, col] * Aiα + end + end + C end - C end *(X::AdjOrTransStridedOrTriangularMatrix, adjA::Adjoint{<:Any,<:AbstractSparseMatrixCSC}) = (T = promote_op(matprod, eltype(X), eltype(adjA)); mul!(similar(X, T, (size(X, 1), size(adjA, 2))), X, adjA, true, false)) - -function mul!(C::StridedVecOrMat, X::AdjOrTransStridedOrTriangularMatrix, transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}, α::Number, β::Number) - A = transA.parent - mX, nX = size(X) - nX == size(A, 2) || throw(DimensionMismatch()) - mX == size(C, 1) || throw(DimensionMismatch()) - size(A, 1) == size(C, 2) || throw(DimensionMismatch()) - rv = rowvals(A) - nzv = nonzeros(A) - if β != 1 - β != 0 ? rmul!(C, β) : fill!(C, zero(eltype(C))) - end - @inbounds for col = 1:size(A, 2), k=getcolptr(A)[col]:(getcolptr(A)[col+1]-1), multivec_col=1:mX - C[multivec_col, rv[k]] += α * X[multivec_col, col] * transpose(nzv[k]) # perhaps suboptimal position of α? - end - C -end *(X::AdjOrTransStridedOrTriangularMatrix, transA::Transpose{<:Any,<:AbstractSparseMatrixCSC}) = (T = promote_op(matprod, eltype(X), eltype(transA)); mul!(similar(X, T, (size(X, 1), size(transA, 2))), X, transA, true, false)) @@ -896,7 +868,7 @@ function ldiv!(D::Diagonal{T}, A::AbstractSparseMatrixCSC{T}) where {T} for i=1:length(b) iszero(b[i]) && throw(SingularException(i)) end - @inbounds for col = 1:size(A, 2), p = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) + @inbounds for col in 1:size(A, 2), p in nzrange(A, col) nonz[p] = b[Arowval[p]] \ nonz[p] end A @@ -916,7 +888,7 @@ function triu(S::AbstractSparseMatrixCSC{Tv,Ti}, k::Integer=0) where {Tv,Ti} colptr[col] = 1 end for col = max(k+1,1) : n - for c1 = getcolptr(S)[col] : getcolptr(S)[col+1]-1 + for c1 in nzrange(S, col) rowvals(S)[c1] > col - k && break nnz += 1 end @@ -927,7 +899,7 @@ function triu(S::AbstractSparseMatrixCSC{Tv,Ti}, k::Integer=0) where {Tv,Ti} A = SparseMatrixCSC(m, n, colptr, rowval, nzval) for col = max(k+1,1) : n c1 = getcolptr(S)[col] - for c2 = getcolptr(A)[col] : getcolptr(A)[col+1]-1 + for c2 in nzrange(A, col) rowvals(A)[c2] = rowvals(S)[c1] nonzeros(A)[c2] = nonzeros(S)[c1] c1 += 1 @@ -981,7 +953,7 @@ function sparse_diff1(S::AbstractSparseMatrixCSC{Tv,Ti}) where {Tv,Ti} for col = 1 : n last_row = 0 last_val = 0 - for k = getcolptr(S)[col] : getcolptr(S)[col+1]-1 + for k in nzrange(S, col) row = rowvals(S)[k] val = nonzeros(S)[k] if row > 1 @@ -1124,7 +1096,7 @@ function opnorm(A::AbstractSparseMatrixCSC, p::Real=2) nA::Tsum = 0 for j=1:n colSum::Tsum = 0 - for i = getcolptr(A)[j]:getcolptr(A)[j+1]-1 + for i in nzrange(A, j) colSum += abs(nonzeros(A)[i]) end nA = max(nA, colSum) @@ -1469,7 +1441,7 @@ function mul!(C::AbstractSparseMatrixCSC, A::AbstractSparseMatrixCSC, D::Diagona Cnzval = nonzeros(C) Anzval = nonzeros(A) resize!(Cnzval, length(Anzval)) - for col = 1:n, p = getcolptr(A)[col]:(getcolptr(A)[col+1]-1) + for col in 1:n, p in nzrange(A, col) @inbounds Cnzval[p] = Anzval[p] * b[col] end C @@ -1484,7 +1456,7 @@ function mul!(C::AbstractSparseMatrixCSC, D::Diagonal, A::AbstractSparseMatrixCS Anzval = nonzeros(A) Arowval = rowvals(A) resize!(Cnzval, length(Anzval)) - for col = 1:n, p = getcolptr(A)[col]:(getcolptr(A)[col+1]-1) + for col in 1:n, p in nzrange(A, col) @inbounds Cnzval[p] = b[Arowval[p]] * Anzval[p] end C @@ -1520,7 +1492,7 @@ function rmul!(A::AbstractSparseMatrixCSC, D::Diagonal) m, n = size(A) (n == size(D, 1)) || throw(DimensionMismatch()) Anzval = nonzeros(A) - @inbounds for col = 1:n, p = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) + @inbounds for col in 1:n, p in nzrange(A, col) Anzval[p] = Anzval[p] * D.diag[col] end return A @@ -1531,7 +1503,7 @@ function lmul!(D::Diagonal, A::AbstractSparseMatrixCSC) (m == size(D, 2)) || throw(DimensionMismatch()) Anzval = nonzeros(A) Arowval = rowvals(A) - @inbounds for col = 1:n, p = getcolptr(A)[col]:(getcolptr(A)[col + 1] - 1) + @inbounds for col in 1:n, p in nzrange(A, col) Anzval[p] = D.diag[Arowval[p]] * Anzval[p] end return A From 6c1824d99769fa79f69eb866ce76df674fd37878 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Tue, 12 Jan 2021 18:51:28 +0100 Subject: [PATCH 069/239] Let tmerge form a Union more often (#27843) Let tmerge decide whether to directly form a Union based on unioncomplexity, not concreteness. --- base/compiler/typelimits.jl | 7 ++++--- test/compiler/inference.jl | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index aa1695569d061..156630460d81b 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -355,9 +355,10 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb)) return Any end typea == typeb && return typea - # it's always ok to form a Union of two concrete types - if (isconcretetype(typea) || isType(typea)) && (isconcretetype(typeb) || isType(typeb)) - return Union{typea, typeb} + # it's always ok to form a Union of two Union-free types + u = Union{typea, typeb} + if unioncomplexity(u) <= 1 + return u end # collect the list of types from past tmerge calls returning Union # and then reduce over that list diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index e1f2df6efe6e7..5a2d806b237ae 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -2041,6 +2041,16 @@ let rt = Base.return_types(splat27434, (NamedTuple{(:x,), Tuple{T}} where T,)) @test !Base.has_free_typevars(rt[1]) end +# PR #27843 +bar27843(x, y::Bool) = fill(x, 0) +bar27843(x, y) = fill(x, ntuple(_ -> 0, y))::Array{typeof(x)} +foo27843(x, y) = bar27843(x, y) +@test Core.Compiler.return_type(foo27843, Tuple{Union{Float64,Int}, Any}) == Union{Array{Float64}, Array{Int}} +let atypes1 = Tuple{Union{IndexCartesian, IndexLinear}, Any, Union{Tuple{}, Tuple{Any,Vararg{Any,N}} where N}, Tuple}, + atypes2 = Tuple{Union{IndexCartesian, IndexLinear}, Any, Tuple, Tuple} + @test Core.Compiler.return_type(SubArray, atypes1) <: Core.Compiler.return_type(SubArray, atypes2) +end + # issue #27078 f27078(T::Type{S}) where {S} = isa(T, UnionAll) ? f27078(T.body) : T T27078 = Vector{Vector{T}} where T From 2bbd5fb2f0c89d87f13863b6c17a6ca0205291be Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 4 Jan 2021 11:12:18 -0500 Subject: [PATCH 070/239] add patches for PPC --- deps/llvm.mk | 4 +- .../llvm-11-D93092-ppc-knownbits.patch | 51 +- deps/patches/llvm-11-ppc-half-ctr.patch | 96 +++ deps/patches/llvm-11-ppc-sp-from-bp.patch | 621 ++++++++++++++++++ 4 files changed, 750 insertions(+), 22 deletions(-) create mode 100644 deps/patches/llvm-11-ppc-half-ctr.patch create mode 100644 deps/patches/llvm-11-ppc-sp-from-bp.patch diff --git a/deps/llvm.mk b/deps/llvm.mk index f5a4060070320..794e340283d55 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -531,8 +531,10 @@ $(eval $(call LLVM_PATCH,llvm-11-D90722-rtdyld-absolute-relocs)) # remove for LL $(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # upstreamed as D92210 $(eval $(call LLVM_PATCH,llvm-11-D92906-ppc-setjmp)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-PR48458-X86ISelDAGToDAG)) # remove for LLVM 12 -$(eval $(call LLVM_PATCH,llvm-11-D93092-ppc-knownbits)) +$(eval $(call LLVM_PATCH,llvm-11-D93092-ppc-knownbits)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as)) +$(eval $(call LLVM_PATCH,llvm-11-ppc-half-ctr)) # remove for LLVM 12 +$(eval $(call LLVM_PATCH,llvm-11-ppc-sp-from-bp)) # remove for LLVM 12 endif # LLVM_VER 11.0 diff --git a/deps/patches/llvm-11-D93092-ppc-knownbits.patch b/deps/patches/llvm-11-D93092-ppc-knownbits.patch index a4ebecafc82a9..47e6f743ddefd 100644 --- a/deps/patches/llvm-11-D93092-ppc-knownbits.patch +++ b/deps/patches/llvm-11-D93092-ppc-knownbits.patch @@ -1,8 +1,8 @@ -From 8bec64e2c0386934d4e38344907f0f4b0de4d8a3 Mon Sep 17 00:00:00 2001 -From: Valentin Churavy -Date: Tue, 15 Dec 2020 09:59:18 -0500 -Subject: [PATCH] [PowerPC] KnownBits should be constant when performing - non-sign comparison +From b5a0e6ca2b0c6367b082dd9a77b02c26607c8d7d Mon Sep 17 00:00:00 2001 +From: Kai Luo +Date: Tue, 29 Dec 2020 12:11:55 +0000 +Subject: [PATCH 2/4] [PowerPC] Remaining KnownBits should be constant when + performing non-sign comparison In `PPCTargetLowering::DAGCombineTruncBoolExt`, when checking if it's correct to perform the transformation for non-sign comparison, as the comment says ``` @@ -23,20 +23,30 @@ Bit 4, besides bit 0, is still unknown and affects the final result. This patch fixes https://bugs.llvm.org/show_bug.cgi?id=48388. +Reviewed By: nemanjai, #powerpc + Differential Revision: https://reviews.llvm.org/D93092 --- - llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 3 +- - llvm/test/CodeGen/PowerPC/pr48388.ll | 42 +++++++++++++++++++++ - 2 files changed, 44 insertions(+), 1 deletion(-) + llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 10 +++-- + llvm/test/CodeGen/PowerPC/pr48388.ll | 41 +++++++++++++++++++++ + 2 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 llvm/test/CodeGen/PowerPC/pr48388.ll diff --git llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp -index f54f1673526d..76b32db44656 100644 +index f54f1673526d..38dbff4197b9 100644 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp -@@ -13291,7 +13291,8 @@ SDValue PPCTargetLowering::DAGCombineTruncBoolExt(SDNode *N, - Op1Known.Zero.clearBit(0); Op1Known.One.clearBit(0); - Op2Known.Zero.clearBit(0); Op2Known.One.clearBit(0); +@@ -13287,11 +13287,13 @@ SDValue PPCTargetLowering::DAGCombineTruncBoolExt(SDNode *N, + KnownBits Op2Known = DAG.computeKnownBits(N->getOperand(1)); + + // We don't really care about what is known about the first bit (if +- // anything), so clear it in all masks prior to comparing them. +- Op1Known.Zero.clearBit(0); Op1Known.One.clearBit(0); +- Op2Known.Zero.clearBit(0); Op2Known.One.clearBit(0); ++ // anything), so pretend that it is known zero for both to ensure they can ++ // be compared as constants. ++ Op1Known.Zero.setBit(0); Op1Known.One.clearBit(0); ++ Op2Known.Zero.setBit(0); Op2Known.One.clearBit(0); - if (Op1Known.Zero != Op2Known.Zero || Op1Known.One != Op2Known.One) + if (!Op1Known.isConstant() || !Op2Known.isConstant() || @@ -46,10 +56,10 @@ index f54f1673526d..76b32db44656 100644 } diff --git llvm/test/CodeGen/PowerPC/pr48388.ll llvm/test/CodeGen/PowerPC/pr48388.ll new file mode 100644 -index 000000000000..138fb6147832 +index 000000000000..822e5d852317 --- /dev/null +++ llvm/test/CodeGen/PowerPC/pr48388.ll -@@ -0,0 +1,42 @@ +@@ -0,0 +1,41 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -verify-machineinstrs -mtriple=powerpc64le -ppc-asm-full-reg-names \ +; RUN: < %s | FileCheck %s @@ -58,13 +68,12 @@ index 000000000000..138fb6147832 +; CHECK-LABEL: julia_div_i64: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: divd r6, r3, r4 -+; CHECK-NEXT: li r5, 32767 -+; CHECK-NEXT: sldi r5, r5, 32 -+; CHECK-NEXT: oris r7, r5, 40069 -+; CHECK-NEXT: oris r5, r5, 40079 ++; CHECK-NEXT: lis r5, -1592 ++; CHECK-NEXT: ori r7, r5, 21321 ++; CHECK-NEXT: ori r5, r5, 65519 +; CHECK-NEXT: cmpdi r3, 0 -+; CHECK-NEXT: ori r7, r7, 13456 -+; CHECK-NEXT: ori r5, r5, 65264 ++; CHECK-NEXT: rldic r7, r7, 4, 17 ++; CHECK-NEXT: rldic r5, r5, 4, 17 +; CHECK-NEXT: iselgt r9, r5, r7 +; CHECK-NEXT: cmpdi r4, 0 +; CHECK-NEXT: mulld r8, r6, r4 @@ -93,5 +102,5 @@ index 000000000000..138fb6147832 + ret i64 %12 +} -- -2.29.2 +2.30.0 diff --git a/deps/patches/llvm-11-ppc-half-ctr.patch b/deps/patches/llvm-11-ppc-half-ctr.patch new file mode 100644 index 0000000000000..e9a9b9a4d5f86 --- /dev/null +++ b/deps/patches/llvm-11-ppc-half-ctr.patch @@ -0,0 +1,96 @@ +From 79a73d6388790cfec9bd76b1790f0f5551a9df8c Mon Sep 17 00:00:00 2001 +From: Nemanja Ivanovic +Date: Mon, 28 Dec 2020 22:51:51 -0600 +Subject: [PATCH 1/4] [PowerPC] Disable CTR loops containing operations on + half-precision + +On subtargets prior to Power9, conversions to/from half precision +are lowered to libcalls. This makes loops containing such operations +invalid candidates for HW loops. + +Fixes: https://bugs.llvm.org/show_bug.cgi?id=48519 +--- + .../Target/PowerPC/PPCTargetTransformInfo.cpp | 4 ++ + llvm/test/CodeGen/PowerPC/pr48519.ll | 55 +++++++++++++++++++ + 2 files changed, 59 insertions(+) + create mode 100644 llvm/test/CodeGen/PowerPC/pr48519.ll + +diff --git llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +index 53556ffc267d..49c10fdf8898 100644 +--- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp ++++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +@@ -441,6 +441,10 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, + isLargeIntegerTy(!TM.isPPC64(), CI->getSrcTy()->getScalarType()) || + isLargeIntegerTy(!TM.isPPC64(), CI->getDestTy()->getScalarType())) + return true; ++ if (!ST->isISA3_0() && ++ (CI->getSrcTy()->getScalarType()->isHalfTy() || ++ CI->getDestTy()->getScalarType()->isHalfTy())) ++ return true; + } else if (isLargeIntegerTy(!TM.isPPC64(), + J->getType()->getScalarType()) && + (J->getOpcode() == Instruction::UDiv || +diff --git llvm/test/CodeGen/PowerPC/pr48519.ll llvm/test/CodeGen/PowerPC/pr48519.ll +new file mode 100644 +index 000000000000..777874e91c26 +--- /dev/null ++++ llvm/test/CodeGen/PowerPC/pr48519.ll +@@ -0,0 +1,55 @@ ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ++; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ ++; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s ++define void @julia__typed_vcat_20() #0 { ++; CHECK-LABEL: julia__typed_vcat_20: ++; CHECK: # %bb.0: # %top ++; CHECK-NEXT: mflr r0 ++; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill ++; CHECK-NEXT: std r0, 16(r1) ++; CHECK-NEXT: stdu r1, -48(r1) ++; CHECK-NEXT: li r3, 1 ++; CHECK-NEXT: li r30, 0 ++; CHECK-NEXT: .p2align 4 ++; CHECK-NEXT: .LBB0_1: # %L139 ++; CHECK-NEXT: # ++; CHECK-NEXT: addi r3, r3, -1 ++; CHECK-NEXT: mtfprd f0, r3 ++; CHECK-NEXT: xscvsxdsp f1, f0 ++; CHECK-NEXT: bl __gnu_f2h_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: bl __gnu_h2f_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: addi r30, r30, -1 ++; CHECK-NEXT: li r3, 0 ++; CHECK-NEXT: cmpldi r30, 0 ++; CHECK-NEXT: bne+ cr0, .LBB0_1 ++; CHECK-NEXT: # %bb.2: # %pass.1 ++; CHECK-NEXT: bl __gnu_f2h_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: sth r3, 0(r3) ++top: ++ %.sroa.6.0.copyload = load i64, i64 addrspace(11)* null, align 8 ++ %0 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %.sroa.6.0.copyload, i64 0) ++ %1 = extractvalue { i64, i1 } %0, 0 ++ br label %L139 ++ ++L139: ; preds = %L139, %top ++ %value_phi21 = phi i64 [ %5, %L139 ], [ 1, %top ] ++ %value_phi23 = phi i64 [ 0, %L139 ], [ 1, %top ] ++ %2 = add nsw i64 %value_phi23, -1 ++ %3 = add i64 %2, 0 ++ %4 = sitofp i64 %3 to half ++ store half %4, half addrspace(13)* undef, align 2 ++ %.not101.not = icmp eq i64 %value_phi21, 0 ++ %5 = add i64 %value_phi21, 1 ++ br i1 %.not101.not, label %pass.1, label %L139 ++ ++pass.1: ; preds = %L139 ++ unreachable ++} ++ ++; Function Attrs: nounwind readnone speculatable willreturn ++declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64, i64) #0 ++ ++attributes #0 = { nounwind } +-- +2.30.0 + diff --git a/deps/patches/llvm-11-ppc-sp-from-bp.patch b/deps/patches/llvm-11-ppc-sp-from-bp.patch new file mode 100644 index 0000000000000..014cfb237a303 --- /dev/null +++ b/deps/patches/llvm-11-ppc-sp-from-bp.patch @@ -0,0 +1,621 @@ +From 646760460fa06f8577d35282cde5faf8f0ed8499 Mon Sep 17 00:00:00 2001 +From: Nemanja Ivanovic +Date: Tue, 22 Dec 2020 05:43:33 -0600 +Subject: [PATCH 4/4] [PowerPC] Restore stack ptr from base ptr when available + +On subtargets that have a red zone, we will copy the stack pointer to the base +pointer in the prologue prior to updating the stack pointer. There are no other +updates to the base pointer after that. This suggests that we should be able to +restore the stack pointer from the base pointer rather than loading it from the +back chain or adding the frame size back to either the stack pointer or the +frame pointer. +This came about because functions that call setjmp need to restore the SP from +the FP because the back chain might have been clobbered +(see https://reviews.llvm.org/D92906). However, if the stack is realigned, the +restored SP might be incorrect (which is what caused the failures in the two +ASan test cases). + +This patch was tested quite extensivelly both with sanitizer runtimes and +general code. + +Differential revision: https://reviews.llvm.org/D93327 +--- + llvm/lib/Target/PowerPC/PPCFrameLowering.cpp | 9 +- + llvm/test/CodeGen/PowerPC/aix-base-pointer.ll | 8 +- + llvm/test/CodeGen/PowerPC/pr46759.ll | 2 +- + .../CodeGen/PowerPC/stack-clash-prologue.ll | 498 ++++++++++++++++++ + llvm/test/CodeGen/PowerPC/stack-realign.ll | 4 +- + 5 files changed, 513 insertions(+), 8 deletions(-) + +diff --git llvm/lib/Target/PowerPC/PPCFrameLowering.cpp llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +index 66db0f199e15..80cbaa475184 100644 +--- llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ++++ llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +@@ -1704,11 +1704,18 @@ void PPCFrameLowering::emitEpilogue(MachineFunction &MF, + // offset by the STDU/STDUX/STWU/STWUX instruction. For targets with red + // zone add this offset back now. + ++ // If the function has a base pointer, the stack pointer has been copied ++ // to it so we can restore it by copying in the other direction. ++ if (HasRedZone && HasBP) { ++ BuildMI(MBB, MBBI, dl, OrInst, RBReg). ++ addReg(BPReg). ++ addReg(BPReg); ++ } + // If this function contained a fastcc call and GuaranteedTailCallOpt is + // enabled (=> hasFastCall()==true) the fastcc call might contain a tail + // call which invalidates the stack pointer value in SP(0). So we use the + // value of R31 in this case. Similar situation exists with setjmp. +- if (FI->hasFastCall() || MF.exposesReturnsTwice()) { ++ else if (FI->hasFastCall() || MF.exposesReturnsTwice()) { + assert(HasFP && "Expecting a valid frame pointer."); + if (!HasRedZone) + RBReg = FPReg; +diff --git llvm/test/CodeGen/PowerPC/aix-base-pointer.ll llvm/test/CodeGen/PowerPC/aix-base-pointer.ll +index 2566e31c025d..5141fd9e4222 100644 +--- llvm/test/CodeGen/PowerPC/aix-base-pointer.ll ++++ llvm/test/CodeGen/PowerPC/aix-base-pointer.ll +@@ -27,8 +27,8 @@ declare void @callee(i32*) + ; 32BIT: stwux 1, 1, 0 + ; 32BIT: addi 3, 1, 64 + ; 32BIT: bl .callee +-; 32BIT: lwz 1, 0(1) +-; 32BIT: lwz 30, -8(1) ++; 32BIT: mr 1, 30 ++; 32BIT: lwz 30, -16(1) + + ; 64BIT-LABEL: .caller: + ; 64BIT: std 30, -16(1) +@@ -38,5 +38,5 @@ declare void @callee(i32*) + ; 64BIT: stdux 1, 1, 0 + ; 64BIT: addi 3, 1, 128 + ; 64BIT: bl .callee +-; 64BIT: ld 1, 0(1) +-; 64BIT: ld 30, -16(1) ++; 64BIT: mr 1, 30 ++; 64BIT: ld 30, -24(1) +diff --git llvm/test/CodeGen/PowerPC/pr46759.ll llvm/test/CodeGen/PowerPC/pr46759.ll +index d1d68a5db7e3..92f2c64bc06a 100644 +--- llvm/test/CodeGen/PowerPC/pr46759.ll ++++ llvm/test/CodeGen/PowerPC/pr46759.ll +@@ -45,7 +45,7 @@ define void @foo(i32 %vla_size) #0 { + ; CHECK-LE-NEXT: .LBB0_2: # %entry + ; CHECK-LE-NEXT: addi r3, r1, 2048 + ; CHECK-LE-NEXT: lbz r3, 0(r3) +-; CHECK-LE-NEXT: ld r1, 0(r1) ++; CHECK-LE-NEXT: mr r1, r30 + ; CHECK-LE-NEXT: ld r31, -8(r1) + ; CHECK-LE-NEXT: ld r30, -16(r1) + ; CHECK-LE-NEXT: blr +diff --git llvm/test/CodeGen/PowerPC/stack-clash-prologue.ll llvm/test/CodeGen/PowerPC/stack-clash-prologue.ll +index cb513be9128c..6443059c9704 100644 +--- llvm/test/CodeGen/PowerPC/stack-clash-prologue.ll ++++ llvm/test/CodeGen/PowerPC/stack-clash-prologue.ll +@@ -528,4 +528,502 @@ entry: + ret i8 %c + } + ++; alloca + align < probe_size ++define i32 @f8(i64 %i) local_unnamed_addr #0 { ++; CHECK-LE-LABEL: f8: ++; CHECK-LE: # %bb.0: ++; CHECK-LE-NEXT: clrldi r0, r1, 58 ++; CHECK-LE-NEXT: std r30, -16(r1) ++; CHECK-LE-NEXT: mr r30, r1 ++; CHECK-LE-NEXT: subfic r0, r0, -896 ++; CHECK-LE-NEXT: stdux r1, r1, r0 ++; CHECK-LE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-LE-NEXT: .cfi_offset r30, -16 ++; CHECK-LE-NEXT: addi r4, r1, 64 ++; CHECK-LE-NEXT: sldi r3, r3, 2 ++; CHECK-LE-NEXT: li r5, 1 ++; CHECK-LE-NEXT: stwx r5, r4, r3 ++; CHECK-LE-NEXT: lwz r3, 64(r1) ++; CHECK-LE-NEXT: mr r1, r30 ++; CHECK-LE-NEXT: ld r30, -16(r1) ++; CHECK-LE-NEXT: blr ++; ++; CHECK-BE-LABEL: f8: ++; CHECK-BE: # %bb.0: ++; CHECK-BE-NEXT: clrldi r0, r1, 58 ++; CHECK-BE-NEXT: std r30, -16(r1) ++; CHECK-BE-NEXT: mr r30, r1 ++; CHECK-BE-NEXT: subfic r0, r0, -896 ++; CHECK-BE-NEXT: stdux r1, r1, r0 ++; CHECK-BE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-BE-NEXT: .cfi_offset r30, -16 ++; CHECK-BE-NEXT: addi r4, r1, 64 ++; CHECK-BE-NEXT: li r5, 1 ++; CHECK-BE-NEXT: sldi r3, r3, 2 ++; CHECK-BE-NEXT: stwx r5, r4, r3 ++; CHECK-BE-NEXT: lwz r3, 64(r1) ++; CHECK-BE-NEXT: mr r1, r30 ++; CHECK-BE-NEXT: ld r30, -16(r1) ++; CHECK-BE-NEXT: blr ++; ++; CHECK-32-LABEL: f8: ++; CHECK-32: # %bb.0: ++; CHECK-32-NEXT: clrlwi r0, r1, 26 ++; CHECK-32-NEXT: subfic r0, r0, -896 ++; CHECK-32-NEXT: stwux r1, r1, r0 ++; CHECK-32-NEXT: sub r0, r1, r0 ++; CHECK-32-NEXT: addic r0, r0, -8 ++; CHECK-32-NEXT: stwx r30, 0, r0 ++; CHECK-32-NEXT: addic r30, r0, 8 ++; CHECK-32-NEXT: .cfi_def_cfa_register r30 ++; CHECK-32-NEXT: .cfi_offset r30, -8 ++; CHECK-32-NEXT: addi r3, r1, 64 ++; CHECK-32-NEXT: li r5, 1 ++; CHECK-32-NEXT: slwi r4, r4, 2 ++; CHECK-32-NEXT: stwx r5, r3, r4 ++; CHECK-32-NEXT: mr r0, r31 ++; CHECK-32-NEXT: lwz r3, 64(r1) ++; CHECK-32-NEXT: lwz r31, 0(r1) ++; CHECK-32-NEXT: lwz r30, -8(r31) ++; CHECK-32-NEXT: mr r1, r31 ++; CHECK-32-NEXT: mr r31, r0 ++; CHECK-32-NEXT: blr ++ %a = alloca i32, i32 200, align 64 ++ %b = getelementptr inbounds i32, i32* %a, i64 %i ++ store volatile i32 1, i32* %b ++ %c = load volatile i32, i32* %a ++ ret i32 %c ++} ++ ++; alloca > probe_size, align > probe_size ++define i32 @f9(i64 %i) local_unnamed_addr #0 { ++; CHECK-LE-LABEL: f9: ++; CHECK-LE: # %bb.0: ++; CHECK-LE-NEXT: std r30, -16(r1) ++; CHECK-LE-NEXT: mr r30, r1 ++; CHECK-LE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-LE-NEXT: clrldi r0, r30, 53 ++; CHECK-LE-NEXT: subc r12, r30, r0 ++; CHECK-LE-NEXT: clrldi r0, r0, 52 ++; CHECK-LE-NEXT: cmpdi r0, 0 ++; CHECK-LE-NEXT: beq cr0, .LBB9_2 ++; CHECK-LE-NEXT: # %bb.1: ++; CHECK-LE-NEXT: neg r0, r0 ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: .LBB9_2: ++; CHECK-LE-NEXT: li r0, -4096 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: beq cr0, .LBB9_4 ++; CHECK-LE-NEXT: .LBB9_3: ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: bne cr0, .LBB9_3 ++; CHECK-LE-NEXT: .LBB9_4: ++; CHECK-LE-NEXT: mr r12, r30 ++; CHECK-LE-NEXT: stdu r12, -2048(r1) ++; CHECK-LE-NEXT: stdu r12, -4096(r1) ++; CHECK-LE-NEXT: stdu r12, -4096(r1) ++; CHECK-LE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-LE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-LE-NEXT: .cfi_offset r30, -16 ++; CHECK-LE-NEXT: addi r4, r1, 2048 ++; CHECK-LE-NEXT: sldi r3, r3, 2 ++; CHECK-LE-NEXT: li r5, 1 ++; CHECK-LE-NEXT: stwx r5, r4, r3 ++; CHECK-LE-NEXT: lwz r3, 2048(r1) ++; CHECK-LE-NEXT: mr r1, r30 ++; CHECK-LE-NEXT: ld r30, -16(r1) ++; CHECK-LE-NEXT: blr ++; ++; CHECK-BE-LABEL: f9: ++; CHECK-BE: # %bb.0: ++; CHECK-BE-NEXT: std r30, -16(r1) ++; CHECK-BE-NEXT: mr r30, r1 ++; CHECK-BE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-BE-NEXT: clrldi r0, r30, 53 ++; CHECK-BE-NEXT: subc r12, r30, r0 ++; CHECK-BE-NEXT: clrldi r0, r0, 52 ++; CHECK-BE-NEXT: cmpdi r0, 0 ++; CHECK-BE-NEXT: beq cr0, .LBB9_2 ++; CHECK-BE-NEXT: # %bb.1: ++; CHECK-BE-NEXT: neg r0, r0 ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: .LBB9_2: ++; CHECK-BE-NEXT: li r0, -4096 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: beq cr0, .LBB9_4 ++; CHECK-BE-NEXT: .LBB9_3: ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: bne cr0, .LBB9_3 ++; CHECK-BE-NEXT: .LBB9_4: ++; CHECK-BE-NEXT: mr r12, r30 ++; CHECK-BE-NEXT: stdu r12, -2048(r1) ++; CHECK-BE-NEXT: stdu r12, -4096(r1) ++; CHECK-BE-NEXT: stdu r12, -4096(r1) ++; CHECK-BE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-BE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-BE-NEXT: .cfi_offset r30, -16 ++; CHECK-BE-NEXT: addi r4, r1, 2048 ++; CHECK-BE-NEXT: li r5, 1 ++; CHECK-BE-NEXT: sldi r3, r3, 2 ++; CHECK-BE-NEXT: stwx r5, r4, r3 ++; CHECK-BE-NEXT: lwz r3, 2048(r1) ++; CHECK-BE-NEXT: mr r1, r30 ++; CHECK-BE-NEXT: ld r30, -16(r1) ++; CHECK-BE-NEXT: blr ++; ++; CHECK-32-LABEL: f9: ++; CHECK-32: # %bb.0: ++; CHECK-32-NEXT: mr r12, r1 ++; CHECK-32-NEXT: .cfi_def_cfa r12, 0 ++; CHECK-32-NEXT: clrlwi r0, r12, 21 ++; CHECK-32-NEXT: subc r1, r1, r0 ++; CHECK-32-NEXT: stwu r12, -2048(r1) ++; CHECK-32-NEXT: stwu r12, -4096(r1) ++; CHECK-32-NEXT: stwu r12, -4096(r1) ++; CHECK-32-NEXT: .cfi_def_cfa_register r1 ++; CHECK-32-NEXT: sub r0, r1, r12 ++; CHECK-32-NEXT: sub r0, r1, r0 ++; CHECK-32-NEXT: addic r0, r0, -8 ++; CHECK-32-NEXT: stwx r30, 0, r0 ++; CHECK-32-NEXT: addic r30, r0, 8 ++; CHECK-32-NEXT: .cfi_def_cfa_register r30 ++; CHECK-32-NEXT: .cfi_offset r30, -8 ++; CHECK-32-NEXT: addi r3, r1, 2048 ++; CHECK-32-NEXT: li r5, 1 ++; CHECK-32-NEXT: slwi r4, r4, 2 ++; CHECK-32-NEXT: stwx r5, r3, r4 ++; CHECK-32-NEXT: mr r0, r31 ++; CHECK-32-NEXT: lwz r3, 2048(r1) ++; CHECK-32-NEXT: lwz r31, 0(r1) ++; CHECK-32-NEXT: lwz r30, -8(r31) ++; CHECK-32-NEXT: mr r1, r31 ++; CHECK-32-NEXT: mr r31, r0 ++; CHECK-32-NEXT: blr ++ %a = alloca i32, i32 2000, align 2048 ++ %b = getelementptr inbounds i32, i32* %a, i64 %i ++ store volatile i32 1, i32* %b ++ %c = load volatile i32, i32* %a ++ ret i32 %c ++} ++ ++; alloca < probe_size, align < probe_size, alloca + align > probe_size ++define i32 @f10(i64 %i) local_unnamed_addr #0 { ++; CHECK-LE-LABEL: f10: ++; CHECK-LE: # %bb.0: ++; CHECK-LE-NEXT: std r30, -16(r1) ++; CHECK-LE-NEXT: mr r30, r1 ++; CHECK-LE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-LE-NEXT: clrldi r0, r30, 54 ++; CHECK-LE-NEXT: subc r12, r30, r0 ++; CHECK-LE-NEXT: clrldi r0, r0, 52 ++; CHECK-LE-NEXT: cmpdi r0, 0 ++; CHECK-LE-NEXT: beq cr0, .LBB10_2 ++; CHECK-LE-NEXT: # %bb.1: ++; CHECK-LE-NEXT: neg r0, r0 ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: .LBB10_2: ++; CHECK-LE-NEXT: li r0, -4096 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: beq cr0, .LBB10_4 ++; CHECK-LE-NEXT: .LBB10_3: ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: bne cr0, .LBB10_3 ++; CHECK-LE-NEXT: .LBB10_4: ++; CHECK-LE-NEXT: mr r12, r30 ++; CHECK-LE-NEXT: stdu r12, -1024(r1) ++; CHECK-LE-NEXT: stdu r12, -4096(r1) ++; CHECK-LE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-LE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-LE-NEXT: .cfi_offset r30, -16 ++; CHECK-LE-NEXT: addi r4, r1, 1024 ++; CHECK-LE-NEXT: sldi r3, r3, 2 ++; CHECK-LE-NEXT: li r5, 1 ++; CHECK-LE-NEXT: stwx r5, r4, r3 ++; CHECK-LE-NEXT: lwz r3, 1024(r1) ++; CHECK-LE-NEXT: mr r1, r30 ++; CHECK-LE-NEXT: ld r30, -16(r1) ++; CHECK-LE-NEXT: blr ++; ++; CHECK-BE-LABEL: f10: ++; CHECK-BE: # %bb.0: ++; CHECK-BE-NEXT: std r30, -16(r1) ++; CHECK-BE-NEXT: mr r30, r1 ++; CHECK-BE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-BE-NEXT: clrldi r0, r30, 54 ++; CHECK-BE-NEXT: subc r12, r30, r0 ++; CHECK-BE-NEXT: clrldi r0, r0, 52 ++; CHECK-BE-NEXT: cmpdi r0, 0 ++; CHECK-BE-NEXT: beq cr0, .LBB10_2 ++; CHECK-BE-NEXT: # %bb.1: ++; CHECK-BE-NEXT: neg r0, r0 ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: .LBB10_2: ++; CHECK-BE-NEXT: li r0, -4096 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: beq cr0, .LBB10_4 ++; CHECK-BE-NEXT: .LBB10_3: ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: bne cr0, .LBB10_3 ++; CHECK-BE-NEXT: .LBB10_4: ++; CHECK-BE-NEXT: mr r12, r30 ++; CHECK-BE-NEXT: stdu r12, -1024(r1) ++; CHECK-BE-NEXT: stdu r12, -4096(r1) ++; CHECK-BE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-BE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-BE-NEXT: .cfi_offset r30, -16 ++; CHECK-BE-NEXT: addi r4, r1, 1024 ++; CHECK-BE-NEXT: li r5, 1 ++; CHECK-BE-NEXT: sldi r3, r3, 2 ++; CHECK-BE-NEXT: stwx r5, r4, r3 ++; CHECK-BE-NEXT: lwz r3, 1024(r1) ++; CHECK-BE-NEXT: mr r1, r30 ++; CHECK-BE-NEXT: ld r30, -16(r1) ++; CHECK-BE-NEXT: blr ++; ++; CHECK-32-LABEL: f10: ++; CHECK-32: # %bb.0: ++; CHECK-32-NEXT: mr r12, r1 ++; CHECK-32-NEXT: .cfi_def_cfa r12, 0 ++; CHECK-32-NEXT: clrlwi r0, r12, 22 ++; CHECK-32-NEXT: subc r1, r1, r0 ++; CHECK-32-NEXT: stwu r12, -1024(r1) ++; CHECK-32-NEXT: stwu r12, -4096(r1) ++; CHECK-32-NEXT: .cfi_def_cfa_register r1 ++; CHECK-32-NEXT: sub r0, r1, r12 ++; CHECK-32-NEXT: sub r0, r1, r0 ++; CHECK-32-NEXT: addic r0, r0, -8 ++; CHECK-32-NEXT: stwx r30, 0, r0 ++; CHECK-32-NEXT: addic r30, r0, 8 ++; CHECK-32-NEXT: .cfi_def_cfa_register r30 ++; CHECK-32-NEXT: .cfi_offset r30, -8 ++; CHECK-32-NEXT: addi r3, r1, 1024 ++; CHECK-32-NEXT: li r5, 1 ++; CHECK-32-NEXT: slwi r4, r4, 2 ++; CHECK-32-NEXT: stwx r5, r3, r4 ++; CHECK-32-NEXT: mr r0, r31 ++; CHECK-32-NEXT: lwz r3, 1024(r1) ++; CHECK-32-NEXT: lwz r31, 0(r1) ++; CHECK-32-NEXT: lwz r30, -8(r31) ++; CHECK-32-NEXT: mr r1, r31 ++; CHECK-32-NEXT: mr r31, r0 ++; CHECK-32-NEXT: blr ++ %a = alloca i32, i32 1000, align 1024 ++ %b = getelementptr inbounds i32, i32* %a, i64 %i ++ store volatile i32 1, i32* %b ++ %c = load volatile i32, i32* %a ++ ret i32 %c ++} ++ ++define void @f11(i32 %vla_size, i64 %i) #0 { ++; CHECK-LE-LABEL: f11: ++; CHECK-LE: # %bb.0: ++; CHECK-LE-NEXT: std r31, -8(r1) ++; CHECK-LE-NEXT: std r30, -16(r1) ++; CHECK-LE-NEXT: mr r30, r1 ++; CHECK-LE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-LE-NEXT: clrldi r0, r30, 49 ++; CHECK-LE-NEXT: subc r12, r30, r0 ++; CHECK-LE-NEXT: clrldi r0, r0, 52 ++; CHECK-LE-NEXT: cmpdi r0, 0 ++; CHECK-LE-NEXT: beq cr0, .LBB11_2 ++; CHECK-LE-NEXT: # %bb.1: ++; CHECK-LE-NEXT: neg r0, r0 ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: .LBB11_2: ++; CHECK-LE-NEXT: li r0, -4096 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: beq cr0, .LBB11_4 ++; CHECK-LE-NEXT: .LBB11_3: ++; CHECK-LE-NEXT: stdux r30, r1, r0 ++; CHECK-LE-NEXT: cmpd r1, r12 ++; CHECK-LE-NEXT: bne cr0, .LBB11_3 ++; CHECK-LE-NEXT: .LBB11_4: ++; CHECK-LE-NEXT: mr r12, r30 ++; CHECK-LE-NEXT: li r0, 24 ++; CHECK-LE-NEXT: mtctr r0 ++; CHECK-LE-NEXT: .LBB11_5: ++; CHECK-LE-NEXT: stdu r12, -4096(r1) ++; CHECK-LE-NEXT: bdnz .LBB11_5 ++; CHECK-LE-NEXT: # %bb.6: ++; CHECK-LE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-LE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-LE-NEXT: .cfi_offset r31, -8 ++; CHECK-LE-NEXT: .cfi_offset r30, -16 ++; CHECK-LE-NEXT: clrldi r3, r3, 32 ++; CHECK-LE-NEXT: lis r5, 1 ++; CHECK-LE-NEXT: mr r31, r1 ++; CHECK-LE-NEXT: li r6, 1 ++; CHECK-LE-NEXT: addi r3, r3, 15 ++; CHECK-LE-NEXT: ori r5, r5, 0 ++; CHECK-LE-NEXT: rldicl r3, r3, 60, 4 ++; CHECK-LE-NEXT: sldi r4, r4, 2 ++; CHECK-LE-NEXT: add r5, r31, r5 ++; CHECK-LE-NEXT: rldicl r3, r3, 4, 31 ++; CHECK-LE-NEXT: stwx r6, r5, r4 ++; CHECK-LE-NEXT: li r4, -32768 ++; CHECK-LE-NEXT: neg r7, r3 ++; CHECK-LE-NEXT: ld r3, 0(r1) ++; CHECK-LE-NEXT: and r4, r7, r4 ++; CHECK-LE-NEXT: mr r7, r4 ++; CHECK-LE-NEXT: li r4, -4096 ++; CHECK-LE-NEXT: divd r5, r7, r4 ++; CHECK-LE-NEXT: mulld r4, r5, r4 ++; CHECK-LE-NEXT: sub r5, r7, r4 ++; CHECK-LE-NEXT: add r4, r1, r7 ++; CHECK-LE-NEXT: stdux r3, r1, r5 ++; CHECK-LE-NEXT: cmpd r1, r4 ++; CHECK-LE-NEXT: beq cr0, .LBB11_8 ++; CHECK-LE-NEXT: .LBB11_7: ++; CHECK-LE-NEXT: stdu r3, -4096(r1) ++; CHECK-LE-NEXT: cmpd r1, r4 ++; CHECK-LE-NEXT: bne cr0, .LBB11_7 ++; CHECK-LE-NEXT: .LBB11_8: ++; CHECK-LE-NEXT: addi r3, r1, -32768 ++; CHECK-LE-NEXT: lbz r3, 0(r3) ++; CHECK-LE-NEXT: mr r1, r30 ++; CHECK-LE-NEXT: ld r31, -8(r1) ++; CHECK-LE-NEXT: ld r30, -16(r1) ++; CHECK-LE-NEXT: blr ++; ++; CHECK-BE-LABEL: f11: ++; CHECK-BE: # %bb.0: ++; CHECK-BE-NEXT: std r31, -8(r1) ++; CHECK-BE-NEXT: std r30, -16(r1) ++; CHECK-BE-NEXT: mr r30, r1 ++; CHECK-BE-NEXT: .cfi_def_cfa r30, 0 ++; CHECK-BE-NEXT: clrldi r0, r30, 49 ++; CHECK-BE-NEXT: subc r12, r30, r0 ++; CHECK-BE-NEXT: clrldi r0, r0, 52 ++; CHECK-BE-NEXT: cmpdi r0, 0 ++; CHECK-BE-NEXT: beq cr0, .LBB11_2 ++; CHECK-BE-NEXT: # %bb.1: ++; CHECK-BE-NEXT: neg r0, r0 ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: .LBB11_2: ++; CHECK-BE-NEXT: li r0, -4096 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: beq cr0, .LBB11_4 ++; CHECK-BE-NEXT: .LBB11_3: ++; CHECK-BE-NEXT: stdux r30, r1, r0 ++; CHECK-BE-NEXT: cmpd r1, r12 ++; CHECK-BE-NEXT: bne cr0, .LBB11_3 ++; CHECK-BE-NEXT: .LBB11_4: ++; CHECK-BE-NEXT: mr r12, r30 ++; CHECK-BE-NEXT: li r0, 24 ++; CHECK-BE-NEXT: mtctr r0 ++; CHECK-BE-NEXT: .LBB11_5: ++; CHECK-BE-NEXT: stdu r12, -4096(r1) ++; CHECK-BE-NEXT: bdnz .LBB11_5 ++; CHECK-BE-NEXT: # %bb.6: ++; CHECK-BE-NEXT: .cfi_def_cfa_register r1 ++; CHECK-BE-NEXT: .cfi_def_cfa_register r30 ++; CHECK-BE-NEXT: .cfi_offset r31, -8 ++; CHECK-BE-NEXT: .cfi_offset r30, -16 ++; CHECK-BE-NEXT: clrldi r3, r3, 32 ++; CHECK-BE-NEXT: lis r5, 1 ++; CHECK-BE-NEXT: addi r3, r3, 15 ++; CHECK-BE-NEXT: mr r31, r1 ++; CHECK-BE-NEXT: ori r5, r5, 0 ++; CHECK-BE-NEXT: rldicl r3, r3, 60, 4 ++; CHECK-BE-NEXT: add r5, r31, r5 ++; CHECK-BE-NEXT: sldi r4, r4, 2 ++; CHECK-BE-NEXT: li r6, 1 ++; CHECK-BE-NEXT: rldicl r3, r3, 4, 31 ++; CHECK-BE-NEXT: stwx r6, r5, r4 ++; CHECK-BE-NEXT: neg r7, r3 ++; CHECK-BE-NEXT: li r4, -32768 ++; CHECK-BE-NEXT: and r4, r7, r4 ++; CHECK-BE-NEXT: ld r3, 0(r1) ++; CHECK-BE-NEXT: mr r7, r4 ++; CHECK-BE-NEXT: li r4, -4096 ++; CHECK-BE-NEXT: divd r5, r7, r4 ++; CHECK-BE-NEXT: mulld r4, r5, r4 ++; CHECK-BE-NEXT: sub r5, r7, r4 ++; CHECK-BE-NEXT: add r4, r1, r7 ++; CHECK-BE-NEXT: stdux r3, r1, r5 ++; CHECK-BE-NEXT: cmpd r1, r4 ++; CHECK-BE-NEXT: beq cr0, .LBB11_8 ++; CHECK-BE-NEXT: .LBB11_7: ++; CHECK-BE-NEXT: stdu r3, -4096(r1) ++; CHECK-BE-NEXT: cmpd r1, r4 ++; CHECK-BE-NEXT: bne cr0, .LBB11_7 ++; CHECK-BE-NEXT: .LBB11_8: ++; CHECK-BE-NEXT: addi r3, r1, -32768 ++; CHECK-BE-NEXT: lbz r3, 0(r3) ++; CHECK-BE-NEXT: mr r1, r30 ++; CHECK-BE-NEXT: ld r31, -8(r1) ++; CHECK-BE-NEXT: ld r30, -16(r1) ++; CHECK-BE-NEXT: blr ++; ++; CHECK-32-LABEL: f11: ++; CHECK-32: # %bb.0: ++; CHECK-32-NEXT: mr r12, r1 ++; CHECK-32-NEXT: .cfi_def_cfa r12, 0 ++; CHECK-32-NEXT: clrlwi r0, r12, 17 ++; CHECK-32-NEXT: subc r1, r1, r0 ++; CHECK-32-NEXT: li r0, 24 ++; CHECK-32-NEXT: mtctr r0 ++; CHECK-32-NEXT: .LBB11_1: ++; CHECK-32-NEXT: stwu r12, -4096(r1) ++; CHECK-32-NEXT: bdnz .LBB11_1 ++; CHECK-32-NEXT: # %bb.2: ++; CHECK-32-NEXT: .cfi_def_cfa_register r1 ++; CHECK-32-NEXT: sub r0, r1, r12 ++; CHECK-32-NEXT: sub r0, r1, r0 ++; CHECK-32-NEXT: addic r0, r0, -4 ++; CHECK-32-NEXT: stwx r31, 0, r0 ++; CHECK-32-NEXT: addic r0, r0, -4 ++; CHECK-32-NEXT: stwx r30, 0, r0 ++; CHECK-32-NEXT: addic r30, r0, 8 ++; CHECK-32-NEXT: .cfi_def_cfa_register r30 ++; CHECK-32-NEXT: .cfi_offset r31, -4 ++; CHECK-32-NEXT: .cfi_offset r30, -8 ++; CHECK-32-NEXT: lis r4, 1 ++; CHECK-32-NEXT: mr r31, r1 ++; CHECK-32-NEXT: ori r4, r4, 0 ++; CHECK-32-NEXT: addi r3, r3, 15 ++; CHECK-32-NEXT: add r4, r31, r4 ++; CHECK-32-NEXT: li r5, 1 ++; CHECK-32-NEXT: slwi r6, r6, 2 ++; CHECK-32-NEXT: rlwinm r3, r3, 0, 0, 27 ++; CHECK-32-NEXT: neg r7, r3 ++; CHECK-32-NEXT: stwx r5, r4, r6 ++; CHECK-32-NEXT: li r4, -32768 ++; CHECK-32-NEXT: and r4, r7, r4 ++; CHECK-32-NEXT: lwz r3, 0(r1) ++; CHECK-32-NEXT: mr r7, r4 ++; CHECK-32-NEXT: li r4, -4096 ++; CHECK-32-NEXT: divw r5, r7, r4 ++; CHECK-32-NEXT: mullw r4, r5, r4 ++; CHECK-32-NEXT: sub r5, r7, r4 ++; CHECK-32-NEXT: add r4, r1, r7 ++; CHECK-32-NEXT: stwux r3, r1, r5 ++; CHECK-32-NEXT: cmpw r1, r4 ++; CHECK-32-NEXT: beq cr0, .LBB11_4 ++; CHECK-32-NEXT: .LBB11_3: ++; CHECK-32-NEXT: stwu r3, -4096(r1) ++; CHECK-32-NEXT: cmpw r1, r4 ++; CHECK-32-NEXT: bne cr0, .LBB11_3 ++; CHECK-32-NEXT: .LBB11_4: ++; CHECK-32-NEXT: addi r3, r1, -32768 ++; CHECK-32-NEXT: lbz r3, 0(r3) ++; CHECK-32-NEXT: lwz r31, 0(r1) ++; CHECK-32-NEXT: lwz r0, -4(r31) ++; CHECK-32-NEXT: lwz r30, -8(r31) ++; CHECK-32-NEXT: mr r1, r31 ++; CHECK-32-NEXT: mr r31, r0 ++; CHECK-32-NEXT: blr ++ %a = alloca i32, i32 4096, align 32768 ++ %b = getelementptr inbounds i32, i32* %a, i64 %i ++ store volatile i32 1, i32* %b ++ %1 = zext i32 %vla_size to i64 ++ %vla = alloca i8, i64 %1, align 2048 ++ %2 = load volatile i8, i8* %vla, align 2048 ++ ret void ++} ++ + attributes #0 = { "probe-stack"="inline-asm" } +diff --git llvm/test/CodeGen/PowerPC/stack-realign.ll llvm/test/CodeGen/PowerPC/stack-realign.ll +index ea3603b9ce20..640bfb81709a 100644 +--- llvm/test/CodeGen/PowerPC/stack-realign.ll ++++ llvm/test/CodeGen/PowerPC/stack-realign.ll +@@ -43,7 +43,7 @@ entry: + + ; CHECK: std 3, 48(30) + +-; CHECK: ld 1, 0(1) ++; CHECK: mr 1, 30 + ; CHECK-DAG: ld [[SR:[0-9]+]], 16(1) + ; CHECK-DAG: ld 30, -16(1) + ; CHECK-DAG: mtlr [[SR]] +@@ -69,7 +69,7 @@ entry: + + ; CHECK-FP: std 3, 48(30) + +-; CHECK-FP: ld 1, 0(1) ++; CHECK-FP: mr 1, 30 + ; CHECK-FP-DAG: ld [[SR:[0-9]+]], 16(1) + ; CHECK-FP-DAG: ld 31, -8(1) + ; CHECK-FP-DAG: ld 30, -16(1) +-- +2.30.0 + From 4935775fdc43e2b0bb8e88edc98b838bcc296d29 Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Tue, 5 Jan 2021 19:10:50 +0000 Subject: [PATCH 071/239] Backport LLVM patch to fix LLVM build on GCC 11 GCC 11 has changed header dependencies again, so the build of LLVM fails because wasn't being included when it should be. This is already fixed upstream in LLVM 12. --- deps/llvm.mk | 3 +++ ...llvm-rGb498303066a6-gcc11-header-fix.patch | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 deps/patches/llvm-rGb498303066a6-gcc11-header-fix.patch diff --git a/deps/llvm.mk b/deps/llvm.mk index 794e340283d55..854ba44947c3c 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -484,6 +484,7 @@ $(eval $(call LLVM_PATCH,llvm-julia-tsan-custom-as)) $(eval $(call LLVM_PATCH,llvm-9.0-D85499)) # landed as D85553 $(eval $(call LLVM_PATCH,llvm-D80101)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-D84031)) # remove for LLVM 12 +$(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12 endif # LLVM_VER 9.0 ifeq ($(LLVM_VER_SHORT),10.0) @@ -508,6 +509,7 @@ $(eval $(call LLVM_PATCH,llvm-10-unique_function_clang-sa)) ifeq ($(BUILD_LLVM_CLANG),1) $(eval $(call LLVM_PATCH,llvm-D88630-clang-cmake)) endif +$(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12 endif # LLVM_VER 10.0 ifeq ($(LLVM_VER_SHORT),11.0) @@ -535,6 +537,7 @@ $(eval $(call LLVM_PATCH,llvm-11-D93092-ppc-knownbits)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as)) $(eval $(call LLVM_PATCH,llvm-11-ppc-half-ctr)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-ppc-sp-from-bp)) # remove for LLVM 12 +$(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12 endif # LLVM_VER 11.0 diff --git a/deps/patches/llvm-rGb498303066a6-gcc11-header-fix.patch b/deps/patches/llvm-rGb498303066a6-gcc11-header-fix.patch new file mode 100644 index 0000000000000..a1683c91c5b29 --- /dev/null +++ b/deps/patches/llvm-rGb498303066a6-gcc11-header-fix.patch @@ -0,0 +1,21 @@ +From b498303066a63a203d24f739b2d2e0e56dca70d1 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Tue, 10 Nov 2020 14:55:25 +0100 +Subject: [PATCH] [nfc] Fix missing include + +--- + llvm/utils/benchmark/src/benchmark_register.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h +index 0705e219f2fa..4caa5ad4da07 100644 +--- a/utils/benchmark/src/benchmark_register.h ++++ b/utils/benchmark/src/benchmark_register.h +@@ -1,6 +1,7 @@ + #ifndef BENCHMARK_REGISTER_H + #define BENCHMARK_REGISTER_H + ++#include + #include + + #include "check.h" From e1859a1c25aad42318777438dbedac485c40a7ce Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 28 Dec 2020 14:36:14 -0500 Subject: [PATCH 072/239] compiler: corrections to Conditional lattice Try harder to equate Const(bool) with the Conditional represenation of the same --- base/compiler/typelattice.jl | 7 ++++++- base/compiler/typelimits.jl | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/base/compiler/typelattice.jl b/base/compiler/typelattice.jl index 6d9ee8819da3a..f8a2e97b263d4 100644 --- a/base/compiler/typelattice.jl +++ b/base/compiler/typelattice.jl @@ -126,7 +126,12 @@ function ⊑(@nospecialize(a), @nospecialize(b)) @assert !isa(b, TypeVar) "invalid lattice item" if isa(a, Conditional) if isa(b, Conditional) - return issubconditional(a, b) + issubconditional(a, b) && return true + b = maybe_extract_const_bool(b) + if b isa Bool && maybe_extract_const_bool(a) === b + return true + end + return false elseif isa(b, Const) && isa(b.val, Bool) return maybe_extract_const_bool(a) === b.val end diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index 156630460d81b..a7c04ceff40ae 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -299,6 +299,10 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb)) isa(typeb, MaybeUndef) ? typeb.typ : typeb)) end # type-lattice for Conditional wrapper + if isa(typea, Conditional) && isa(typeb, Conditional) && typea.var !== typeb.var + widenconditional(typea) isa Const && (typea = widenconditional(typea)) + widenconditional(typeb) isa Const && (typeb = widenconditional(typeb)) + end if isa(typea, Conditional) && isa(typeb, Const) if typeb.val === true typeb = Conditional(typea.var, Any, Union{}) From d1fc03da8c93e480964d706cbb63be51f2331c37 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 28 Dec 2020 14:38:39 -0500 Subject: [PATCH 073/239] inference: remove dead check for NOT_FOUND Missed in dcc0696971a100dbc63f90b8789632631dd1bfef cleanup --- base/compiler/typelattice.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/compiler/typelattice.jl b/base/compiler/typelattice.jl index f8a2e97b263d4..6dcf0e4fcb49a 100644 --- a/base/compiler/typelattice.jl +++ b/base/compiler/typelattice.jl @@ -118,8 +118,8 @@ function ⊑(@nospecialize(a), @nospecialize(b)) end isa(a, MaybeUndef) && (a = a.typ) isa(b, MaybeUndef) && (b = b.typ) - (a === NOT_FOUND || b === Any) && return true - (a === Any || b === NOT_FOUND) && return false + b === Any && return true + a === Any && return false a === Union{} && return true b === Union{} && return false @assert !isa(a, TypeVar) "invalid lattice item" From a229f8660eb6cc87c4a44d3c1436d2156776b346 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 7 Jan 2021 12:01:32 +0900 Subject: [PATCH 074/239] inference: minor code quality improvements --- base/compiler/abstractinterpretation.jl | 6 +++--- base/compiler/tfuncs.jl | 2 +- base/compiler/typeinfer.jl | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 589de2d4eb229..5a83fd9870ec1 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1179,9 +1179,9 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), if length(e.args) == 2 && isconcretetype(t) && !t.mutable at = abstract_eval_value(interp, e.args[2], vtypes, sv) n = fieldcount(t) - if isa(at, Const) && isa(at.val, Tuple) && n == length(at.val) && - let t = t, at = at; _all(i->at.val[i] isa fieldtype(t, i), 1:n); end - t = Const(ccall(:jl_new_structt, Any, (Any, Any), t, at.val)) + if isa(at, Const) && (val = at.val; isa(val, Tuple)) && n == length(val) && + let t = t, val = val; _all(i->val[i] isa fieldtype(t, i), 1:n); end + t = Const(ccall(:jl_new_structt, Any, (Any, Any), t, val)) elseif isa(at, PartialStruct) && at ⊑ Tuple && n == length(at.fields) && let t = t, at = at; _all(i->at.fields[i] ⊑ fieldtype(t, i), 1:n); end t = PartialStruct(t, at.fields) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index e87066015ec63..e4735596a8d8a 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1652,7 +1652,7 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s if contains_is(argtypes_vec, Union{}) return Const(Union{}) end - rt = abstract_call(interp, nothing, argtypes_vec, sv, -1).rt + rt = widenconditional(abstract_call(interp, nothing, argtypes_vec, sv, -1).rt) if isa(rt, Const) # output was computed to be constant return Const(typeof(rt.val)) diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 5082b01ea5036..07356eed211f0 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -802,7 +802,8 @@ function typeinf_ext(interp::AbstractInterpreter, mi::MethodInstance) if invoke_api(code) == 2 i == 2 && ccall(:jl_typeinf_end, Cvoid, ()) tree = ccall(:jl_new_code_info_uninit, Ref{CodeInfo}, ()) - tree.code = Any[ ReturnNode(quoted(code.rettype_const)) ] + rettype_const = code.rettype_const + tree.code = Any[ ReturnNode(quoted(rettype_const)) ] nargs = Int(method.nargs) tree.slotnames = ccall(:jl_uncompress_argnames, Vector{Symbol}, (Any,), method.slot_syms) tree.slotflags = fill(0x00, nargs) @@ -814,7 +815,7 @@ function typeinf_ext(interp::AbstractInterpreter, mi::MethodInstance) tree.pure = true tree.inlineable = true tree.parent = mi - tree.rettype = Core.Typeof(code.rettype_const) + tree.rettype = Core.Typeof(rettype_const) tree.min_world = code.min_world tree.max_world = code.max_world return tree From 81701f1fdfc6c4510c10369696779636103340ca Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 12 Jan 2021 17:54:31 -0500 Subject: [PATCH 075/239] move LLVM assert subversion to llvm.mk --- deps/Versions.make | 6 +----- deps/llvm.mk | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index b59bfd70a4f77..885d2b578a074 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -46,12 +46,8 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 11.0.0 +LLVM_ASSERT_JLL_VER := 11.0.0+4 LLVM_JLL_NAME := libLLVM -# We provide a way to subversively swap out which LLVM JLL we pull artifacts from -ifeq ($(BINARYBUILDER_LLVM_ASSERTS), 1) -LLVM_JLL_VER := 11.0.0+4 -LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert -endif # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM diff --git a/deps/llvm.mk b/deps/llvm.mk index 854ba44947c3c..f97438dcf847d 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -623,6 +623,12 @@ update-llvm: endif else # USE_BINARYBUILDER_LLVM +# We provide a way to subversively swap out which LLVM JLL we pull artifacts from +ifeq ($(BINARYBUILDER_LLVM_ASSERTS), 1) +LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert +LLVM_JLL_VER := $(LLVM_ASSERT_JLL_VER) +endif + $(eval $(call bb-install,llvm,LLVM,false,true)) $(eval $(call bb-install,clang,CLANG,false,true)) $(eval $(call bb-install,llvm-tools,LLVM_TOOLS,false,true)) From 918ab6d3632b82be89a7172bb4ef69e450408ba4 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 12 Jan 2021 17:55:05 -0500 Subject: [PATCH 076/239] update LLVM binaries --- deps/Versions.make | 6 +- deps/checksums/clang | 118 ++++++----- deps/checksums/llvm | 348 ++++++++++++++++---------------- stdlib/libLLVM_jll/Project.toml | 2 +- 4 files changed, 236 insertions(+), 238 deletions(-) diff --git a/deps/Versions.make b/deps/Versions.make index 885d2b578a074..c46eb8e6c8a71 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 11.0.0+5 +CLANG_JLL_VER := 11.0.0+7 # DSFMT DSFMT_VER := 2.2.4 @@ -46,12 +46,12 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 11.0.0 -LLVM_ASSERT_JLL_VER := 11.0.0+4 +LLVM_ASSERT_JLL_VER := 11.0.0+7 LLVM_JLL_NAME := libLLVM # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM -LLVM_TOOLS_JLL_VER := 11.0.0+6 +LLVM_TOOLS_JLL_VER := 11.0.0+7 # MbedTLS MBEDTLS_VER := 2.24.0 diff --git a/deps/checksums/clang b/deps/checksums/clang index 3418bdd2a037d..1ba74208abaf6 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,60 +1,58 @@ -Clang.v11.0.0+5.aarch64-apple-darwin.tar.gz/md5/ee869cb2099c8f601f6709a606c13675 -Clang.v11.0.0+5.aarch64-apple-darwin.tar.gz/sha512/0013160dff035ef95fb0ac7fc20698502e57d65cb3b6c1d6d7ff0b108027f848339ef6f5df69572bbdf9c71a838f0e36f91d60743fc5457e71a675846b8909c1 -Clang.v11.0.0+5.aarch64-linux-gnu-cxx03.tar.gz/md5/5119ff5fe445989a72d898960bf5f3b7 -Clang.v11.0.0+5.aarch64-linux-gnu-cxx03.tar.gz/sha512/705deae4e76acdf99ebd9d69a12234713e86c1f7f70813fbced373ea1861d55551673f96eb27fb66a24a3e73a015fda5822afa484246de630db4a514a13c744b -Clang.v11.0.0+5.aarch64-linux-gnu-cxx11.tar.gz/md5/50e69755bd6b32c1b412afcfb17de416 -Clang.v11.0.0+5.aarch64-linux-gnu-cxx11.tar.gz/sha512/a3b18fc3542f9a9cb84971c64276b62fb2ad3a9d4a591e567a408ec1f14d5084f9444d768981a0d0557fcadb70bfceef3d0b8309ef95e4a8d3eb4241daeed372 -Clang.v11.0.0+5.aarch64-linux-musl-cxx03.tar.gz/md5/f1b670ad6beedf8d219af395679c95ea -Clang.v11.0.0+5.aarch64-linux-musl-cxx03.tar.gz/sha512/e806c42a33b17570286725b5671100513d30caadcc2ee732a47f114e317627947b754cb0efedc88cb5fb2a24500df83316cc7a34121cf1dce98dcf8bcebe2bd0 -Clang.v11.0.0+5.aarch64-linux-musl-cxx11.tar.gz/md5/b436fb5b0f7a3598439ba0c4459ccc75 -Clang.v11.0.0+5.aarch64-linux-musl-cxx11.tar.gz/sha512/cd6642f5ebfe238bb60c555c36cae39229333be7c4c44b1d963f6a853568c7ed3f82e93bc53ad972bdda5992318a6b8d10daeac44e1a2fb40534cb60b6969162 -Clang.v11.0.0+5.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/7ec7a1f1f0914a2f41001009e64a2011 -Clang.v11.0.0+5.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/ab4dc2f726c39bdb8c0ca328e61412c1a6838a88d3bd6d8427a49e9b4b48bcc753b90804784d5bfd8f2e1dc475e1bb3f55b9fa414f4d9bcf85ff0e63877fdf45 -Clang.v11.0.0+5.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/82d5c0eaaf002914bc6da3303a648ee5 -Clang.v11.0.0+5.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/9ecd73513b7631d6633b9fb1892e9af761a408c5918c3c75e3a396f6a5ab8cf3086f7d31c8e2b642769a73c904f9298278967fe98bf4c176ea91a4067558ef10 -Clang.v11.0.0+5.armv6l-linux-musleabihf-cxx03.tar.gz/md5/cbc6c81dfb273214226bf2e9ccf70ca9 -Clang.v11.0.0+5.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/1b6cbff37a97312ffdc8481585bfcaeabb849af7a88cbe4a2f40e23ce4b9eeb92ade5d302f1bd3978f7101bb38109cf09982c47294d8cd71b2a2b828e6ffb20d -Clang.v11.0.0+5.armv6l-linux-musleabihf-cxx11.tar.gz/md5/d9db1b16ae1d2d2e31f3833c667f4281 -Clang.v11.0.0+5.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/a7c43d7cef60df18d9e4dbc6b8cd54002c14a5a06fc4e669bb83a90459c8e79913f7ec29f5f7c1dd70ca6a7633b72dc205174056b4ca513b6522442e2b613ef1 -Clang.v11.0.0+5.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/19269cc26a412d1925a37c8725f17779 -Clang.v11.0.0+5.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/a7d572766498c6cc052596c2e5d623d903c01b978773e778d36c19495bec458508b0e9150d85547ceebacbe55d66484042e22c33b2e66efad94b13229bb0d4e4 -Clang.v11.0.0+5.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/d2d87790c35a9c47fab7923e875e50a5 -Clang.v11.0.0+5.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/a7fb3a38545d4f2cdbd8aa18b8fba4bc25167d686ff3ff7f499881aab51fb9b82e637b8885c2f1c9b0371dc9d9a8ea52dec1aecc0d9bc463d08e72ba20bebff3 -Clang.v11.0.0+5.armv7l-linux-musleabihf-cxx03.tar.gz/md5/b9834356f1b5248e7baa9d47ba979573 -Clang.v11.0.0+5.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e9ddfbde93b75875537c969de68c74a155c282c5de795adf5be39e79f8e9ee45d1e03a0eefe40f611da81794a611acf6139e6894f8dc8140b9e79d5863988ec2 -Clang.v11.0.0+5.armv7l-linux-musleabihf-cxx11.tar.gz/md5/5976a9955e67267810b78b319b31900a -Clang.v11.0.0+5.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/b4ff28cd505fe870b6450c4009881409ec76e8d8f75a1a57c1d7be4e435c78f1b5e0ff66defc2d9e089efaa23421aa8eed7f438e129fed3313569c667a9e41fa -Clang.v11.0.0+5.i686-linux-gnu-cxx03.tar.gz/md5/54e9d0f4ef0527f931464943e419c475 -Clang.v11.0.0+5.i686-linux-gnu-cxx03.tar.gz/sha512/9061e2ff3dbbe68c44c3ee3d2c455bf1ce216bae1aca4f4da56275ed84020b537eeaf510085b585bf27fded6bee2a05fad6bf457d4eb6a87d4ee74dd25788648 -Clang.v11.0.0+5.i686-linux-gnu-cxx11.tar.gz/md5/7bc64cc7b057ea02950a1f9e62658b42 -Clang.v11.0.0+5.i686-linux-gnu-cxx11.tar.gz/sha512/3a5cd8445ef37406d380d250d68727bc37029b679f0529c6efbe05dc3583cd5020a45c1619e7e1b758b966fa64973193e010f20ec80340f4d91e6b6e718c166d -Clang.v11.0.0+5.i686-linux-musl-cxx03.tar.gz/md5/af9793c0bdcecd654f055d127b988f29 -Clang.v11.0.0+5.i686-linux-musl-cxx03.tar.gz/sha512/ceb18e6c1182a79203a3cb292cc1655edd15c92cab394e29c3f7b0fcd07b7c4a9c545dde313fde4e2e00425759ecfaa2294028fe7535ce16dbd18e1495020189 -Clang.v11.0.0+5.i686-linux-musl-cxx11.tar.gz/md5/d557e35ca96715b5afc5d1e94723e858 -Clang.v11.0.0+5.i686-linux-musl-cxx11.tar.gz/sha512/77477ab77b91f2d14e950968b8001be89dc551e258dc1d30165d1f191aee6b58e67c72d8d2d19547b7bbe505eccade35243d6ad0a9126a131fbb73a88d66e6fa -Clang.v11.0.0+5.i686-w64-mingw32-cxx03.tar.gz/md5/2014ef645f4224afddee27dfd4d3debc -Clang.v11.0.0+5.i686-w64-mingw32-cxx03.tar.gz/sha512/e912596d75395b87799daad4e50d0aea1fb92ae4447c59751f3251ae43bd9c7f0d27448cd5b64a38762d95c515660a347f422d38fe5451313149d1e6e6dd7229 -Clang.v11.0.0+5.i686-w64-mingw32-cxx11.tar.gz/md5/5c50168c711e09cf3742263ad6f98f88 -Clang.v11.0.0+5.i686-w64-mingw32-cxx11.tar.gz/sha512/10210f051ed83fbd4e095deb31fcba24f69653a9d76d7074f256f524312a1af2529e94239127c8f6995b4cdb02f5063f7932616b01456c0297ed7d433eae85e2 -Clang.v11.0.0+5.powerpc64le-linux-gnu-cxx03.tar.gz/md5/dae1cfc253daf8225cba968144145985 -Clang.v11.0.0+5.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d481561e0c28cbc98df2b37f29c05cb6dfe5473a766dbea6c889af0b5fa77081939d4b6c5d2ac7c80047ede33b370b94bfb74d464708999409e1451d0cebd0ea -Clang.v11.0.0+5.powerpc64le-linux-gnu-cxx11.tar.gz/md5/7646c87464295d598e745f3720c07c63 -Clang.v11.0.0+5.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/3d8e602acfacbf03903854cf7be0addd87541edfbc8b8ce54ee4b82634ec1d3f5bb89639fe7b81a58b2ab4d3f70b7837a953f5a564bf6ac6176659804716de69 -Clang.v11.0.0+5.x86_64-apple-darwin.tar.gz/md5/29bd442f1ab0dc93f8134d3206d417c2 -Clang.v11.0.0+5.x86_64-apple-darwin.tar.gz/sha512/814aa5eb0d1363a7e766c2abde8738dfc0c985b900375fafd327bee74827832a2007405d1489675295cf7a99339757d30c9fa879668f53cbf6cc5d222b888f3f -Clang.v11.0.0+5.x86_64-linux-gnu-cxx03.tar.gz/md5/6d895ddeb6d12aa0f9a31d8a5107740e -Clang.v11.0.0+5.x86_64-linux-gnu-cxx03.tar.gz/sha512/32aedd555fdb16b786b4b4236ebc6af2ec2a650ecb075ea69399f7ef0bf231a7a7d5ffe96cb902ade8893eeef70a87ff9e7270eddb86496095df8dfe2cf76781 -Clang.v11.0.0+5.x86_64-linux-gnu-cxx11.tar.gz/md5/a867af44afd3a8db704f16c880ad6fe7 -Clang.v11.0.0+5.x86_64-linux-gnu-cxx11.tar.gz/sha512/5800fdadb932c2919bfb93effd095a9de1a1fad3be22e2ecb40720889aa362688628ac6259a14076b05bf0a5d2b4a71ca23e9e1869fa17a863dd3b48e6abba5a -Clang.v11.0.0+5.x86_64-linux-musl-cxx03.tar.gz/md5/db111e1ccc6ff0f980351718de56df41 -Clang.v11.0.0+5.x86_64-linux-musl-cxx03.tar.gz/sha512/79b0e005eae0fb8bc842f7999fbab95a039fd50cd6a2dc09be61bfbca1ac2756b41ada2a9fffb19389a230de577b8bcfdaf396e785622e1cda7a53eeb1633656 -Clang.v11.0.0+5.x86_64-linux-musl-cxx11.tar.gz/md5/f7722956e75183cfb4660a77fe151204 -Clang.v11.0.0+5.x86_64-linux-musl-cxx11.tar.gz/sha512/e81ac1e6b5ae4aa2ed298ad27a31d3661d29dd1e25fd42618feb843eaf80199782e4fe93737d063f97461c6b0dcdf1fa7a6cf91a2c04278a3b2a9f8ffc70ba6d -Clang.v11.0.0+5.x86_64-unknown-freebsd.tar.gz/md5/36e9bb2651d4e6bd9057eb9f6b460b8d -Clang.v11.0.0+5.x86_64-unknown-freebsd.tar.gz/sha512/eec634359e79a977101a1981576dff86782b4b9cd36d21dfbf0c1900d83f5809fb53170befc80efe7979d5cd3a986f4ba5b517a9c547401ec1824513d01dff70 -Clang.v11.0.0+5.x86_64-w64-mingw32-cxx03.tar.gz/md5/5e09b6fdc8dc8eee91d9e4069d0aa1ce -Clang.v11.0.0+5.x86_64-w64-mingw32-cxx03.tar.gz/sha512/83b5ab18479c9755686771465976fb22e779a280498d95b371c9bf6d4d956f689f15bea1a85eb117fa03ea683edee9b8bcf3b9f1fb49c0ac659326d8d1a84271 -Clang.v11.0.0+5.x86_64-w64-mingw32-cxx11.tar.gz/md5/c77285af89c91830f1a95a6a9377256b -Clang.v11.0.0+5.x86_64-w64-mingw32-cxx11.tar.gz/sha512/20ff223db7309589c612f49c62d75b4c38b4149d8f2db67c0f5b00f8ba83f60b639502c91df99e1c1b3f4a04be491397a6330cb606f469e059dbee978db31f55 -clang-11.0.0.src.tar.xz/md5/d8fbc5b1d27f44922cfbbf199d0bab78 -clang-11.0.0.src.tar.xz/sha512/5874d99d05aa6ac0a7f5131a8522440ca1fc332a63cbfbf92f844ecb03e7f698a1839106fe6d1c8efaa839d03a4547cda5ab40f445d9923b99907d8cf1988276 +Clang.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/523880d02dd53ff48b6b6097f0abc7cf +Clang.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/dd9c418d7c014d45ddd79292cb4d8764eaeda29a7fd2818dad5c31fe8a3eb9fcb672872ec48c2bd8a5d46bdef1b83c95ea518a6ebc71621099e61af95cf6118d +Clang.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/ff239626d87fb287096014d4efbbab11 +Clang.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/666dc827aecb82c7b44b941805f84cfc68b3bb29a5b4ce7a55ec42ec08e05da3e29c7d894d1d7da01d10344c1303d5bd2609d93498771523d2bdfb6cdcd6f6c9 +Clang.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/2363604f41e5ca6100535c80dc3b80f1 +Clang.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/e80f5e8d27eeb9202c7e239bc0e8a28ba17d013d2785a1a6a196fe62e1f649a49e77c395e7f95c8c006b4442c89ce9ea6d24e31b764baf8805e9387f369fc2e2 +Clang.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/db2dc0ea38e3f7ce34ffbbffb21e09b5 +Clang.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/96e915e59f0dfcdc19d8926549e34c4840aa9e21a9405d66cb031de13cc2f3b77fc628b1fe0d7dda444310cb8e2325ce3054bbbd6797d86046527d65d71a0e8e +Clang.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/7e79d95f9bb4f102d2f764feaede6810 +Clang.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/ef84544b2ab136c7ce513e119c2425eda1393046e5fabad17e5eca5347e1f14392a2f91a0ae7ddc67c3bd0f85cf7f9eebcca447d76dbccb0e239e57fea35263d +Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/46ca009704fd5625d8b8f7ff4fbc0e8d +Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/7a62022d55fe926e09ec25accd0d7e89b9125213b1d8a831d91be325f1f48b806b0075797d8696122750070f012b1bedb1ead297a807739c44670125a7892d1f +Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/01159dd8a103a601f1f3c931ab8c0cf1 +Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/86ba3017d3d7921b665bf80d0a6b8fb84a5448fcd4dfbe274893d34d5601df06a6c36e4f76bf6afc550e140e96000d0ef8889bca868359b8478aeef12b35cae6 +Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/8354574eaa55d53176e811b6a0737357 +Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/546970a1e94a62d498bf1236324274231da8b226d579f46b1e82b3a80ad2f3b16307e26d7f695f799e35dc56998e178452322e5eb4224f6de9824abc975a6d90 +Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/7cfdc62a2cd74a11b12535982e24c186 +Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/571d757442c85466d90d340af0b78c263b3aa5b99033c9efb0f8af344b65a1e2bd2e1f76801214804146b93d6c4a48362225e9dcb40633a8167ef78e1873b491 +Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/555fb0382e5717d5a5e38a76a1e1aa9b +Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/19541d1a3258ca81b1d838f555522d13df09539735c7a865d8f58d8b34e6ed10691a144d9b8b08af56590ed7a880342d16b657a14f65066bfba3ab6f2491d3bd +Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/13938301261315065b1395a414e889a2 +Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/0f211ac82d2ccfaed7e6f52eee88b740feb7dc3dc99d3ef1727bf409112024f4bee07665d67336c918fb06d6d7db29956f931fb81bb014e6a5ae1261c8d1b397 +Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/2a1cbbad08d19b3af00003613b0ee7fa +Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/5136f28a19e8307182f39f35fb7a722f6b8b71761e7276243f35aa010e0d9e3449e332b164bd4d603bdf4e48cb4980c5dd97fb805741d348bd4269343a36cd0f +Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c25d1cc28abe4a559f5e4e89fc459013 +Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/26a4342352e0afef5470e42239a51ee7e5c82d6157a1cca21873f53c0c49c0f47e0a0baa57669f7617fce8d56cce7ad039f79fd0f1c3a57242f9f09f47a3fe51 +Clang.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/9e48cac26e0cb5a6c703540c781f2f98 +Clang.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/c1d9e2edcffc57864a6e1848fdd7e5fc562d905adca18573dcb1d4ecd148438de69286dad7e611f3655ab8380857ad58ea1097c54fd439e4714cac19000addf1 +Clang.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/e6600376f1b17bb9309cdc79e32ccc72 +Clang.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/17553e379ac4ecee37f319f0bd8e439fa69875dbafe455835f2c7a89cf7140b894793789b53d3759f3ab6bf712fb0c9ce0ecf9426f2d86bbcb7df13959faad82 +Clang.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/f9008d7ba18a29fcfef6fcb8bf48bbaa +Clang.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/41c72c035309aaa6df1a9594d83bf5cf8901948636e54c84aa127021f552a8b86e1a404c3445fe9a06a6120f01169a95fde412dfbd0a7909621ecdccdc653019 +Clang.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/cbafab459452e990975508e33f64752c +Clang.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/9ffbf81a5b53be8ccb123e3be7fb1f2b9388a6a659a07206808acf5b2dde3036b60d56a015ef338889af35169f49ea32e2a5b8e6da3d140d035ee0f0d5cb033a +Clang.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/a0ac9cb46e3646e636c5683b453c3329 +Clang.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/be55a815c8670a2b6590878607bb42a4a7d288a80233df0a293ce0a83880d3b4e3e92597387472aa4abc29bd6713c7abb74cba46d009431f1ea733dfa0af5609 +Clang.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/ba3d5a5e5ebf015683f2ab564343b3bb +Clang.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/f8b5f526b10c52b3933a9d8ae138d101e4f085aa910061c88264e18e24d2464c80c30814cf8a5523bac355ff257886aa6252836ebf728fbcafbe00517caff9e1 +Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/fa123dfff222c59c0398811fa7e456c7 +Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2a9362578675c3e4aaca9db4246b07e3e3fe14f001d83f0829e2818032a2e769d85790552fa953838db613f1592e648f59830625d97e634b4b67dcc3ad6218e0 +Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/90e3dc34b0f8dfc06a3191e6d1ae8db6 +Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/b298d29f58ed0e90e2cdfec9a3eef31f750901c7ad74d5d8dfaceeb5526ae57ad1f9bea4734e5ea4a00735ad60ad5d54bce5905bbe392a0141d43e1ba1835280 +Clang.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/8cf8ff4b08b20d011b07e8305542ba93 +Clang.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/ea79289ae1ee2c3e55890987d9c797e937cfcf99e2d539c75ef0ed03d58d717cee646ebddc836577e5f7aa027e1e269777e5bc65a57b8ca3e045cedcee98c271 +Clang.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/1b69ca77c58e4902021aca003d9b8aaf +Clang.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/59bd34bcc503c13629bb34f4caa82cadd231a24b8dcecdc9074c7ef7314df0fadd812043ad009d473c9e4203d0123edd0dcb65f772dffdfdf72f724b7bbb0a98 +Clang.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/827d64ffd271dbb4df2145ad3da088bf +Clang.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/ea3aa9fa2d6e21f7fbf7911122b1b3058eedc0786d4fac0a42ca830b182fc302e74d28bb8cd90c0bea7040e08c7a222d5af1dfce9447ee1a0203fdd5141f543e +Clang.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/e59693783f954d2270fb6efd669a71ef +Clang.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/48d482d698f053201c176c9baaba1ace7e709dbbf1d5b92081e7797ecee8e9ca1ae29612e39430acf157bb83dcdde9c585a6f57734150f0723c9fd55c6bb7d28 +Clang.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/1054ef293fb51478dfb24a93cafc0649 +Clang.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/34d2a6da6bf0c0aae04c67cf357d1a3f262077114371330e78bbbdacacdb62034bb2a3a86b19b1ef32d21dc0c4377c843795680b4e3acc43b4ae7e58ded205d7 +Clang.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/dce990d18f508d88bfba165e4b920db1 +Clang.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/1c66e54443e666e51e78c660035071f764a09e5711c6050b8fa996d655e370ad92c99ecbc092c90e633746c31bf230064ee159d23cb5456d15997284c2fa4708 +Clang.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/e46ae1de76b9251fb85d048614a90f72 +Clang.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/60131aa6851dc8cad5fa2243ec1f39172c714f9ac747b7e197f5c55c8dcde2f2f295912a260f31492a46824ad03664cc919ed78dd9e458d6b7a31f82409cc3cf +Clang.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/36db61088ea830bf0f8859aecabceb41 +Clang.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/4b0df5f10612d5d2e2ab971289038a3800debc729d06c17b0f8ced9a9128919df6ebb76ecfd5d4912b74d56df62bd6c4cd6cc0147105a22d3ee654740ce8c40c diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 510b707335865..5189817e7f691 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,176 +1,176 @@ -LLVM.v11.0.0+6.aarch64-apple-darwin.tar.gz/md5/3e0ff34539a29b704e2b003cdd2a7108 -LLVM.v11.0.0+6.aarch64-apple-darwin.tar.gz/sha512/06a901dd77c61eba56c36479d0ce4bd8b5482e2d3c23802438bc34e3c5520821ada03bb466ac9e99f0bf101981c4c5b1201b9fe644c996dea90eed9f828f609b -LLVM.v11.0.0+6.aarch64-linux-gnu-cxx03.tar.gz/md5/549f263a2ac5faaac2fc72628c3c5b15 -LLVM.v11.0.0+6.aarch64-linux-gnu-cxx03.tar.gz/sha512/75b37cc23b467347f03fd9914ea8b40d13ba90bf0011a071f2d61acad9d33f761270b7cc416938f774efc7403835c85a56a6b302b0ff9a71abd76e78d0e6cba6 -LLVM.v11.0.0+6.aarch64-linux-gnu-cxx11.tar.gz/md5/cb60a5ecb9482a8a88c1cc7f5c5e3344 -LLVM.v11.0.0+6.aarch64-linux-gnu-cxx11.tar.gz/sha512/1b11cf9da5caa257732d9b5a08317cf0468bddfb0a99497c75b3882d1fc8ef76ea49ebecc81d62101ffadad6067fd3b1b79ea4d097b3180e0112813bc3a0c875 -LLVM.v11.0.0+6.aarch64-linux-musl-cxx03.tar.gz/md5/691251e5c3d844f979eb8b9bc39c3f9e -LLVM.v11.0.0+6.aarch64-linux-musl-cxx03.tar.gz/sha512/e6d935bc7143c7633ffc522f0746724f337c02bf2203f2724a0d01611b74d3249a11738e034b224af72dc8cbd0cb997c6455906d70bb41165723de50b567bfc5 -LLVM.v11.0.0+6.aarch64-linux-musl-cxx11.tar.gz/md5/67038d047362f3540e9d066dd16bf849 -LLVM.v11.0.0+6.aarch64-linux-musl-cxx11.tar.gz/sha512/a3b65fe6946425a705827cc7e9317bca32f00509d29410dcd0ff3a5975403f39d8ffb629bf65d0458d94fab7b8ef0466ed7cf895833894ebebc38d03c163901b -LLVM.v11.0.0+6.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/787eead1b671978bf0e8c4530be3bc71 -LLVM.v11.0.0+6.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/34019249d77aed4a36ce2f04cda2af74778c41c48bb13913ba49d30c28f2a24d8c7c6ed3063465462daeaa644ad99134cfa1c62858b547787cd08a0521a2b3b0 -LLVM.v11.0.0+6.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c5c0d2d7d7b8823d822a1d49fd5ba172 -LLVM.v11.0.0+6.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/040047a781e708a1d6849d1293767e06fb917f7cbf1bc4454f4c20bcfc406120a80082e6f03eed8c2fd80f783d375052d6f73a6112988aee0f181698f79568bd -LLVM.v11.0.0+6.armv6l-linux-musleabihf-cxx03.tar.gz/md5/7597a3aeb80562e1a59d06bfc5ad6841 -LLVM.v11.0.0+6.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/88cd3be30f1f75c8be680290a73fef0f49936ec5f6dba80942c302c21ca97d5ad4b9a597806ca8e3b8524b1d4d692ce36da91f42f1d79ec3dea7ddd0714bba47 -LLVM.v11.0.0+6.armv6l-linux-musleabihf-cxx11.tar.gz/md5/b969a695379510a1822b37cff723c21c -LLVM.v11.0.0+6.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ef485d65da6e402d61820a6dc9fdb3dc6c7008309fc0403f5142a0ba4ebcee03517f134585b2ae287db212c5113db59170c20bd073caf71467b8de4894503ff5 -LLVM.v11.0.0+6.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/d1e5ca62e51421c2f86db4e9fa50cc96 -LLVM.v11.0.0+6.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/30c258f1cf6e5b0d92e909ea506990ed567ddb82f562e62f49afa4f5fcc54009f30d878b24d61e32c8414ebb7ec4ad1ea2f5e7e3e4460176104a4cac4444d00b -LLVM.v11.0.0+6.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/b899546dab2f8d8a3a4ac321a7603a27 -LLVM.v11.0.0+6.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/524331371c6c3e963029453066597ef650f327341161e35b667eedf79b8b4d8e20bc4c5f1240e3eb16724751390b32c236e15fba6a0aefa69e09d751ec278212 -LLVM.v11.0.0+6.armv7l-linux-musleabihf-cxx03.tar.gz/md5/0f4b4d02fd8027244e0873427214fec1 -LLVM.v11.0.0+6.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/5f8d1f18b9d0132b4cb5287ed106ebec869ce62c15e3878f7c05cbd44f11515357205522774d56de27d86d086fa995c8390755167e8f4b16a9f9814ab8267b40 -LLVM.v11.0.0+6.armv7l-linux-musleabihf-cxx11.tar.gz/md5/f387b55a71c8d318ca04aeb42091ce7e -LLVM.v11.0.0+6.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/06ec735719f0055e84ba2af4ba187570944cb40805e69f6fa22edcbe72c9e36298fc064ce745106d0a8b72fbe8b710fc5b0619755a0014a3a52fc4073126006e -LLVM.v11.0.0+6.i686-linux-gnu-cxx03.tar.gz/md5/afe179dea20b7105fa2b5ab3cfa961d8 -LLVM.v11.0.0+6.i686-linux-gnu-cxx03.tar.gz/sha512/496e0853060d51fd3a987712fc0019fb85c91dbd380363dda694555467fa12eae2da2155a208b5cbc7d830ae2e395327d898d278d26fe619e9f6f555487aa1b5 -LLVM.v11.0.0+6.i686-linux-gnu-cxx11.tar.gz/md5/232c1e2787c6bbf1876a9c7411bc6a10 -LLVM.v11.0.0+6.i686-linux-gnu-cxx11.tar.gz/sha512/195adac959928eeea08106fa98f6549f15210ff4f0f46cde7584f29be89461419c9a89f5536851f1d9859eb92e3cf2aa13455445b5480ebc317d3d6dc0b42cbb -LLVM.v11.0.0+6.i686-linux-musl-cxx03.tar.gz/md5/7322d77b517871a9571fc21fca2bd065 -LLVM.v11.0.0+6.i686-linux-musl-cxx03.tar.gz/sha512/319ed21dd088335e04811dd504ed1e365c51ad5addc8ff95b80dca75712c011bafa6181ff1bb72e8fb76a026617f871fbfaba39bf7a4311a0e6b8db57dbad7f3 -LLVM.v11.0.0+6.i686-linux-musl-cxx11.tar.gz/md5/a806d0c580246edd8a80eea8abd6b678 -LLVM.v11.0.0+6.i686-linux-musl-cxx11.tar.gz/sha512/11dbec48a79a3e7a70adc77d19f2113a43d43443384b57a5b3be6404249d649a4aeebe340d310b1a450967a3c75ae4167861d9730371a364819275c2c26d4863 -LLVM.v11.0.0+6.i686-w64-mingw32-cxx03.tar.gz/md5/ed5a05c610bd4772f21225a20a9b8586 -LLVM.v11.0.0+6.i686-w64-mingw32-cxx03.tar.gz/sha512/c6bf82cbf1976a7c3794ed0387682bd960e41417a7ee99238583a2f0220995b53a1c02aebbcb3653520bb2d5526aa982db0dd7bb52d4bac91cf00b7d1c97cfc7 -LLVM.v11.0.0+6.i686-w64-mingw32-cxx11.tar.gz/md5/713c04d75a5f5cc2c12b28ed547d8a3c -LLVM.v11.0.0+6.i686-w64-mingw32-cxx11.tar.gz/sha512/5046809e71da67e8081c780b59604b7f13068b8d02437131d7e888a4f66f7fc61566a0e196900610ab72352157742356ae45a4bd681a170282489a61f38385b7 -LLVM.v11.0.0+6.powerpc64le-linux-gnu-cxx03.tar.gz/md5/3134eead7a2107fae23b9daf32770943 -LLVM.v11.0.0+6.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5de28a4d0750312917cf2449926330ed0c582ba3d969854d7d00cbced3b9e37a27990b0ac0852c73519a53b57b2047beb90f2da9c1397d5c5e5480fcd89e507b -LLVM.v11.0.0+6.powerpc64le-linux-gnu-cxx11.tar.gz/md5/2c5f4d09f5eb67178781442b4ce41aa2 -LLVM.v11.0.0+6.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/c1288af0da46066e39aa5f524d068c8fc27477c5dcdf480b7b0d434b45f4559a68952862e0348861d9022664613874e4ceb0f249cc83871f174c985dcf23695d -LLVM.v11.0.0+6.x86_64-apple-darwin.tar.gz/md5/228475fbd2c4804fddedec0da65adb21 -LLVM.v11.0.0+6.x86_64-apple-darwin.tar.gz/sha512/5ec770de6c44d0a04f36678f39a0f608a62dcea4d1cfd6ffe80afa1d583a238aaa70252aa71c2ce31f4567ebeb989f7757aea72007337676a13a33697fe31ba7 -LLVM.v11.0.0+6.x86_64-linux-gnu-cxx03.tar.gz/md5/fde67e1f15124e0912fef35d99be99e2 -LLVM.v11.0.0+6.x86_64-linux-gnu-cxx03.tar.gz/sha512/78c8f8791b026e5c6b7e5b7c77a4bdc370147c61c243d68f3ad7e1d8f144abc5e9978fc5dc6b7cd96351e9f88ee00670658270841fa115811b3eeccafe22fa91 -LLVM.v11.0.0+6.x86_64-linux-gnu-cxx11.tar.gz/md5/8e848e4624dd4760b75b932c0802f999 -LLVM.v11.0.0+6.x86_64-linux-gnu-cxx11.tar.gz/sha512/922e914ec453a43f7f5cde514b0a68a06ffdb53ae778d89b4374a91d1ba3d5b4612c1e302726efa8fd824fea7e0f2c509696841cd41f9dbfc8c1444d0c582351 -LLVM.v11.0.0+6.x86_64-linux-musl-cxx03.tar.gz/md5/0fba7b176d093b1582299bfbfd1f22c4 -LLVM.v11.0.0+6.x86_64-linux-musl-cxx03.tar.gz/sha512/28aa06364af5d508c77f43fb45c054791b2c01698ce1e3bb348fc83732f6f434dbc9077d31bd7ecd49ed933723fed0b0c88ff407fc20cfa123b100d48babadb8 -LLVM.v11.0.0+6.x86_64-linux-musl-cxx11.tar.gz/md5/34ccced0be355f34db5c1fb57e1f9a6c -LLVM.v11.0.0+6.x86_64-linux-musl-cxx11.tar.gz/sha512/bbac3fc2ead3751446fd2576a37a57f0729ff4545098aa8638a55a4166174351309354a7d3a8c16287f5281ec967f5026f24e858dd3bf08eab735bac38e200c7 -LLVM.v11.0.0+6.x86_64-unknown-freebsd.tar.gz/md5/ba009ee74424f1071812b38669cd941a -LLVM.v11.0.0+6.x86_64-unknown-freebsd.tar.gz/sha512/bd3b27ebaf504778367e2f2d90205626a6c59c94a016d8ea7b1aa97bfe0075900582ebeb34c51506eda67be8092dc566044b3af3fa1fd92800a38d3a18923fda -LLVM.v11.0.0+6.x86_64-w64-mingw32-cxx03.tar.gz/md5/1853967bea81faacbd73c476f2252414 -LLVM.v11.0.0+6.x86_64-w64-mingw32-cxx03.tar.gz/sha512/0a7f81dfae7ecd6ef965fe9d1a11233d88925e29095fecfb1c3366a5c95d193d86bc2b760e0897fd118620232407f042328f870625260b1258cb2522e752904f -LLVM.v11.0.0+6.x86_64-w64-mingw32-cxx11.tar.gz/md5/9cbe2a347d3ceaf2392396ecdda5c907 -LLVM.v11.0.0+6.x86_64-w64-mingw32-cxx11.tar.gz/sha512/ee5d20f94c19e823062353b56bfa48cb5bc537315b4d39a4dcad264e496930e87c8536f1ed3b1eee15c53bdd4fc12e61d3c751dbdc5ddc4471fe70597b76bbfe -libLLVM.v11.0.0+5.aarch64-apple-darwin.tar.gz/md5/6093c33101fcc79379c93ed1198bea45 -libLLVM.v11.0.0+5.aarch64-apple-darwin.tar.gz/sha512/9091d6193589b7a46aa82ec5eebda0be4e394a5d478e3ae4c8b0cb68f295de5ab92707a058742fb04c346fa230348d0b69ff0cb5ce45de6018ac10853cf66ab7 -libLLVM.v11.0.0+5.aarch64-linux-gnu-cxx03.tar.gz/md5/cc137eb7f436df8ab862691a602d7609 -libLLVM.v11.0.0+5.aarch64-linux-gnu-cxx03.tar.gz/sha512/f873e6aa4644422076bb2e74f3d2c46243adb156abd6963407d782bc1d49751393477256c82ab2a38549a81decd95cee48f64229f1274d3fa531de97f23c4d0b -libLLVM.v11.0.0+5.aarch64-linux-gnu-cxx11.tar.gz/md5/c5ef17143ab1103d76eca8c066858cd5 -libLLVM.v11.0.0+5.aarch64-linux-gnu-cxx11.tar.gz/sha512/915da9f1b0a931479156ab7c9b04b355584b1dda74cf2e59d49922ff448980bfea2dd702c82e8fd79748e55744d752bad36f02ff7511722e28b14e25d22cc895 -libLLVM.v11.0.0+5.aarch64-linux-musl-cxx03.tar.gz/md5/d50977717fb2218a20abe4f464a18a44 -libLLVM.v11.0.0+5.aarch64-linux-musl-cxx03.tar.gz/sha512/f67780a963854bc71f99c06dd6b9e49d01208126e7a56e438574cbaa64f684d554f56cf9bbae0c2cb03f5a8d88ca440d0f7d25a4c3bc28fc94837b3f7b78f682 -libLLVM.v11.0.0+5.aarch64-linux-musl-cxx11.tar.gz/md5/42ef1a781c9fbfb1934e5d6bb5e9f003 -libLLVM.v11.0.0+5.aarch64-linux-musl-cxx11.tar.gz/sha512/cfab5718ca64265bc1a900dd8c5f5700940943b901c61416f476299c0b01db0b9d8feeaf2c4ab73e5ab4ca3b3e53f20b8d0cd01d6af0fa3b20c02b24bad83ac8 -libLLVM.v11.0.0+5.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/46164ebf60f61996cc87bbd9f4d8a3f4 -libLLVM.v11.0.0+5.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/c755ca6140175353e25499cb6e26568c65e83065064e7f94bda44f4135e82e19373f8d254185b21941d3c3998db0d70199ed854e1aba3e6bfda166a038e71dad -libLLVM.v11.0.0+5.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/50e236b476687f13b702c88324f3ba84 -libLLVM.v11.0.0+5.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a75cc8cc1dd7efcd04c654dd4647fe45e56ef5c0ea61eb86ab73a3ec62479f9842feedbc9843b6b1e7cd27234ef23c3ccdecac257f9503742d68e466e8ab577c -libLLVM.v11.0.0+5.armv6l-linux-musleabihf-cxx03.tar.gz/md5/1b30fa450e7a36c99a9296d726985ff9 -libLLVM.v11.0.0+5.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/77da6971da255f7b497473a57e615c981684a7d0cbc4e8a50a4021a054fe9b36ff0c4956502e45cfdd0b721693e27a9e5121ec51344f051faf5d542ffb70fd39 -libLLVM.v11.0.0+5.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e9dbaf111bd4820ffdf219d3194851a0 -libLLVM.v11.0.0+5.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/340a8933539f32ded7a6a43ce9545a08cf3fcdce65c081b04fb01d61e02cb34fde7e186d3e6b62b6631a52a5abddb2d2c2b90c6d5a06f56cf0804ff7be7578ba -libLLVM.v11.0.0+5.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/427af130d0f4f40bc861e410046edd55 -libLLVM.v11.0.0+5.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/33eed570f1c578ea0343082632fc6885dc46c4a9175df13c4c559560b386629a757eb7d17950ae3d34d2f7f513ee59d84636550c5d114800bc1963d6f377ef4c -libLLVM.v11.0.0+5.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/8724eaff65ada8bc7799bfa8cb5a70fe -libLLVM.v11.0.0+5.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/ea6367325fe2a63725ec544fc0f72bb7110883fa312cc5550bc95e8376ef28d78582af0e4574f7e9835218b48f0fe6cbc2ff452770147c224d6c7108497b715d -libLLVM.v11.0.0+5.armv7l-linux-musleabihf-cxx03.tar.gz/md5/fd3772219994c175c714c046254d6ae0 -libLLVM.v11.0.0+5.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/dd73cc75aff7feaaa84d87eeeb14e2df565d104942af96891f29c2f7da944467b2b1d599649336cba5bf7205c958117a7c6a6213c775f07e7ca86a2016542f8d -libLLVM.v11.0.0+5.armv7l-linux-musleabihf-cxx11.tar.gz/md5/83b869822caa630768c6bd2b7cfe03f4 -libLLVM.v11.0.0+5.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/057602f5388f8b9ec55515ec758edb8477a84d70afe2bde6c56b9001b07753ca7f70bda3d7ed4919df119e4aaa5515c47f967bf5f5cac272694a75477fc644b4 -libLLVM.v11.0.0+5.i686-linux-gnu-cxx03.tar.gz/md5/4e1526f2cd92dc7448b1d24e8aac064c -libLLVM.v11.0.0+5.i686-linux-gnu-cxx03.tar.gz/sha512/93dc0c9964cce8794fc6d41594e8ac5446fae07c9e3a8c185445e0c10976562a2edb738520ce1075b63cda165dfe60e8ecee432cd522d1a8d81cbbe0f1423ad3 -libLLVM.v11.0.0+5.i686-linux-gnu-cxx11.tar.gz/md5/829fa4d0feaec240c91ebce879bee440 -libLLVM.v11.0.0+5.i686-linux-gnu-cxx11.tar.gz/sha512/08c00feac8b9fbdceac2952a85e4c9b9836ed9994be266963fdea566e18981c7e763562fa534746c25381b7c7feed50e1e35b78e6040cefde90de35f61bb347d -libLLVM.v11.0.0+5.i686-linux-musl-cxx03.tar.gz/md5/891ee75595110ab8b85b17decd1598dc -libLLVM.v11.0.0+5.i686-linux-musl-cxx03.tar.gz/sha512/f5bef30a1ac951c50e195638c1931a989528e1ec02316c0bbfe61070a5c1ce6b1d4108ea393aeeebab0ca089f1132bf74ee664d1b0f0b17b9e7c7964d9137050 -libLLVM.v11.0.0+5.i686-linux-musl-cxx11.tar.gz/md5/5ed1de36778f8afc47d7e8b230532bc0 -libLLVM.v11.0.0+5.i686-linux-musl-cxx11.tar.gz/sha512/51fbbff8b227cc5fe9d3c862ad990e395baa7523103a4d6cf6e4a7bd411e0f00c4567e60989269917d7b546103764f21fe212bcf574c74f75b6f4b668c144e69 -libLLVM.v11.0.0+5.i686-w64-mingw32-cxx03.tar.gz/md5/1a649637bec7fbe82e29b32dc70c9c9b -libLLVM.v11.0.0+5.i686-w64-mingw32-cxx03.tar.gz/sha512/61d4203fbffef54b9b251f2319c9224608f3331e974b30895817956ff8fa12b95afd579fe68d9521e37c351194931763a5f74e72a36e62aca3400a3cbca058c6 -libLLVM.v11.0.0+5.i686-w64-mingw32-cxx11.tar.gz/md5/ab780f440cea869cf8f26051e4a99037 -libLLVM.v11.0.0+5.i686-w64-mingw32-cxx11.tar.gz/sha512/ad5c02984cbd6dbb2d3c67e1a0350fdc62a786185aeefc1b7f3f94782a23a12a5525813405c4a2ea829a7fbd71869a9226b9a520817eda0bc9d9508fef130fdc -libLLVM.v11.0.0+5.powerpc64le-linux-gnu-cxx03.tar.gz/md5/5556521e7ef57eabae57979a5bee9513 -libLLVM.v11.0.0+5.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/783ea0396a9d3e435cb85a8c94b842ed3155c16b12d7218c1f1d0525550ab25b91ef1a2bf697154ba036034642f4453d1d9b5d5dfde1a34c6298c5fecce6d344 -libLLVM.v11.0.0+5.powerpc64le-linux-gnu-cxx11.tar.gz/md5/03abedbd8120e81b62645a8e01c7dcfa -libLLVM.v11.0.0+5.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/09896cb94818ef583a1aacea0e207bb502ab779fecd2693f672463864de12bd2b87e57430bff17c2e1ba5a166069031ab5bc6866645b37889f42e403adc2992c -libLLVM.v11.0.0+5.x86_64-apple-darwin.tar.gz/md5/a58cca2dd2ca7251d59b92032aa23453 -libLLVM.v11.0.0+5.x86_64-apple-darwin.tar.gz/sha512/77088da3a569cdaf1f26ef3fc9a4e3abf5b4b3cd686715fa8133efef5206e0e886508bbd1a986e858d0bad6eceb64113e8ec6fd69b38053871df194df3b24559 -libLLVM.v11.0.0+5.x86_64-linux-gnu-cxx03.tar.gz/md5/4d45b86cc2bc673e7447e0400e1444c2 -libLLVM.v11.0.0+5.x86_64-linux-gnu-cxx03.tar.gz/sha512/506b406bde06b46cd0ae49ba35659b37572f6942ff825f5a682a18d7deafc7b38ab9f78ec6f122baec4b851f009091c3d1b89731ba871f67334f1463a6820fed -libLLVM.v11.0.0+5.x86_64-linux-gnu-cxx11.tar.gz/md5/f6221d802cfae827b780906969510aa6 -libLLVM.v11.0.0+5.x86_64-linux-gnu-cxx11.tar.gz/sha512/1913b4766a5032badcff8247b72584ee0f0a6a6c3de73b6051fa65f707b530e2186fe9696f15685257c211a0fd52d0eb52c490801ada775536f38e2dbc656821 -libLLVM.v11.0.0+5.x86_64-linux-musl-cxx03.tar.gz/md5/bfc7dffb58563c23976b391677510afa -libLLVM.v11.0.0+5.x86_64-linux-musl-cxx03.tar.gz/sha512/122067a7d5a64ec67331d30f289ebccd62ee9cce1dec828644ca5e210aacb427b632d9e46939e7753da599693fd8926099768babacad06c57b79fc784c76520e -libLLVM.v11.0.0+5.x86_64-linux-musl-cxx11.tar.gz/md5/1fef97d7b6a66eb5047c23abc740a757 -libLLVM.v11.0.0+5.x86_64-linux-musl-cxx11.tar.gz/sha512/9a0d18d4752b81cd5026392501d725c71d955938a55bf126a6b8d1dc7ec4035147bb86ab44592de1a3e9f8d6505dcb0cd1b3f2f667ed67569188a1347dbd71ea -libLLVM.v11.0.0+5.x86_64-unknown-freebsd.tar.gz/md5/fd1b477fca09cadbdcc7e812b3952245 -libLLVM.v11.0.0+5.x86_64-unknown-freebsd.tar.gz/sha512/89e6a796292c6cb045dc78e2d9c82c31c3507fecc5aa31fca84e79ea3a402318c1c0822fa3a88c329b8731d220550733737df83266036b648d367f50e9f77f4e -libLLVM.v11.0.0+5.x86_64-w64-mingw32-cxx03.tar.gz/md5/6ad1eb4936bf7c181fe6b3bb987ebf31 -libLLVM.v11.0.0+5.x86_64-w64-mingw32-cxx03.tar.gz/sha512/042259fbd70cfdc1f27bba8d692cbf40b046b0df966c8ec8119a08dd63bf32c0da7f6bc541b45dd7606ce67996b1b7ee6ce4900a95b4e6def28bd7061c461ea7 -libLLVM.v11.0.0+5.x86_64-w64-mingw32-cxx11.tar.gz/md5/6f73f4a673025c078505ff14e6608929 -libLLVM.v11.0.0+5.x86_64-w64-mingw32-cxx11.tar.gz/sha512/26c18ecd415faced18116c01a0d491ccb0a9dd957f33bcea17147c7209d00a4092508a66c803fc057ea824f4bb1408526d201cdd1d31d3c2ba20016bc48d9272 -libLLVM_assert.v11.0.0+4.aarch64-apple-darwin.tar.gz/md5/b3f2d92a01d0634dae3cd285ca828034 -libLLVM_assert.v11.0.0+4.aarch64-apple-darwin.tar.gz/sha512/d830858163fdf7686c909faf086db589f5702be227d99cccfab9b5ce255d611937dd304dbf55731e72082c0ea0bca2a9841b4d8b7f57b861de54cf2911a51dfd -libLLVM_assert.v11.0.0+4.aarch64-linux-gnu-cxx03.tar.gz/md5/c44b3954aadb451b0bcd9985555fedd9 -libLLVM_assert.v11.0.0+4.aarch64-linux-gnu-cxx03.tar.gz/sha512/dc25a8cbcc090719c8d62a12a456c285eeaacb5e0329ccb07caa5ad8b7060566e17a78eafab5fe8671808ff450b0d7d5b9184c08e25a5e06be3ccac48d558568 -libLLVM_assert.v11.0.0+4.aarch64-linux-gnu-cxx11.tar.gz/md5/1613b5d7fbd98e8955f8ad2690357e26 -libLLVM_assert.v11.0.0+4.aarch64-linux-gnu-cxx11.tar.gz/sha512/955e7304d1f0ac77d7f3a89d95b9f94da3b5125027343ad3138c14b940e800190f5a1a69482c6bc7ddd688f9a42b246ffb6c2f0966c5726ee8b4ff255f793127 -libLLVM_assert.v11.0.0+4.aarch64-linux-musl-cxx03.tar.gz/md5/a4d5f0ec7394524259309fb1bae109d4 -libLLVM_assert.v11.0.0+4.aarch64-linux-musl-cxx03.tar.gz/sha512/646bc7d60fb66e0fbac4fbfe617b14a0c025d4a08f40dba7cc93ddfc2e5b8fc565b1ce97fe77229fa1409720952d1540a6fdc8a2767ed49ac7b9ad234a1ba726 -libLLVM_assert.v11.0.0+4.aarch64-linux-musl-cxx11.tar.gz/md5/aa6260325bf0c2dc0013b1898feea408 -libLLVM_assert.v11.0.0+4.aarch64-linux-musl-cxx11.tar.gz/sha512/0981de6cd9e59b90dca8f536d79ce38f13b76f21e952ded6dc2ca033e83f79d1851cc90485d8583dd88052d1836ae7b2faf241ada43644fce32ac291dd562f6f -libLLVM_assert.v11.0.0+4.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/d813f8574a389fcff274c56539dac3fe -libLLVM_assert.v11.0.0+4.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a5d61fb8ff01db31ae6b654b310f65fed3fc50632bff12a384ceae9e539d24f144899f42aa03fc897732b4e1ab98f522fff1710b17323e73cdfa3bf8659117a3 -libLLVM_assert.v11.0.0+4.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/d7c742feacc6c241ad503c67ec926eb6 -libLLVM_assert.v11.0.0+4.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/2a858171fed4cf139cfff6797a7765a2ba635e541e7df31819aec926a8de1827bc5d5549f2d1c25fbcdc7da53081b7f02174b279a36bf71d1239ec8bdd6cc6e6 -libLLVM_assert.v11.0.0+4.armv6l-linux-musleabihf-cxx03.tar.gz/md5/c6adb1bdbc4e6de054ddff011e83828d -libLLVM_assert.v11.0.0+4.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/cfab24788c33cbf941e50c9a575c43811879d2c31a053e262589be4dba16660f99ed4d86167a775a8029685bed499867d2e55d303fbe50f07a5e3b4ad3dfd3d4 -libLLVM_assert.v11.0.0+4.armv6l-linux-musleabihf-cxx11.tar.gz/md5/82b9b7fdd60a8b585237221d72a9c197 -libLLVM_assert.v11.0.0+4.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/fe15f9639a34b0796528a99d3a50c5c985d6ada1584a980a18aa9ce5254ffcdfc96d4051928c14de6455c9c4964be07496fa34186e96a3904b21583e1452398e -libLLVM_assert.v11.0.0+4.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a3a7df2a953df4573e9541bac02c36f5 -libLLVM_assert.v11.0.0+4.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/19f27571f1b4621ab8dc7ebede362346d9da3ef16a13d35823394f62efacd4d1a45e3372b69c2f0488f5901706fead7e605eccf5f63005fb619bf71e69d9b9c4 -libLLVM_assert.v11.0.0+4.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/97cbcb5a1fe9363a951705aa6b4becdf -libLLVM_assert.v11.0.0+4.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/42bfe71d8d6b0ade455ca0a820ecb2b5a9efedf3932c1b86f46b2c7143dee45986c3cfd862ff7c02111f8efb49eb8eac8c293a3adf522d5424b2365915b89a6e -libLLVM_assert.v11.0.0+4.armv7l-linux-musleabihf-cxx03.tar.gz/md5/db76a75a4bbcdc27d0a5fbf5d5dcf5f3 -libLLVM_assert.v11.0.0+4.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/27962b2457337b0548a9f121d582c10ab7154b7c99b65f8dc465bd9165dbe67d5719f41047630b7f176fae57f61d28caf93946ea6b63e852585340ee387fffd3 -libLLVM_assert.v11.0.0+4.armv7l-linux-musleabihf-cxx11.tar.gz/md5/860f98bbef0d9b4bbcd22cad5bf655d8 -libLLVM_assert.v11.0.0+4.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/53073a3a886a0ee4a250a27effb26cfa95cf790d6a04a93a01453a5e0db6b3e1dc333da294750dfaeb77de39254c153a93270bb168655d53a69058315bbb4e00 -libLLVM_assert.v11.0.0+4.i686-linux-gnu-cxx03.tar.gz/md5/35a3ed96171881cd54ca185f0811dc8a -libLLVM_assert.v11.0.0+4.i686-linux-gnu-cxx03.tar.gz/sha512/608c19b8b0fce94405b781ac43658f3149f3586a5665420e41dd8d99111b5e22f536ef92d3bc1e266328dca3acb098832aaf8d01ce77c089e2fed9b4328fe9b3 -libLLVM_assert.v11.0.0+4.i686-linux-gnu-cxx11.tar.gz/md5/da1cebec9227f0c027aa21d01dde91ae -libLLVM_assert.v11.0.0+4.i686-linux-gnu-cxx11.tar.gz/sha512/478c380c7e47a15db023d6805baa0553f2fa7eefb084017ff03739862d677d03a2ab233992f74466e15d7c2d1d0f8e74a6f14a59a7ff543169121f8c71e13bd4 -libLLVM_assert.v11.0.0+4.i686-linux-musl-cxx03.tar.gz/md5/b907e624bf517c934f0a72ece354bf11 -libLLVM_assert.v11.0.0+4.i686-linux-musl-cxx03.tar.gz/sha512/7256348daeb5f2e5a582b77c747d813b6d2c814a48c93b5072c2973d59ab5c320deff0fc2cc860092d9dec3042021982219b9b2eece1be43f6b782cebf7808e2 -libLLVM_assert.v11.0.0+4.i686-linux-musl-cxx11.tar.gz/md5/76e47ca276cce508a79822916989b9fc -libLLVM_assert.v11.0.0+4.i686-linux-musl-cxx11.tar.gz/sha512/8f4a276258d24cc07192cf2a4f0063943947dbbd74f2a35b3c89e77a62a087578d913f348c934beb50f70a3fb17217b8011d35a3d4eb7cdaf90e91c7232f7a4c -libLLVM_assert.v11.0.0+4.i686-w64-mingw32-cxx03.tar.gz/md5/d8694a65b6c69ac7d1632372ee59b331 -libLLVM_assert.v11.0.0+4.i686-w64-mingw32-cxx03.tar.gz/sha512/314a1669c428ad518d1b38ea45b177ce4c1ba141efb1a9f7202ca1f531b62400d8964baaff6e16f86abae276fe65bf2b18bd0ad181a8a059be39e05fff3d2ccb -libLLVM_assert.v11.0.0+4.i686-w64-mingw32-cxx11.tar.gz/md5/1a91e6dc0eed69dd78e2e684e5a45c1f -libLLVM_assert.v11.0.0+4.i686-w64-mingw32-cxx11.tar.gz/sha512/37f4fed310a34a414821f04bb5c333825bba06f483a33a6faede3c3f8eaa3d955b8f307398fb8906c44f0e140d4c9bbcc49bab6a6076120f31d5b51716885206 -libLLVM_assert.v11.0.0+4.powerpc64le-linux-gnu-cxx03.tar.gz/md5/dacf4d3b3d1894952662d669b0a6573a -libLLVM_assert.v11.0.0+4.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/e13787342514824d8620cb06741fceb28f22fa2153882d9823a20fe5eeff36db3f950f13e71a4cf80f05e4d55c315b77730b9495689ba3472e40e876018ee868 -libLLVM_assert.v11.0.0+4.powerpc64le-linux-gnu-cxx11.tar.gz/md5/b9361a6158fe52cf757fa3a54232bd4f -libLLVM_assert.v11.0.0+4.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/ed54814963100fc7ff669e7efd6fc9bba8119ee5415a8da7e3a329e5b8646dc4cbd92b4b7ded081e37c4b76dbb9d3d90abbd3c3eaea884b1f165877971882627 -libLLVM_assert.v11.0.0+4.x86_64-apple-darwin.tar.gz/md5/9c3718c0a565d2c63660f21db8f885be -libLLVM_assert.v11.0.0+4.x86_64-apple-darwin.tar.gz/sha512/adc9d0e42eadc1121291c859901adc9d6dcb83ad25b66a2b6845bcb72f27a4c6e457ac248595fd3ebb9641f6c4c8de5a7969043e28c2dc4a31a79c6fc46f1735 -libLLVM_assert.v11.0.0+4.x86_64-linux-gnu-cxx03.tar.gz/md5/c1335b3639dc3f24618c5ef9c73f1e3f -libLLVM_assert.v11.0.0+4.x86_64-linux-gnu-cxx03.tar.gz/sha512/7e05546a25d72a8e90378edb9704bf9d9be1f7757672b3c7a05b670df993718b076598343cbf078b91cf852f6f229bd9b8cb0d1c77cbbb24707a1407feb5c665 -libLLVM_assert.v11.0.0+4.x86_64-linux-gnu-cxx11.tar.gz/md5/91f99a06286db80153289c1b0857a0de -libLLVM_assert.v11.0.0+4.x86_64-linux-gnu-cxx11.tar.gz/sha512/1a3e15dc1ef2c0721425b341929d3aa4cec5070964b4fc0d3330ec14e0babbe7274e6dec262fdfe972712f8bbf577e4918e296d7cdd60e72e5efb53b57e8e304 -libLLVM_assert.v11.0.0+4.x86_64-linux-musl-cxx03.tar.gz/md5/d4252bda895100039b2edd0447c06636 -libLLVM_assert.v11.0.0+4.x86_64-linux-musl-cxx03.tar.gz/sha512/8643543c32494d4a2237d9c22fbb20f7780f7cb64aef89dc43583d83790288832a687a4352462877f6fe5cf48e5a1bad5a20eb3b2e51f082797b0c18a43db82e -libLLVM_assert.v11.0.0+4.x86_64-linux-musl-cxx11.tar.gz/md5/e740aa378f788810814b03b8ca6dbcc0 -libLLVM_assert.v11.0.0+4.x86_64-linux-musl-cxx11.tar.gz/sha512/4ccf31c437a9377f77e216cedb459eb133d9c2b0f4e2878cc3a354069f6f070899c1136829aa2cc4833fd2a75ed91b093e5e701f1bed2acfad08468d8fc3f183 -libLLVM_assert.v11.0.0+4.x86_64-unknown-freebsd.tar.gz/md5/561ce469e0a1da154efd4f25108317c0 -libLLVM_assert.v11.0.0+4.x86_64-unknown-freebsd.tar.gz/sha512/3d0ac0fdd255087db3bcb4d0c1f53350090a611d888bb77c3f422f91a6ab43fddba2b39686f271bae098330be9461657c338171c32f7038c2484a32052d8b05b -libLLVM_assert.v11.0.0+4.x86_64-w64-mingw32-cxx03.tar.gz/md5/702c79a18b1f460cbe7d1c33a4258b4d -libLLVM_assert.v11.0.0+4.x86_64-w64-mingw32-cxx03.tar.gz/sha512/16f7e377ae8a7f443d631906470875ed97a6c4b23b0d74071a21e77f3fc1055fea52e59e74dcc4cb5e5486df0241b54c5398a188d6c75275ca345d14ffe56825 -libLLVM_assert.v11.0.0+4.x86_64-w64-mingw32-cxx11.tar.gz/md5/e40a01d070092c5aaa6dd335d5ba75e9 -libLLVM_assert.v11.0.0+4.x86_64-w64-mingw32-cxx11.tar.gz/sha512/3628b68fc42b95a7817c42987780c22f95a4e80374063a0a748c4bcae979ff8f669ec02f8e69d11f06d2d06db09e1969f54b2d4f53b8b3feafb2669d294bd5a1 +libLLVM_assert.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/01ce1fa1c844d25592a356960f107083 +libLLVM_assert.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/3c4a94b225a0a277f5587dc646d4cfa74c269d4411f1d08e5fec78ecf5adc2766d0382626e47d5ef375a1c817750e9bcc74655f29fcf6dc35e396882f05e43ec +libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/801e14ea4683c1aaea7471d3ab6d1cff +libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/5bc5733dbfb328b738c1bc12e0fe5d1beb6d5638ed68db590ac8e6f6904f7f4eeb11749202be34b6cb9edddd8fbabfadd8ee4b9bb7a7267cdf1e111b4910b56c +libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/0272cb3351dfb0d9b305c614f95d6b9c +libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/2bc95342c55a137290421837d0cffaa2b5e7c46b1ed02c01c5ae090bdfe67699d46f9e9cebe935b35edd64870c2174b810b175dd26a6c9d37a361feff9b3ab4a +libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/010c7b4819b3f62507f4d94da323b91b +libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/759ca60134f8ae44b4375f1756b9b830262efc2852479cc5dfe7222a7088958e1c34f6122a9bd038d5121a18d9fb5d60611fa7cdbdcd9c77c9a7a6c27bf725a5 +libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/795e01d60430cc4d94dfa4141fd4a95f +libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/da172e81b064dd758609efe3cd48dbc9e9967543cf94cac5f27b775df0ab87b787e2ea247092a16078d33407878bcc9ba2223b548d0fb84285113e92d03a9cd1 +libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/99bb6924aa6bf6e04f87fb96f50ea9fb +libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/1d2a5ac479915062bcb13ebad1e9040bc8fecdb54a4fd30aaa97a2ce10463cc2292677000e51dd8b3c2289c695f35f17a9864ebf4adc6c4702842c2cae8e0785 +libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/9fdd873c27109adbff52bdeb9774bacd +libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/c7aa34e102eb3941c55b9a207bf5c2af851ddc97e1a575a8f4a1f50102be2cf9e6f2ea4fc88e0d7fd29e440cb74bb9f805d91f813a5c1d91552c337af31af85f +libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/245d0d63afa7e81b924bb0a909e5ad4c +libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b90259fb9afbc4d4ce7fdbc717d0321e72b8ae6e777d66960bb8754e57f1612438131e2061a0db5de78dc0aabc8a1ef5839e4ff2d80d263c1db2b949f28c5ceb +libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/8ef34cedadfc87d9bc81b72165fe3ffe +libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/1f2e7b12b788405a48eeecd4dc5999cd9ebeb7de2c19068a0809e7804ab6fa27f64307127dab0d5a34c368be967f86e4ec866310a9af30eef0bf4b9c0330a386 +libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/29d8daecf3254d31db7a92d069692cab +libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/6d217c278b80dc8f56730508aa6c93104f3bb6cc92d90c763c8403a17b107ce615bf320232d3fd6d439f76f0260da5c7bc34fb13b592f95b4113a6394b0d6ad7 +libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/4545a7d06bbeaf1b8061d7728107f222 +libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8c881b33ea364845bfe85757b70a11f8bd75bc5f79929ccd7b4f6a01ce2582ca0cd353abd8b61ae76202674211b9b8e18492ebd10bd94262536ceac53bfec625 +libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/7f23b6e002f429ce2805014686e4cbee +libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/232176e500d9c086ee2f30e2139f26b26956921bd76007f99433d18fe6007f15cdd6c72981527792e712d82f513cce510b7e0767136534613fa89f76e6e8dfac +libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/a33428d48938ffeb39568fb116590b09 +libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/53926f07da2f712fa75cc76decd8427c868297c5b2a7f82732caa36f406c8e0709adb1f5c5a5f3893bb1daf7dfb710716cb1d9d78ba94d5b2adf603fcc9df453 +libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/516255057a3dd18e010b9994c0fc7df0 +libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/3031b4655487b11fd65670af8b4362cadfc3240a1ebdd5aa4348b6db95c68e1dc312ccc6d2690ab147601d438b06fdb7283772136ad9f3e23f94df585a7c01fb +libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/c698bad624a1c0d0351a12089d2fab0d +libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/83d821bdd79b0fb3ff979969f3797aedd77c7fc7e8bc6c28b43584b208d62c2d1c8d655f934c17a52d6af112ca69f455636412132daf7b097d0c8e9034eac9ba +libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/c6f07ad0e28e80c8cdc4bb8ee0954e93 +libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/8998823d88f0b31a26b3733d17056f3411c7079b27acdcd19f43b7091368563756243ed796b4c24c9c5540ef9021ea04c874101145d1e22ee90dbecc4df88444 +libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/3cac3d493d67c65131e621eb7b5f9642 +libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/addbff3c4bd4f861fe8543b590df1c1e21f932e5fbfc077c998d6ee8aea4057e4ef5b2b3db22ccb35274d667c3e4f4cf93a80b4b25c3db815cd2afe6f1ae9bb7 +libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/3f28b8c02393b3df8dea1b4a60b5caa0 +libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/cdf973c9fc6eb4126b084d94a95328f0c11f5e321439b527afc964e16b9edc157096cdea6fe4cb65ad23b5962c1aff80cdcc865a3bcd7db2ba94f2850e7224bb +libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/6a50f7c21e1c26bd498e604d9e703218 +libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/6458830c94ca914a47ad68d42d4ad7ac36b0f04846e9fb6f8f0d71e1fc72d7e7d72489243b2d669a21a4a90cafc1762da51c6aaaa9bc88fad012f7fe2ae60ee8 +libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/344bb37464050981120df0c375535bbf +libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/ce3705a52d3c59b611d6a37b96cb3185054e99e9731b3792e460eb2844ba52d2c7bef6c83516ee40298cc54f8022e73f933d23d814b7ab4f07ed8ea486ff9eed +libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/9a380e07b9a85ae2adb9a322b6e4d77e +libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/29871da2a92d7ac001f92ff6233ce66fa2a6e61a3f6b6bbd00e0748dfd64ce0d95ef7213681384ca4de81979f573485ac2e22b849551aa60bf301d633b888a4c +libLLVM_assert.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/c324368a1703af17c6c57746a9453ed6 +libLLVM_assert.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/3422886200149d5e958ac75a1f7be4a982c19a8285e256bcc7c9c63e239856bee8d033c9e08695166720d7a9c3766d22d19afa2b8c2b7efb750b18b172a1a730 +libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/898b409fbd92540ec7d184b89acd0332 +libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/98898f24ac17486350292f5cc18ecb09059757c5bb18b61903608985cc2105a0172142b9469b27f07a92c1bee6dc22759cdbabc35762f0c1a5411902be76089c +libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/5d827bb566640cd95bdf63a0c893b26f +libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/0ab5a7ff7e647277bf1c019c5e3a7c7018cb2d1798c831c443529a0d1b010c730e442148d0ed943920b5592d1718b27f6493d7d3bac250c76d5a733a1f91c150 +libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/87df505a58117741ac66c3031a25c355 +libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/2cd8ab5c7c846ec8c8a1f35bce7cfa4fec12a349418e0cae88ee12262190d73b24926bcd1027dfbf7b961cb417d50edba3d2831949af3738b9c3dc2bb63036e8 +libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/a6714ae1f6cf77ddccac7fae3095ff16 +libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/3de3d48754e9c5f5ea50a005570963c175e87c83202c4924b41422d279194379076c4c42c8c59cd7a8257181fddbf0166658187474f409cc368f76e97994672e +libLLVM_assert.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/f573ad0488fe0560393fe8fb04d18a65 +libLLVM_assert.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/e8645df8a29f7e2d875839604ab7bd7f23d5118efd61838f3ce2f45aa784c0a6d11bdb0c9010d864c0f071c1fde1a9d5d868a59da8077d036cf3673452506d86 +libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/895c1fced30f8d6608b2741cb6fb6a01 +libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/1b7aefadaf9ec753f8579def68d0a21e45c53c98b86654f0f6c65612b4b1d6fd4721b852015ca2d8b4783c79cbdfbe11d139cac3fa49424c18499bf6b86fcf68 +libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/ccaeb2297dbc77f3f43b45ba8668e684 +libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/54691ed3a5169b945428efc3846b09e4e6d9d57fdc2c2cdbfe0f9839aca76471e6d0dd34f7adefa290290d9aabcc9c290808213e380931ba4c0d15c6b6140b62 +libLLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/3f1040e2f4d169b7218ac0e4029dc598 +libLLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/bcf9b831a95139e594a3ffdb07a9d63bcb51a53ab537615dd18c23e6da53dba6c1f60cca02b234ab99714c23b78ac0a2296d4d214347ffb95fabf09ead8f8e11 +libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/335c2df4b91c55abf929d063068f66b8 +libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/25bcbf83eb201e9e7e2dd93d2ddee9ca0d9fbcd5bf29b2b0b24ffc93421edaf219657e72fff904aa388d7b29f6e10adf224a17bc0fa4831687b301f238f01dee +libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/f90354ebedc8aa28cb0951427701e56b +libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/2bfffacbce7b5dd60313bf538440f9d5f8c7c44318d762a802a620e98da198bf3498b41fb772b519dea17b18efc5fa667a67c4981c91767886c544f62fe41759 +libLLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/5950047408876870ccf870800f365a1f +libLLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/871e067c84bf85b83cdbdff4abccb55d9438216332ca80a56c4db12d29e74b53d88de78f5618f64a32d56f7832697c6f3ee38eeabcf706f12fa058e5ce4c6704 +libLLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/094b76a377eded3e1b17b43abfde1932 +libLLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/0e632662bf268287cf3907e23ccdf4acb535c5215a188abc729d91feea68bc4e704f2bb083695018332fd5b4e0bdbf443069de0c0935a76a49aa02b94e939056 +libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/b562fe4058de0edb2b60facf35781242 +libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/c48a99071cd2ba317e9a1be3c3198eb7e655a072891ab2eed125c940002c7da951dc33bb14ff014b64fcc2eb8fe97caca3bf64bb3701ef3fe8bf2e0f2986a9e4 +libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/273b2202f93761ac464641f88fad7059 +libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/2963a2e35874726ebdf246a32814e0f5354eb5d2f62ec3f303924ab67d52b59e9bd73d03530b6a292b93e9bc3421ed9168a02aab4d6e6ff1cf25411cd03c7bb8 +libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/19e8437b5e99aed82703aeed8bb1755b +libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/745c5cbe14f05ebb422853d1d45c841b5bc5664d0199c5a37d677e992d97e3072c0604b337f27a04d6388fbb355b9347eca7a9d642e75121d461823fbceef999 +libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/576c2646143733f19d558dc05acf3d6a +libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/79e2ff48341a8542b4ef017dd4b2566821beff06c95df40701c2f3344a3948b7595cfb2cfc082eca76f7fd77463204590e58073ba87ff59b4b0a8c9df34b637c +libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a14d1d1e6b45fb2cf533417c0b81a8fb +libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/2fe855985bd2b88beb35ecabae424f70781ce61aaf6314cc19da4b7bceea5b1dd1de4df2b893f5b8844bcb3794805bf9dd5e5d1acf61bf29c4d7912150101717 +libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/1fe456f1c826dbb0b47d74ad855ef459 +libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/583f794fb40d8216cd21133d0606591e7e2f0497d991dd449aa7101bbfd48608e63934940fb94df751ad782ba189b2549d5be5e1d74b26f90ecc8effc948d123 +libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/2860de0825c3a5bcfd809f45744562cb +libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e959f793f15b3181bea02cac927caf4ec242cef1a72ea3eb9363dce651549c5faae3f576b1a39980571279719115d89252d703c718a2e73a50125ac82a3a4cc4 +libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c5de837cfd59f5baf08f0661cba2f667 +libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/68026ea3a3e77f91430e375645b1415c20e2d9b05c0a81b83b859759577295b17883c74eed97dc3df91a167e136f68577af2c978352b990f7f4e517df0b0bc30 +libLLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/b2348a8a03bc79d8c65689529f7a4516 +libLLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/92bb809cf50eda52cb3dd1b37ad221e930be0a05cf91cda567f25936c62f069ee05719fbf959876df45ef0270cb13668ceed983608d897c17dfdd57dab7fef55 +libLLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/acd3ff22681f11a0a5b254f7a55c6fb3 +libLLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/dddf6ae0eca7b1d275582920b115808fc8c22bf29035c0e0d4263c88a45cf7818eb96e8ec2ef482e3d293110a38d790ab0733e469944c5fa4b0441c5c9400c9f +libLLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/2a3921afb578c5fa25c1c6ddab97466f +libLLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/4ed9bcc03b5a45b9297375fffbaae58052834d278f17a90923d8e296f2d53c88c1c45e37473f53eae99cf3a8f7cdf829a5a98a99d20647db76784acaf44e7a11 +libLLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/97573e2ef4aedf50448e23d442c105de +libLLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/5654b86df97e7ef03c3543dfd3f5b3b60dc0906e7963bb758825c99eaff0f43a1edb2c6b8c6969f9cedf2f68833d18b20cc708452b628999cf7ae40438f575e5 +libLLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/2f57354ddae4d50ec4abce30d71f12fd +libLLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/29b8af9bc5188ec49e61fa413215c84209102137c9ba0325e598abac52c43b3cace43fc80971b96a447ab0393b883e25d8e489e865a1ebbd4913a76ff66b0a80 +libLLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/ed9cf691b651ed59e731f57545369086 +libLLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/926f9059283becfeef3fccd319229c09c11dde86f718a9610d204621225a1e09b88a9fb23d9ce2c4186133b1b71eb611f52571e63ae570bb3e55a7803949f202 +libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/0c9e9ce8bb846fee0e8e8bf5ee7cf3bf +libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d804d538406b9aa0ab1b28993c0239d40dbf73267f68b5b195ddf96ba6477b4040764333c5fa1ce44b8010d9b2ecfc17dd9ac1bc00439e0c6a36488a1d925e9d +libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/d824e078349d3ae53fa4c6b5c2704dbe +libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/f9f22868335ce24c40663df2a87ab98c377b666905238fe15023d5a1e2446ecf5d12f88ad2e7268a858058aa9113f65cd3f02812715e7251f092a1e6767e3775 +libLLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/6faa07677a8d3b7c38eeadeeca0229e4 +libLLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/e93a6ea6ff3221b54014c684134bc35b1aded66775453c5ba0657a6e03e046eabcea435fc7db3a90a59cfbd6167bd27405c9c997fd2993e2faac164042973495 +libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/9d8b84a79a020c3b5bd118b340ca6417 +libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/824bd9ee3246cfb08cb065c3e8428ee9a1bd8907df672b3e2a65a23efda0765d9dcfc1cb10d12ac3a118d946dc29dce682f7d4cfdcea7bf4be5b37ab970515fe +libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/bb8a73c93efe36baa8fe6537b1dba82c +libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/81e69ffdf73ad6f14d99b496aec236c9e83684862415cc86d07d321716f8da590b27966b6ac28ebf62fe7acaae6fa4fb192ee76171a8b140dfed9e49fce2b21d +libLLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/dfb5e7eb0246f10e1a8a49d99c8e9145 +libLLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/645f79be4e7bbc67dc2bdb503e2ad41cf9e135b9e67ad07b8e33df0982917c4103dc0d70bc6305b313e5ba555af8c8f893af1f220720e6a0a1cc4faa545a4157 +libLLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/87f3f0707a0a2a2dbbf119000dc2621e +libLLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/9f23e1f7f097beb6066234fb854545754b6e5938c2092ef282cafeea3fae4903dbdc2e39e52030130e8137ea223367b1ed05557f1d08dd026c9e5c0c5db0b0af +libLLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/23d639edb45276d5b705122f180265b7 +libLLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/7b1d8d70a8718af421f86db049cd6264717dbe9cdd601ac317ae1c93323a790d1e4b7288f558d7e9b4509510132a166210ba1bf8c06652027d685f0ca05cea62 +libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/f61342c9ca2b75f5992680b3c748162d +libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/aae8a9c5b9d468b3a615e91bd411e2ed044684b10fbec7de5fcf4a469b6f18fb71c62b377c3b941e277a1f492d331ab4577d8814adfb29a12b25e8b7bd073bf0 +libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/173b0fafa2529b8b4f91e4aa731bb579 +libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/b74876bd713e319762fd02e6b13dac0bae72157329ce928eb8044105ba6b005a24e36d618cbb4fa59725ddef0bcc0dc64b24a4169d1ae76424665d5869ef63d8 llvm-11.0.0.src.tar.xz/md5/85844102335b2e01b3c64b6734fb56f2 llvm-11.0.0.src.tar.xz/sha512/b3e92091ac48772edc0c30801218ce646ef374e1968baab91df9005f58e11c3ce149b2c4c655c7001f8554fd337caa02c08783bc736153bf58f35fe008e624a4 +LLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/dabe6f51ae4836191c3bffb3c13ac152 +LLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/251581327d59efa6a218f6923a1303fa45d71ac192c9602f9fb675b0140356b163319e98728f872616472a72c5edb0f5bbf72e00a440cbb208ee30264d507ed0 +LLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/7914dca0f3d1cdd4ea3ffa684c5da2e2 +LLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/3fcf719a85b6f6d28c53fa0348099953673499544a421fe60a3424b6bd022c1bea1fe57289a502069c31928eceaf6163ece1843cabeb3d1d4f497b1a37771185 +LLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/6a12e330fca6a5dd6323aa0b2fc79def +LLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/4ff85dcafcf00a8a903b855cbe1d55b04c56b939e7c7952dbd3c03a38edfe6e1ce97ba4d721e87d97d83c5e23771ddce4a1f21785a3c11acbaebded997a7cc33 +LLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/74aff1550da6780325b5b511524bc44b +LLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/f88b785ef394e75b7b0d98c0f590a1966d9d4e13e6db38459af84ac8a99121312e5c649c2a85ed0414ff946c7812919909f79babe6f045fe986b31cb48d7f13b +LLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/8109e6d08f4c0e81e301e2efe368ef88 +LLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/e59c42daa2d4fb17fe8036108d34d37f9df890eb0f8e9c0a216602f601edf164a0ee4d74b8bb85773435a3f901b08c9e4563f9fc9fe6104221f97adb40031b0d +LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/c15c20c86f35252e8f952f268976fada +LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/82afc8222a34cde051399ade2c187988c45fdfec86c1052611eec9a0374463e8ce156b336a0b82091b8c1f811fce01d0dcd0ae29a97c4cb5d6a513ffbca54a42 +LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/d6c1455fd8ac1d9605bc1c48614880ee +LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/00a060d3f130fbfcefab34af50f2de72188cdaf54a2bc9dc90ebde2c685054a3763e86de83ae6872a959d1f5a915686a380cf171b2bc8721779ed000b606aa7c +LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/5f841ebbe61e126e1ba1d92faef604d2 +LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/8b7643ec31aaf8a66c52db6d4489f56496a5cacfc725bcb36ca85b90e6b167e229282b4356c2c9ac7c4a5d5e533144ff7d09f7f653976aba74c8e8144db069e3 +LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/d6b02c3c02ff21705110facf68fb48f6 +LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/0283271705c46fe6ecf6943b7ef824beb8f34ddcd3c6c395f5ad67043c04119a00fc5ef6ed1ab0b3416ff604b9c2a68f8df48abe3b998233e56d8f17ebc1de45 +LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/b5e6936d7953b4032cf9b61779d3bffc +LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/3e90c7c81580f18a3e9cbc09b384215424c7b4e23cb0d012a6ac445ddfa71bbae725a92d9c11be0c2b332f66449dd8e9fbc0a63b9bedf5904190d32eae8b9d3a +LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/9bd755b395be340f32f89b9276e5a4c4 +LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f8d3f98cb21a990b317728eefa33b0e0d5407f3bef2000013c6bc2c384d78cf5419f907a62a27b14c60e8b7666b86c1e012297bed9960bb2c0f737e101ca269b +LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/076b24fc6b2777bda89add6239bd47d0 +LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/fe4df75f654c0847e62a1340a7933c40990151ee2245759936eab996db157cb61457fd90ac57381b01b2044dacb50c4b7502ceb42cd7c176445b020f128be6e7 +LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/8a21cc45168ac7c506a95d4854237be1 +LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/44c3e7c5e2c3b521f69d99a1d7e3246e45074d66bcd0b4bee5dd4d15a83e9fa602f0ce6c7a76a957df53205f4a7906cc7fa316078b064d4cf02550921dca3147 +LLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/4c838d5ad65102afa9162a00f888bee6 +LLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/cf65126d3d8c399476d84e98e6050d5a5481ffa745e931196c7663a72b40818918e64bc4aac584ab11e1ff15019286345e6e7ae460b0c4455da004d54f97fff2 +LLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/8f245351d8e4a657752ca5d2f1f4a8d9 +LLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/2d9b8c9932c5bd87ca4ab6b2937651e015a03629360a1d7368aa49a073315639e3794428d8986fbcc38a2f04746201032a59d002eb31fce7552458de8418ca20 +LLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/9634c9ec4d8d72fdc89a6690fc3aed6a +LLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/44f7fe90cc7a158ff2dd63321076223c010343bcda1f773db41deee9a2d12f49efca3fcf00f272cf10249b43ab9dfe302f0c0a897e26176984bbbc3f507304f0 +LLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/f0d4e03fcca7a034db1e60028a54f4ab +LLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/409cbe1e99caa320c9acfbb948550e058e96589363f7aceae5a17d88ee0d62f0e5e0f4396b7f2b0508f29568ea9c42f49e5df5f024115238651b6fb5709885ec +LLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/c3fe268d3bf3bf7ef2afcf9a387f420f +LLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/cfeaf2ed294780eb4e008bae10202e77abcbae564eee2c53566320bce58305c20a6d7bbae63e37ce2b15bb177352e1f623434329319a7a6594110cc8a297c9ec +LLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/6ee4ee2ed357585797fb95e6e5dff3b6 +LLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/cf5ce880b930fc2ce0d28597515cfbc203f20555398f5e79341e2be4e643da757a13aaf1b67ca16936a79c7c708194defdbfa8c011213363dadbd49a3f035554 +LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/1b86cd0064df4872f45256702e799b06 +LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/062f49235357d5c4cda23050e13c5c0f3de643a8c4137f8e9b9cdae7a3a9ab31c7421e44ba5bab5902b92982c6a135c6a069583caf0409bc4960d9e68513d954 +LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/467c91cdb61c35e2f769701393a27a3a +LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/7bbd1f497b6b8edba056540084f09d367bcb245be8fe9fd6b6455d3847f77a61ca1c66cd9465a84a89d37e832f36a046ec6b9d815f8b511fddf952cdf43ccf96 +LLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/06ec920a21a49168fe2e6315bf8e05ae +LLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/d8138dacc7dcd4e3cfb91bc09ec7cb4d446a94c3b056d685da4e3816d6b77c84937aa2a54417a6646738ea721ff90ad7b79989fc9e79ad55b5944618591d0a23 +LLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/af22cb0dcf36d9a15b9d287dc090b09f +LLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/befa06d0e2e455dc7b046b083ebf9b4a10771f2916f639ecd135f2c8628f0231a2ffeef5c6f777212363c435aefee05fcf61e93bf4eb0f8603569785121b1557 +LLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/98d1f187020c958dbfc5be7f56810b3d +LLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/55767a59047ef34832b08aa46765b819d53efc344b64d3096ff37f9d123d78e175c5e2b55cb49367732325a4c3da69b78e322f437f5bbc0eb01eab7b47b9a89d +LLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/473515270f060d2f6c457dac599eb979 +LLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/b00071383cf6b7b6e4bfdc24be044b67aafec149dfab537275146b82d6de5fc3eecc2d5c3efc59de51caae83642db48b7694ad2f5ddd2e4c3a40257a56e511d0 +LLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/502277dd5f359701e82cda7cc9c2e842 +LLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/58f140aa55946e288cf63bd6872489a5de3aac5a9af49c37e1d1ce451570f2de32a178ce431a948279170a6ad4ef251f78b72608b76fe2b72f6e2c6bc8e92187 +LLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/5b4feb145bc572b52b731bd8c3811e47 +LLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/7defb7aefca9869926c6c54e5f51c8c8facc24d4aaed6dc27c6d9a8446fd0122ef5117de1b221011569fba033f0e7574de81a573f37277a8ef5235f8eeb539fb +LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/f5cfcbcc59a8b053526d4abaf24c41eb +LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/7803b0c745c804b8fe3c66f997da59501bdf64f3ebe4606261807f5636a846e548ea3c3c265643fde4bc02573d40aeb14107a57cebb68976f02f3ad56fcabf92 +LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/2634b59f0520f010ffcf51928d7db7c1 +LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/1f16b61e1cbe64892c60597fd938a52d4e239a4b98834fb1e6f27a1d28df8b1278604f057798ef8e6f545bbc23b1c2dc85e3300e6905f2c1bbf2fdd0fe46b0e7 diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index bca396b576cce..5d77c213c39b7 100644 --- a/stdlib/libLLVM_jll/Project.toml +++ b/stdlib/libLLVM_jll/Project.toml @@ -1,6 +1,6 @@ name = "libLLVM_jll" uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "11.0.0+5" +version = "11.0.0+7" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 6e9309d02b54a37ca82b6af1a3eb509aae16f185 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 12 Jan 2021 18:33:32 -0500 Subject: [PATCH 077/239] use BINARYBUILDER_LLVM_ASSERTS for downloading assert builds --- contrib/refresh_checksums.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 38db1549e13e9..3fddb7a66423f 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -39,7 +39,7 @@ endef # If $(2) == `src`, this will generate a `USE_BINARYBUILDER_FOO=0` make flag # It will also generate a `FOO_BB_TRIPLET=$(2)` make flag. define make_flags -USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) LLVM_ASSERTIONS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 +USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) BINARYBUILDER_LLVM_ASSERTS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 endef # checksum_bb_dep takes in (name, triplet), and generates a `checksum-$(1)-$(2)` target. From 95d03f9a4c7b062016090d833a29b7824a152ab8 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 12 Jan 2021 18:35:20 -0500 Subject: [PATCH 078/239] inference: correction to ifelse Conditional lattice Rename typeassert_type_instance to tjoin (aka typeintersect). Also, since the ifelse value here might not be in the regular type lattice, we need to use the extended lattice for this evaluation. --- base/compiler/abstractinterpretation.jl | 36 +++++++++++++--------- base/compiler/tfuncs.jl | 39 +----------------------- base/compiler/typelimits.jl | 40 +++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 52 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 5a83fd9870ec1..41403861499d0 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -783,20 +783,28 @@ end function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::Union{Nothing,Vector{Any}}, argtypes::Vector{Any}, sv::InferenceState, max_methods::Int) la = length(argtypes) - if f === ifelse && fargs isa Vector{Any} && la == 4 && argtypes[2] isa Conditional - # try to simulate this as a real conditional (`cnd ? x : y`), so that the penalty for using `ifelse` instead isn't too high - cnd = argtypes[2]::Conditional - tx = argtypes[3] - ty = argtypes[4] - a = ssa_def_slot(fargs[3], sv) - b = ssa_def_slot(fargs[4], sv) - if isa(a, Slot) && slot_id(cnd.var) == slot_id(a) - tx = typeintersect(tx, cnd.vtype) - end - if isa(b, Slot) && slot_id(cnd.var) == slot_id(b) - ty = typeintersect(ty, cnd.elsetype) - end - return tmerge(tx, ty) + if f === ifelse && fargs isa Vector{Any} && la == 4 + cnd = argtypes[2] + if isa(cnd, Conditional) + newcnd = widenconditional(cnd) + if isa(newcnd, Const) + # if `cnd` is constant, we should just respect its constantness to keep inference accuracy + return newcnd.val ? tx : ty + else + # try to simulate this as a real conditional (`cnd ? x : y`), so that the penalty for using `ifelse` instead isn't too high + tx = argtypes[3] + ty = argtypes[4] + a = ssa_def_slot(fargs[3], sv) + b = ssa_def_slot(fargs[4], sv) + if isa(a, Slot) && slot_id(cnd.var) == slot_id(a) + tx = (cnd.vtype ⊑ tx ? cnd.vtype : tmeet(tx, widenconst(cnd.vtype))) + end + if isa(b, Slot) && slot_id(cnd.var) == slot_id(b) + ty = (cnd.elsetype ⊑ ty ? cnd.elsetype : tmeet(ty, widenconst(cnd.elsetype))) + end + return tmerge(tx, ty) + end + end end rt = builtin_tfunction(interp, f, argtypes[2:end], sv) if f === getfield && isa(fargs, Vector{Any}) && la == 3 && isa(argtypes[3], Const) && isa(argtypes[3].val, Int) && argtypes[2] ⊑ Tuple diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index e4735596a8d8a..80a01c0a54bd4 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -543,47 +543,10 @@ function typeof_tfunc(@nospecialize(t)) end add_tfunc(typeof, 1, 1, typeof_tfunc, 0) -function typeassert_type_instance(@nospecialize(v), @nospecialize(t)) - if isa(v, Const) - if !has_free_typevars(t) && !isa(v.val, t) - return Bottom - end - return v - elseif isa(v, PartialStruct) - has_free_typevars(t) && return v - widev = widenconst(v) - if widev <: t - return v - end - ti = typeintersect(widev, t) - if ti === Bottom - return Bottom - end - @assert widev <: Tuple - new_fields = Vector{Any}(undef, length(v.fields)) - for i = 1:length(new_fields) - if isa(v.fields[i], Core.TypeofVararg) - new_fields[i] = v.fields[i] - else - new_fields[i] = typeassert_type_instance(v.fields[i], getfield_tfunc(t, Const(i))) - if new_fields[i] === Bottom - return Bottom - end - end - end - return tuple_tfunc(new_fields) - elseif isa(v, Conditional) - if !(Bool <: t) - return Bottom - end - return v - end - return typeintersect(widenconst(v), t) -end function typeassert_tfunc(@nospecialize(v), @nospecialize(t)) t = instanceof_tfunc(t)[1] t === Any && return v - return typeassert_type_instance(v, t) + return tmeet(v, t) end add_tfunc(typeassert, 2, 2, typeassert_tfunc, 4) diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index a7c04ceff40ae..99b8714e83216 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -524,3 +524,43 @@ function tuplemerge(a::DataType, b::DataType) end return Tuple{p...} end + +# compute typeintersect over the extended inference lattice +# where v is in the extended lattice, and t is a Type +function tmeet(@nospecialize(v), @nospecialize(t)) + if isa(v, Const) + if !has_free_typevars(t) && !isa(v.val, t) + return Bottom + end + return v + elseif isa(v, PartialStruct) + has_free_typevars(t) && return v + widev = widenconst(v) + if widev <: t + return v + end + ti = typeintersect(widev, t) + if ti === Bottom + return Bottom + end + @assert widev <: Tuple + new_fields = Vector{Any}(undef, length(v.fields)) + for i = 1:length(new_fields) + if isa(v.fields[i], Core.TypeofVararg) + new_fields[i] = v.fields[i] + else + new_fields[i] = tmeet(v.fields[i], widenconst(getfield_tfunc(t, Const(i)))) + if new_fields[i] === Bottom + return Bottom + end + end + end + return tuple_tfunc(new_fields) + elseif isa(v, Conditional) + if !(Bool <: t) + return Bottom + end + return v + end + return typeintersect(widenconst(v), t) +end From 886f89ce2eca668e54ce5bcb7364a00127760db8 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 13 Jan 2021 01:22:52 -0600 Subject: [PATCH 079/239] Add some costly precompiles (#39179) These are things that have shown up in analysis of various packages by SnoopCompile. Either they are particularly costly, or in the case of `Test`, just plain annoying to have them show up again and again. --- contrib/generate_precompile.jl | 46 +++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 4cb95a44a8e44..1572e81aa2b75 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -19,24 +19,36 @@ hardcoded_precompile_statements = """ # used by Revise.jl @assert precompile(Tuple{typeof(Base.parse_cache_header), String}) @assert precompile(Base.read_dependency_src, (String, String)) -@assert precompile(Base.CoreLogging.current_logger_for_env, (Base.CoreLogging.LogLevel, String, Module)) # used by Requires.jl @assert precompile(Tuple{typeof(get!), Type{Vector{Function}}, Dict{Base.PkgId,Vector{Function}}, Base.PkgId}) @assert precompile(Tuple{typeof(haskey), Dict{Base.PkgId,Vector{Function}}, Base.PkgId}) @assert precompile(Tuple{typeof(delete!), Dict{Base.PkgId,Vector{Function}}, Base.PkgId}) @assert precompile(Tuple{typeof(push!), Vector{Function}, Function}) + # miscellaneous @assert precompile(Tuple{typeof(Base.require), Base.PkgId}) @assert precompile(Tuple{typeof(Base.recursive_prefs_merge), Base.Dict{String, Any}}) @assert precompile(Tuple{typeof(isassigned), Core.SimpleVector, Int}) @assert precompile(Tuple{typeof(getindex), Core.SimpleVector, Int}) @assert precompile(Tuple{typeof(Base.Experimental.register_error_hint), Any, Type}) +@assert precompile(Tuple{typeof(Base.display_error), MethodError, Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}}) +@assert precompile(Tuple{typeof(Base.display_error), ErrorException}) +@assert precompile(Tuple{typeof(Base.display_error), BoundsError}) +@assert precompile(Tuple{Core.kwftype(typeof(Type)), NamedTuple{(:sizehint,), Tuple{Int64}}, Type{IOBuffer}}) +@assert precompile(Base.CoreLogging.current_logger_for_env, (Base.CoreLogging.LogLevel, String, Module)) +@assert precompile(Base.CoreLogging.current_logger_for_env, (Base.CoreLogging.LogLevel, Symbol, Module)) """ +for T in (Float16, Float32, Float64), IO in (IOBuffer, IOContext{IOBuffer}, Base.TTY, IOContext{Base.TTY}) + global hardcoded_precompile_statements + hardcoded_precompile_statements *= "@assert precompile(Tuple{typeof(show), $IO, $T})\n" +end + repl_script = """ 2+2 print("") +printstyled("a", "b") display([1]) display([1 2; 3 4]) @time 1+1 @@ -174,8 +186,40 @@ if Test !== nothing hardcoded_precompile_statements *= """ @assert precompile(Tuple{typeof(Test.do_test), Test.ExecutionResult, Any}) @assert precompile(Tuple{typeof(Test.testset_beginend), Tuple{String, Expr}, Expr, LineNumberNode}) + @assert precompile(Tuple{Type{Test.DefaultTestSet}, String}) + @assert precompile(Tuple{Type{Test.DefaultTestSet}, AbstractString}) + @assert precompile(Tuple{Core.kwftype(Type{Test.DefaultTestSet}), Any, Type{Test.DefaultTestSet}, AbstractString}) @assert precompile(Tuple{typeof(Test.finish), Test.DefaultTestSet}) @assert precompile(Tuple{typeof(Test.eval_test), Expr, Expr, LineNumberNode, Bool}) + @assert precompile(Tuple{typeof(Test._inferred), Expr, Module}) + @assert precompile(Tuple{typeof(Test.push_testset), Test.DefaultTestSet}) + @assert precompile(Tuple{typeof(Test.get_alignment), Test.DefaultTestSet, Int}) + @assert precompile(Tuple{typeof(Test.get_test_result), Any, Any}) + @assert precompile(Tuple{typeof(Test.do_test_throws), Test.ExecutionResult, Any, Any}) + @assert precompile(Tuple{typeof(Test.print_counts), Test.DefaultTestSet, Int, Int, Int, Int, Int, Int, Int}) + @assert precompile(Tuple{typeof(Test._check_testset), Type, Expr}) + @assert precompile(Tuple{typeof(Test.test_expr!), Any, Any}) + @assert precompile(Tuple{typeof(Test.test_expr!), Any, Any, Vararg{Any, 100}}) + @assert precompile(Tuple{typeof(Test.pop_testset)}) + @assert precompile(Tuple{typeof(Test.match_logs), Function, Tuple{Symbol, Regex}}) + @assert precompile(Tuple{typeof(Test.match_logs), Function, Tuple{String, Regex}}) + @assert precompile(Tuple{typeof(Base.CoreLogging.shouldlog), Test.TestLogger, Base.CoreLogging.LogLevel, Module, Symbol, Symbol}) + @assert precompile(Tuple{typeof(Base.CoreLogging.handle_message), Test.TestLogger, Base.CoreLogging.LogLevel, String, Module, Symbol, Symbol, String, Int}) + @assert precompile(Tuple{typeof(Core.kwfunc(Base.CoreLogging.handle_message)), typeof((exception=nothing,)), typeof(Base.CoreLogging.handle_message), Test.TestLogger, Base.CoreLogging.LogLevel, String, Module, Symbol, Symbol, String, Int}) + @assert precompile(Tuple{typeof(Test.detect_ambiguities), Any}) + @assert precompile(Tuple{typeof(Test.collect_test_logs), Function}) + @assert precompile(Tuple{typeof(Test.do_broken_test), Test.ExecutionResult, Any}) + @assert precompile(Tuple{typeof(Test.record), Test.DefaultTestSet, Union{Test.Error, Test.Fail}}) + @assert precompile(Tuple{typeof(Test.filter_errors), Test.DefaultTestSet}) + """ +end + +Profile = get(Base.loaded_modules, + Base.PkgId(Base.UUID("9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"), "Profile"), + nothing) +if Profile !== nothing + hardcoded_precompile_statements *= """ + @assert precompile(Tuple{typeof(Profile.tree!), Profile.StackFrameTree{UInt64}, Vector{UInt64}, Dict{UInt64, Vector{Base.StackTraces.StackFrame}}, Bool, Symbol}) """ end From 89ec8515aa87f596451ea891b92cc6460d100ead Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 13 Jan 2021 11:56:42 +0100 Subject: [PATCH 080/239] Fix a compiler warning --- src/gf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gf.c b/src/gf.c index 09ce60df23f13..343d36fffa1a2 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1030,7 +1030,7 @@ static jl_method_instance_t *cache_method( // In most cases `!jl_isa_compileable_sig(tt, definition))`, // although for some cases, (notably Varargs) // we might choose a replacement type that's preferable but not strictly better - cache_with_orig = !jl_subtype(compilationsig, definition->sig); + cache_with_orig = !jl_subtype((jl_value_t*)compilationsig, definition->sig); } // TODO: maybe assert(jl_isa_compileable_sig(compilationsig, definition)); newmeth = jl_specializations_get_linfo(definition, (jl_value_t*)compilationsig, sparams); From f9c49873009623d0813dc8728b2072660816dec4 Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Fri, 11 Dec 2020 21:48:28 -0500 Subject: [PATCH 081/239] add getindex method and tests for NamedTuple --- base/namedtuple.jl | 11 ++++++++--- test/namedtuple.jl | 7 +++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/base/namedtuple.jl b/base/namedtuple.jl index fc3701f45ea4c..0935db308b469 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -9,9 +9,9 @@ tuple-like collection of values, where each entry has a unique name, represented can be modified in place after construction. Accessing the value associated with a name in a named tuple can be done using field -access syntax, e.g. `x.a`, or using [`getindex`](@ref), e.g. `x[:a]`. A tuple of the -names can be obtained using [`keys`](@ref), and a tuple of the values can be obtained -using [`values`](@ref). +access syntax, e.g. `x.a`, or using [`getindex`](@ref), e.g. `x[:a]` or `x[(:a, :b)]`. +A tuple of the names can be obtained using [`keys`](@ref), and a tuple of the values +can be obtained using [`values`](@ref). !!! note Iteration over `NamedTuple`s produces the *values* without the names. (See example @@ -30,6 +30,9 @@ julia> x.a julia> x[:a] 1 +julia> nt[(:a,)] +(a = 1,) + julia> keys(x) (:a, :b) @@ -116,6 +119,8 @@ firstindex(t::NamedTuple) = 1 lastindex(t::NamedTuple) = nfields(t) getindex(t::NamedTuple, i::Int) = getfield(t, i) getindex(t::NamedTuple, i::Symbol) = getfield(t, i) +@inline getindex(t::NamedTuple, i::Tuple{Vararg{Symbol}}) = NamedTuple{s}(nt) +#? Is this ok too ?# @inline getindex(t::NamedTuple, i::AbstractVector{Symbol}) = NamedTuple{Tuple(s)}(nt) indexed_iterate(t::NamedTuple, i::Int, state=1) = (getfield(t, i), i+1) isempty(::NamedTuple{()}) = true isempty(::NamedTuple) = false diff --git a/test/namedtuple.jl b/test/namedtuple.jl index 5a248e1110ceb..4703d338cf104 100644 --- a/test/namedtuple.jl +++ b/test/namedtuple.jl @@ -21,6 +21,13 @@ @test (a=3,)[:a] == 3 @test (x=4, y=5, z=6).y == 5 @test (x=4, y=5, z=6).z == 6 +@test (x=4, y=5, z=6)[(:x, :y)] == (x=4, y=5) +@test (x=4, y=5, z=6)[(:x,)] == (x=4,) +# If the following are included, is it worth putting in 1 line with above, eg: +# @test (x=4, y=5, z=6)[(:x, :y)] == (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) +# or keep separate, eg: +# @test (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) +# @test (x=4, y=5, z=6)[[:x]] == (x=4,) @test_throws ErrorException (x=4, y=5, z=6).a @test_throws BoundsError (a=2,)[0] @test_throws BoundsError (a=2,)[2] From adb158699afd7c62723bc939ac66f0420eb05666 Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Mon, 14 Dec 2020 14:53:30 -0500 Subject: [PATCH 082/239] fix stupid typos --- base/namedtuple.jl | 4 ++-- test/namedtuple.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/namedtuple.jl b/base/namedtuple.jl index 0935db308b469..ae72f237d6da9 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -119,8 +119,8 @@ firstindex(t::NamedTuple) = 1 lastindex(t::NamedTuple) = nfields(t) getindex(t::NamedTuple, i::Int) = getfield(t, i) getindex(t::NamedTuple, i::Symbol) = getfield(t, i) -@inline getindex(t::NamedTuple, i::Tuple{Vararg{Symbol}}) = NamedTuple{s}(nt) -#? Is this ok too ?# @inline getindex(t::NamedTuple, i::AbstractVector{Symbol}) = NamedTuple{Tuple(s)}(nt) +@inline getindex(t::NamedTuple, idxs::Tuple{Vararg{Symbol}}) = NamedTuple{idxs}(t) +@inline getindex(t::NamedTuple, idxs::AbstractVector{Symbol}) = NamedTuple{Tuple(idxs)}(t) indexed_iterate(t::NamedTuple, i::Int, state=1) = (getfield(t, i), i+1) isempty(::NamedTuple{()}) = true isempty(::NamedTuple) = false diff --git a/test/namedtuple.jl b/test/namedtuple.jl index 4703d338cf104..ef7aa6eadf763 100644 --- a/test/namedtuple.jl +++ b/test/namedtuple.jl @@ -26,8 +26,8 @@ # If the following are included, is it worth putting in 1 line with above, eg: # @test (x=4, y=5, z=6)[(:x, :y)] == (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) # or keep separate, eg: -# @test (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) -# @test (x=4, y=5, z=6)[[:x]] == (x=4,) +@test (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) +@test (x=4, y=5, z=6)[[:x]] == (x=4,) @test_throws ErrorException (x=4, y=5, z=6).a @test_throws BoundsError (a=2,)[0] @test_throws BoundsError (a=2,)[2] From 6978d6817e273bd49b2cf66567f311a61bec0e6f Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Mon, 14 Dec 2020 15:44:21 -0500 Subject: [PATCH 083/239] more stupid typos --- base/namedtuple.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/namedtuple.jl b/base/namedtuple.jl index ae72f237d6da9..92a9d931f33fc 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -30,7 +30,7 @@ julia> x.a julia> x[:a] 1 -julia> nt[(:a,)] +julia> x[(:a,)] (a = 1,) julia> keys(x) From 0539fbb3dcfd8b022e8101118b5b5c268f465996 Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Sun, 27 Dec 2020 13:59:59 -0500 Subject: [PATCH 084/239] test suggestions from jw3126 --- test/namedtuple.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/namedtuple.jl b/test/namedtuple.jl index ef7aa6eadf763..ccf04bdb7d8e0 100644 --- a/test/namedtuple.jl +++ b/test/namedtuple.jl @@ -28,9 +28,16 @@ # or keep separate, eg: @test (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) @test (x=4, y=5, z=6)[[:x]] == (x=4,) +@test (x=4, y=5, z=6)[()] == NamedTuple() +@test NamedTuple()[()] == NamedTuple() @test_throws ErrorException (x=4, y=5, z=6).a @test_throws BoundsError (a=2,)[0] @test_throws BoundsError (a=2,)[2] +@test_throws ErrorException (x=4, y=5, z=6)[(:a,)] +@test_throws ErrorException (x=4, y=5, z=6)[(:x, :a)] +@test_throws ErrorException (x=4, y=5, z=6)[[:a]] +@test_throws ErrorException (x=4, y=5, z=6)[[:x, :a]] +@test_throws ErrorException (x=4, y=5, z=6)[(:x, :x)] @test length(NamedTuple()) == 0 @test length((a=1,)) == 1 From 312faea586f37bae5e8cf3b368e61ede98866f1c Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Wed, 13 Jan 2021 10:41:36 -0500 Subject: [PATCH 085/239] remove comments from tests --- test/namedtuple.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/namedtuple.jl b/test/namedtuple.jl index ccf04bdb7d8e0..128cff5f53731 100644 --- a/test/namedtuple.jl +++ b/test/namedtuple.jl @@ -23,9 +23,6 @@ @test (x=4, y=5, z=6).z == 6 @test (x=4, y=5, z=6)[(:x, :y)] == (x=4, y=5) @test (x=4, y=5, z=6)[(:x,)] == (x=4,) -# If the following are included, is it worth putting in 1 line with above, eg: -# @test (x=4, y=5, z=6)[(:x, :y)] == (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) -# or keep separate, eg: @test (x=4, y=5, z=6)[[:x, :y]] == (x=4, y=5) @test (x=4, y=5, z=6)[[:x]] == (x=4,) @test (x=4, y=5, z=6)[()] == NamedTuple() From 491d9255c94eadc137d5840b2acd1d8bfaee97d1 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 09:45:18 -0600 Subject: [PATCH 086/239] Add libldl to SuiteSparse libs (#39211) --- deps/suitesparse.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/suitesparse.mk b/deps/suitesparse.mk index f4515f6b0a884..eda7a1c21c12d 100644 --- a/deps/suitesparse.mk +++ b/deps/suitesparse.mk @@ -17,7 +17,7 @@ CHOLMOD_CONFIG += -DNPARTITION ifneq ($(USE_BINARYBUILDER_SUITESPARSE), 1) SUITESPARSE_PROJECTS := AMD BTF CAMD CCOLAMD COLAMD CHOLMOD LDL KLU UMFPACK RBio SPQR -SUITESPARSE_LIBS := $(addsuffix .*$(SHLIB_EXT)*,suitesparseconfig amd btf camd ccolamd colamd cholmod klu umfpack rbio spqr) +SUITESPARSE_LIBS := $(addsuffix .*$(SHLIB_EXT)*,suitesparseconfig amd btf camd ccolamd colamd cholmod klu ldl umfpack rbio spqr) SUITE_SPARSE_LIB := $(LDFLAGS) -L"$(abspath $(BUILDDIR))/SuiteSparse-$(SUITESPARSE_VER)/lib" ifeq ($(OS), Darwin) From 7e854054b1a758cb7dcc4a8663131780933386ca Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 09:46:18 -0600 Subject: [PATCH 087/239] Copy libgomp as part of CSL build (#39212) --- deps/csl.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deps/csl.mk b/deps/csl.mk index b25957b9019c5..2858d9919a454 100644 --- a/deps/csl.mk +++ b/deps/csl.mk @@ -44,6 +44,7 @@ $(eval $(call copy_csl,$(call gen_libname,quadmath,0))) $(eval $(call copy_csl,$(call gen_libname,stdc++,6))) $(eval $(call copy_csl,$(call gen_libname,ssp,0))) $(eval $(call copy_csl,$(call gen_libname,atomic,1))) +$(eval $(call copy_csl,$(call gen_libname,gomp,1))) ifeq ($(OS),WINNT) # Windwos has special gcc_s names @@ -73,6 +74,7 @@ clean-csl: -rm -f $(build_shlibdir)/libpthread*$(SHLIB_EXT)* -rm -f $(build_shlibdir)/libwinpthread*$(SHLIB_EXT)* -rm -f $(build_shlibdir)/libatomic*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libgomp*$(SHLIB_EXT)* else $(eval $(call bb-install,csl,CSL,true)) From 468cfe8d6c6a852c8355811dcf37fe3c9c4f0033 Mon Sep 17 00:00:00 2001 From: Kevin Bonham Date: Wed, 13 Jan 2021 12:51:50 -0500 Subject: [PATCH 088/239] add compat notice and NEWS --- NEWS.md | 1 + base/namedtuple.jl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index e4c88c5b25177..61f3eb4fb8867 100644 --- a/NEWS.md +++ b/NEWS.md @@ -45,6 +45,7 @@ Standard library changes * `iseven` and `isodd` functions now support non-`Integer` numeric types ([#38976]). * `escape_string` can now receive a collection of characters in the keyword `keep` that are to be kept as they are. ([#38597]). +* `getindex` can now be used on `NamedTuple`s with multiple values ([#38878]) #### Package Manager diff --git a/base/namedtuple.jl b/base/namedtuple.jl index 92a9d931f33fc..ac38f0b1ec2d4 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -79,6 +79,9 @@ julia> (; t.x) !!! compat "Julia 1.5" Implicit names from identifiers and dot expressions are available as of Julia 1.5. + +!!! compat "Julia 1.7" + Use of `getindex` methods with multiple `Symbol`s is available as of Julia 1.7. """ Core.NamedTuple From c3acba16014b9855e26df1c955f80de5f9a318e9 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 12:53:21 -0600 Subject: [PATCH 089/239] Fix spawn test when env `BAR` is set (#39214) --- test/spawn.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/spawn.jl b/test/spawn.jl index 4f826b05df93d..ddc5aaefee00f 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -713,7 +713,7 @@ end @test strip(String(read(cmd))) == "baz bar" # Test that `addenv()` works properly with `inherit` - withenv("FOO" => "foo") do + withenv("FOO" => "foo", "BAR" => nothing) do cmd = Cmd(`$shcmd -c "echo \$FOO \$BAR"`) @test strip(String(read(cmd))) == "foo" From 492096f45d688b8e161c4a8478c7c55aa85f0b8c Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 12:55:10 -0600 Subject: [PATCH 090/239] MbedTLS source build fixes (#39131) --- deps/mbedtls.mk | 4 ++-- deps/tools/common.mk | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deps/mbedtls.mk b/deps/mbedtls.mk index 494771466ad00..83085ed2d2709 100644 --- a/deps/mbedtls.mk +++ b/deps/mbedtls.mk @@ -24,7 +24,7 @@ $(SRCCACHE)/$(MBEDTLS_SRC)/source-extracted: $(SRCCACHE)/$(MBEDTLS_SRC).tar.gz mkdir -p $(dir $@) && \ $(TAR) -C $(dir $@) --strip-components 1 -xf $< # Force-enable MD4 - sed "s|//#define MBEDTLS_MD4_C|#define MBEDTLS_MD4_C|" -i $(SRCCACHE)/$(MBEDTLS_SRC)/include/mbedtls/config.h + sed -i.org "s|//#define MBEDTLS_MD4_C|#define MBEDTLS_MD4_C|" $(SRCCACHE)/$(MBEDTLS_SRC)/include/mbedtls/config.h touch -c $(SRCCACHE)/$(MBEDTLS_SRC)/CMakeLists.txt # old target echo 1 > $@ @@ -37,7 +37,7 @@ $(SRCCACHE)/$(MBEDTLS_SRC)/mbedtls-cmake-findpy.patch-applied: $(SRCCACHE)/$(MBE # are it will be included at least in their next minor release (2.26.0?). cd $(SRCCACHE)/$(MBEDTLS_SRC) && \ patch -p1 -f < $(SRCDIR)/patches/mbedtls-cmake-findpy.patch - echo 1 > @$ + echo 1 > $@ $(BUILDDIR)/$(MBEDTLS_SRC)/build-configured: \ $(SRCCACHE)/$(MBEDTLS_SRC)/mbedtls-cmake-findpy.patch-applied diff --git a/deps/tools/common.mk b/deps/tools/common.mk index 35effcb75bd96..a2a552830c495 100644 --- a/deps/tools/common.mk +++ b/deps/tools/common.mk @@ -23,6 +23,10 @@ CMAKE_CXX_ARG := $(CXX_ARG) CMAKE_COMMON := -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix) -DCMAKE_PREFIX_PATH=$(build_prefix) CMAKE_COMMON += -DCMAKE_INSTALL_LIBDIR=$(build_libdir) -DCMAKE_INSTALL_BINDIR=$(build_bindir) CMAKE_COMMON += -DLIB_INSTALL_DIR=$(build_shlibdir) +ifeq ($(OS), Darwin) +CMAKE_COMMON += -DCMAKE_MACOSX_RPATH=1 +endif + ifneq ($(VERBOSE), 0) CMAKE_COMMON += -DCMAKE_VERBOSE_MAKEFILE=ON endif From 7a1a3257ac6ed0a0d053a4326618580ada0871ee Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 13 Jan 2021 20:07:21 +0100 Subject: [PATCH 091/239] Remove unused jl_get_ptls_states_wrapper, update comments (#39066) Since jl_get_ptls_states_wrapper is static, it can't be called by outside code. --- src/threading.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/threading.c b/src/threading.c index 764cee355a94b..726b01145d0b1 100644 --- a/src/threading.c +++ b/src/threading.c @@ -142,12 +142,10 @@ jl_get_ptls_states_func jl_get_ptls_states_getter(void) // We use the faster static version in the main executable to replace // the slower version in the shared object. The code in different libraries // or executables, however, have to agree on which version to use. -// The general solution is to add one more indirection in the C entry point -// (see `jl_get_ptls_states_wrapper`). +// The general solution is to add one more indirection in the C entry point. // // When `ifunc` is available, we can use it to trick the linker to use the // real address (`jl_get_ptls_states_static`) directly as the symbol address. -// (see `jl_get_ptls_states_resolve`). // // However, since the detection of the static version in `ifunc` // is not guaranteed to be reliable, we still need to fallback to the wrapper @@ -184,13 +182,6 @@ static jl_ptls_t jl_get_ptls_states_init(void) return cb(); } -static JL_CONST_FUNC jl_ptls_t jl_get_ptls_states_wrapper(void) JL_GLOBALLY_ROOTED JL_NOTSAFEPOINT -{ -#ifndef __clang_analyzer__ - return (*jl_tls_states_cb)(); -#endif -} - JL_DLLEXPORT void jl_set_ptls_states_getter(jl_get_ptls_states_func f) { if (f == jl_tls_states_cb || !f) From 158016547ffd8948779febc642b6e38bcef4508d Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 15:31:33 -0600 Subject: [PATCH 092/239] Remove csl and suitesparse from DEPS_LIBS_STAGED (#39233) --- deps/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps/Makefile b/deps/Makefile index 3d3f79513135b..65d2590b0dc84 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -164,7 +164,10 @@ DEP_LIBS += libwhich endif # unlist targets that have not been converted to use the staged-install -DEP_LIBS_STAGED := $(filter-out suitesparse-wrapper,$(DEP_LIBS)) +DEP_LIBS_STAGED := $(DEP_LIBS) +DEP_LIBS_STAGED := $(filter-out csl,$(DEP_LIBS_STAGED)) +DEP_LIBS_STAGED := $(filter-out suitesparse,$(DEP_LIBS_STAGED)) +DEP_LIBS_STAGED := $(filter-out suitesparse-wrapper,$(DEP_LIBS_STAGED)) ifneq ($(USE_BINARYBUILDER_LIBUNWIND),1) DEP_LIBS_STAGED := $(filter-out osxunwind,$(DEP_LIBS_STAGED)) endif From 748841f1be6d8abee6137d5e8900d60778f40426 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 13 Jan 2021 16:55:21 -0500 Subject: [PATCH 093/239] fix return type for `jl_uncompress_argnames` (#39215) --- base/methodshow.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/methodshow.jl b/base/methodshow.jl index 0e00fd2725722..ccab29cca16f8 100644 --- a/base/methodshow.jl +++ b/base/methodshow.jl @@ -40,7 +40,7 @@ function argtype_decl(env, n, @nospecialize(sig::DataType), i::Int, nargs, isva: end function method_argnames(m::Method) - argnames = ccall(:jl_uncompress_argnames, Vector{Any}, (Any,), m.slot_syms) + argnames = ccall(:jl_uncompress_argnames, Vector{Symbol}, (Any,), m.slot_syms) isempty(argnames) && return argnames return argnames[1:m.nargs] end From d49ece55563a86eeee1edc33dbdef17ffd276488 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Wed, 13 Jan 2021 17:19:04 -0600 Subject: [PATCH 094/239] Add distclean-csl rule (#39234) --- deps/csl.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/csl.mk b/deps/csl.mk index 2858d9919a454..095d4ceec4a1e 100644 --- a/deps/csl.mk +++ b/deps/csl.mk @@ -75,6 +75,7 @@ clean-csl: -rm -f $(build_shlibdir)/libwinpthread*$(SHLIB_EXT)* -rm -f $(build_shlibdir)/libatomic*$(SHLIB_EXT)* -rm -f $(build_shlibdir)/libgomp*$(SHLIB_EXT)* +distclean-csl: clean-csl else $(eval $(call bb-install,csl,CSL,true)) From 006f90dad21783c7cad37f5e41f8c8da11040217 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Thu, 14 Jan 2021 09:40:15 +0100 Subject: [PATCH 095/239] allow running doctests with Revise (#38258) Co-authored-by: Max Horn Co-authored-by: Max Horn --- Makefile | 3 ++ doc/Makefile | 3 +- doc/make.jl | 77 ++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f6c201c7bd343..c5dad6afd902a 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,9 @@ debug release : % : julia-% docs: julia-sysimg-$(JULIA_BUILD_MODE) @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/doc JULIA_EXECUTABLE='$(call spawn,$(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE))) --startup-file=no' +docs-revise: + @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/doc JULIA_EXECUTABLE='$(call spawn,$(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE))) --startup-file=no' revise=true + check-whitespace: ifneq ($(NO_GIT), 1) @$(JULIAHOME)/contrib/check-whitespace.sh diff --git a/doc/Makefile b/doc/Makefile index 600ce3d53100a..2f8b3f18495d8 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -19,10 +19,11 @@ help: @echo "To run linkcheck, use 'make linkcheck=true'" @echo "To run doctests, use 'make doctest=true'" @echo "To fix outdated doctests, use 'make doctest=fix'" + @echo "To run doctests using Revise (to test changes without rebuilding the sysimage), use 'make doctest=true revise=true'" DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT)) \ - texplatform=$(texplatform) + texplatform=$(texplatform) revise=$(revise) UNICODE_DATA_VERSION=13.0.0 $(SRCCACHE)/UnicodeData-$(UNICODE_DATA_VERSION).txt: diff --git a/doc/make.jl b/doc/make.jl index f24373a472ecd..ceff218df175d 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -178,18 +178,83 @@ const PAGES = [ ] end +const use_revise = "revise=true" in ARGS +if use_revise + let revise_env = joinpath(@__DIR__, "deps", "revise") + Pkg.activate(revise_env) + Pkg.add("Revise"; preserve=Pkg.PRESERVE_NONE) + Base.ACTIVE_PROJECT[] = nothing + pushfirst!(LOAD_PATH, revise_env) + end +end +function maybe_revise(ex) + use_revise || return ex + STDLIB_DIR = Sys.STDLIB + STDLIBS = filter!(x -> isfile(joinpath(STDLIB_DIR, x, "src", "$(x).jl")), readdir(STDLIB_DIR)) + return quote + $ex + using Revise + const STDLIBS = $STDLIBS + union!(Revise.stdlib_names, Symbol.(STDLIBS)) + Revise.track(Core.Compiler) + Revise.track(Base) + for (id, mod) in Base.loaded_modules + if id.name in STDLIBS + Revise.track(mod) + end + end + Revise.revise() + end +end + for stdlib in STDLIB_DOCS @eval using $(stdlib.stdlib) # All standard library modules get `using $STDLIB` as their global - DocMeta.setdocmeta!(Base.root_module(Base, stdlib.stdlib), :DocTestSetup, :(using $(stdlib.stdlib)), recursive=true) + DocMeta.setdocmeta!( + Base.root_module(Base, stdlib.stdlib), + :DocTestSetup, + maybe_revise(:(using $(stdlib.stdlib))); + recursive=true, + ) end # A few standard libraries need more than just the module itself in the DocTestSetup. # This overwrites the existing ones from above though, hence the warn=false. -DocMeta.setdocmeta!(SparseArrays, :DocTestSetup, :(using SparseArrays, LinearAlgebra), recursive=true, warn=false) -DocMeta.setdocmeta!(SuiteSparse, :DocTestSetup, :(using SparseArrays, LinearAlgebra, SuiteSparse), recursive=true, warn=false) -DocMeta.setdocmeta!(UUIDs, :DocTestSetup, :(using UUIDs, Random), recursive=true, warn=false) -DocMeta.setdocmeta!(Pkg, :DocTestSetup, :(using Pkg, Pkg.Artifacts), recursive=true, warn=false) -DocMeta.setdocmeta!(Base.BinaryPlatforms, :DocTestSetup, :(using Base.BinaryPlatforms), recursive=true, warn=false) +DocMeta.setdocmeta!( + SparseArrays, + :DocTestSetup, + maybe_revise(:(using SparseArrays, LinearAlgebra)); + recursive=true, warn=false, +) +DocMeta.setdocmeta!( + SuiteSparse, + :DocTestSetup, + maybe_revise(:(using SparseArrays, LinearAlgebra, SuiteSparse)); + recursive=true, warn=false, +) +DocMeta.setdocmeta!( + UUIDs, + :DocTestSetup, + maybe_revise(:(using UUIDs, Random)); + recursive=true, warn=false, +) +DocMeta.setdocmeta!( + Pkg, + :DocTestSetup, + maybe_revise(:(using Pkg, Pkg.Artifacts)); + recursive=true, warn=false, +) +DocMeta.setdocmeta!( + Base, + :DocTestSetup, + maybe_revise(:(;;)); + recursive=true, +) +DocMeta.setdocmeta!( + Base.BinaryPlatforms, + :DocTestSetup, + maybe_revise(:(using Base.BinaryPlatforms)); + recursive=true, warn=false, +) let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS) global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures) From bbe4cfa62ed88d83636655b7efeb011e0b4f0d23 Mon Sep 17 00:00:00 2001 From: Daniel Karrasch Date: Thu, 14 Jan 2021 09:59:11 +0100 Subject: [PATCH 096/239] Allow SVD of vectors (#39087) --- stdlib/LinearAlgebra/src/svd.jl | 43 ++++++++++++++++++++++---------- stdlib/LinearAlgebra/test/svd.jl | 20 +++++++++++++-- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/stdlib/LinearAlgebra/src/svd.jl b/stdlib/LinearAlgebra/src/svd.jl index 513dd408df03d..68bce4793661f 100644 --- a/stdlib/LinearAlgebra/src/svd.jl +++ b/stdlib/LinearAlgebra/src/svd.jl @@ -89,22 +89,36 @@ default_svd_alg(A) = DivideAndConquer() `svd!` is the same as [`svd`](@ref), but saves space by overwriting the input `A`, instead of creating a copy. See documentation of [`svd`](@ref) for details. """ -function svd!(A::StridedMatrix{T}; full::Bool = false, alg::Algorithm = default_svd_alg(A)) where T<:BlasFloat - m,n = size(A) +function svd!(A::StridedMatrix{T}; full::Bool = false, alg::Algorithm = default_svd_alg(A)) where {T<:BlasFloat} + m, n = size(A) if m == 0 || n == 0 - u,s,vt = (Matrix{T}(I, m, full ? m : n), real(zeros(T,0)), Matrix{T}(I, n, n)) + u, s, vt = (Matrix{T}(I, m, full ? m : n), real(zeros(T,0)), Matrix{T}(I, n, n)) else - u,s,vt = _svd!(A,full,alg) + u, s, vt = _svd!(A, full, alg) + end + SVD(u, s, vt) +end +function svd!(A::StridedVector{T}; full::Bool = false, alg::Algorithm = default_svd_alg(A)) where {T<:BlasFloat} + m = length(A) + normA = norm(A) + if iszero(normA) + return SVD(Matrix{T}(I, m, full ? m : 1), [normA], ones(T, 1, 1)) + elseif !full + normalize!(A) + return SVD(reshape(A, (m, 1)), [normA], ones(T, 1, 1)) + else + u, s, vt = _svd!(reshape(A, (m, 1)), full, alg) + return SVD(u, s, vt) end - SVD(u,s,vt) end - -_svd!(A::StridedMatrix{T}, full::Bool, alg::Algorithm) where T<:BlasFloat = throw(ArgumentError("Unsupported value for `alg` keyword.")) -_svd!(A::StridedMatrix{T}, full::Bool, alg::DivideAndConquer) where T<:BlasFloat = LAPACK.gesdd!(full ? 'A' : 'S', A) -function _svd!(A::StridedMatrix{T}, full::Bool, alg::QRIteration) where T<:BlasFloat +_svd!(A::StridedMatrix{T}, full::Bool, alg::Algorithm) where {T<:BlasFloat} = + throw(ArgumentError("Unsupported value for `alg` keyword.")) +_svd!(A::StridedMatrix{T}, full::Bool, alg::DivideAndConquer) where {T<:BlasFloat} = + LAPACK.gesdd!(full ? 'A' : 'S', A) +function _svd!(A::StridedMatrix{T}, full::Bool, alg::QRIteration) where {T<:BlasFloat} c = full ? 'A' : 'S' - u,s,vt = LAPACK.gesvd!(c, c, A) + u, s, vt = LAPACK.gesvd!(c, c, A) end @@ -153,7 +167,7 @@ julia> Uonly == U true ``` """ -function svd(A::StridedVecOrMat{T}; full::Bool = false, alg::Algorithm = default_svd_alg(A)) where T +function svd(A::StridedVecOrMat{T}; full::Bool = false, alg::Algorithm = default_svd_alg(A)) where {T} svd!(copy_oftype(A, eigtype(T)), full = full, alg = alg) end function svd(x::Number; full::Bool = false, alg::Algorithm = default_svd_alg(x)) @@ -190,7 +204,7 @@ See also [`svdvals`](@ref) and [`svd`](@ref). ``` """ svdvals!(A::StridedMatrix{T}) where {T<:BlasFloat} = isempty(A) ? zeros(real(T), 0) : LAPACK.gesdd!('N', A)[2] -svdvals(A::AbstractMatrix{<:BlasFloat}) = svdvals!(copy(A)) +svdvals!(A::StridedVector{T}) where {T<:BlasFloat} = svdvals!(reshape(A, (length(A), 1))) """ svdvals(A) @@ -214,7 +228,10 @@ julia> svdvals(A) 0.0 ``` """ -svdvals(A::AbstractMatrix{T}) where T = svdvals!(copy_oftype(A, eigtype(T))) +svdvals(A::AbstractMatrix{T}) where {T} = svdvals!(copy_oftype(A, eigtype(T))) +svdvals(A::AbstractVector{T}) where {T} = [convert(eigtype(T), norm(A))] +svdvals(A::AbstractMatrix{<:BlasFloat}) = svdvals!(copy(A)) +svdvals(A::AbstractVector{<:BlasFloat}) = [norm(A)] svdvals(x::Number) = abs(x) svdvals(S::SVD{<:Any,T}) where {T} = (S.S)::Vector{T} diff --git a/stdlib/LinearAlgebra/test/svd.jl b/stdlib/LinearAlgebra/test/svd.jl index d83d2de0f3c88..30dd6db300eb9 100644 --- a/stdlib/LinearAlgebra/test/svd.jl +++ b/stdlib/LinearAlgebra/test/svd.jl @@ -8,6 +8,22 @@ using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, QRPivoted @testset "Simple svdvals / svd tests" begin ≊(x,y) = isapprox(x,y,rtol=1e-15) + m = [2, 0] + @test @inferred(svdvals(m)) ≊ [2] + @test @inferred(svdvals!(float(m))) ≊ [2] + for sf in (@inferred(svd(m)), @inferred(svd!(float(m)))) + @test sf.S ≊ [2] + @test sf.U'sf.U ≊ [1] + @test sf.Vt'sf.Vt ≊ [1] + @test sf.U*Diagonal(sf.S)*sf.Vt' ≊ m + end + F = @inferred svd(m, full=true) + @test size(F.U) == (2, 2) + @test F.S ≊ [2] + @test F.U'F.U ≊ Matrix(I, 2, 2) + @test F.Vt'*F.Vt ≊ [1] + @test @inferred(svdvals(3:4)) ≊ [5] + m1 = [2 0; 0 0] m2 = [2 -2; 1 1]/sqrt(2) m2c = Complex.([2 -2; 1 1]/sqrt(2)) @@ -15,8 +31,8 @@ using LinearAlgebra: BlasComplex, BlasFloat, BlasReal, QRPivoted @test @inferred(svdvals(m2)) ≊ [2, 1] @test @inferred(svdvals(m2c)) ≊ [2, 1] - sf1 = svd(m1) - sf2 = svd(m2) + sf1 = @inferred svd(m1) + sf2 = @inferred svd(m2) @test sf1.S ≊ [2, 0] @test sf2.S ≊ [2, 1] # U & Vt are unitary From eb567b2f7d27e3ccb5cf0f1d004d3cd7258cc53d Mon Sep 17 00:00:00 2001 From: Rik Huijzer Date: Thu, 14 Jan 2021 12:47:03 +0100 Subject: [PATCH 097/239] [doc]: correct docstring for strip (#39231) --- base/strings/util.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/strings/util.jl b/base/strings/util.jl index cb611ce5f0db9..140c5a31194f1 100644 --- a/base/strings/util.jl +++ b/base/strings/util.jl @@ -290,7 +290,7 @@ rstrip(s::AbstractString, chars::Chars) = rstrip(in(chars), s) Remove leading and trailing characters from `str`, either those specified by `chars` or those for which the function `pred` returns `true`. -The default behaviour is to remove leading whitespace and delimiters: see +The default behaviour is to remove leading and trailing whitespace and delimiters: see [`isspace`](@ref) for precise details. The optional `chars` argument specifies which characters to remove: it can be a single From 5bb065928a4b34124c8fc029145576ce1db34277 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Thu, 14 Jan 2021 23:47:37 +0900 Subject: [PATCH 098/239] inference: yet more fix for `ifelse` lattice (#39247) --- base/compiler/abstractinterpretation.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 41403861499d0..d1647f27244cc 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -787,13 +787,13 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::U cnd = argtypes[2] if isa(cnd, Conditional) newcnd = widenconditional(cnd) + tx = argtypes[3] + ty = argtypes[4] if isa(newcnd, Const) # if `cnd` is constant, we should just respect its constantness to keep inference accuracy - return newcnd.val ? tx : ty + return newcnd.val::Bool ? tx : ty else # try to simulate this as a real conditional (`cnd ? x : y`), so that the penalty for using `ifelse` instead isn't too high - tx = argtypes[3] - ty = argtypes[4] a = ssa_def_slot(fargs[3], sv) b = ssa_def_slot(fargs[4], sv) if isa(a, Slot) && slot_id(cnd.var) == slot_id(a) From 0102a3b462fae54225579ceae4f312d8091a3b59 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Thu, 14 Jan 2021 23:52:37 +0900 Subject: [PATCH 099/239] inference: improve code qualities (#39250) --- base/compiler/abstractinterpretation.jl | 34 +++++++++++++------------ base/compiler/typeutils.jl | 4 ++- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index d1647f27244cc..7d07e94ed26fe 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -537,8 +537,8 @@ function precise_container_type(interp::AbstractInterpreter, @nospecialize(itft) if _any(t -> !isa(t, DataType) || !(t <: Tuple) || !isknownlength(t), utis) return Any[Vararg{Any}], nothing end - result = Any[rewrap_unionall(p, tti0) for p in utis[1].parameters] - for t in utis[2:end] + result = Any[rewrap_unionall(p, tti0) for p in (utis[1]::DataType).parameters] + for t::DataType in utis[2:end] if length(t.parameters) != length(result) return Any[Vararg{Any}], nothing end @@ -765,8 +765,9 @@ end function argtype_by_index(argtypes::Vector{Any}, i::Int) n = length(argtypes) - if isvarargtype(argtypes[n]) - return i >= n ? unwrapva(argtypes[n]) : argtypes[i] + na = argtypes[n] + if isvarargtype(na) + return i >= n ? unwrapva(na) : argtypes[i] else return i > n ? Bottom : argtypes[i] end @@ -810,7 +811,7 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::U if f === getfield && isa(fargs, Vector{Any}) && la == 3 && isa(argtypes[3], Const) && isa(argtypes[3].val, Int) && argtypes[2] ⊑ Tuple # TODO: why doesn't this use the getfield_tfunc? cti, _ = precise_container_type(interp, iterate, argtypes[2], sv) - idx = argtypes[3].val + idx = argtypes[3].val::Int if 1 <= idx <= length(cti) rt = unwrapva(cti[idx]) end @@ -888,10 +889,11 @@ end function abstract_call_unionall(argtypes::Vector{Any}) if length(argtypes) == 3 canconst = true - if isa(argtypes[3], Const) - body = argtypes[3].val - elseif isType(argtypes[3]) - body = argtypes[3].parameters[1] + a3 = argtypes[3] + if isa(a3, Const) + body = a3.val + elseif isType(a3) + body = a3.parameters[1] canconst = false else return Any @@ -900,11 +902,11 @@ function abstract_call_unionall(argtypes::Vector{Any}) return Any end if has_free_typevars(body) - if isa(argtypes[2], Const) - tv = argtypes[2].val - elseif isa(argtypes[2], PartialTypeVar) - ptv = argtypes[2] - tv = ptv.tv + a2 = argtypes[2] + if isa(a2, Const) + tv = a2.val + elseif isa(a2, PartialTypeVar) + tv = a2.tv canconst = false else return Any @@ -1091,7 +1093,7 @@ end function abstract_eval_value_expr(interp::AbstractInterpreter, e::Expr, vtypes::VarTable, sv::InferenceState) if e.head === :static_parameter - n = e.args[1] + n = e.args[1]::Int t = Any if 1 <= n <= length(sv.sptypes) t = sv.sptypes[n] @@ -1110,7 +1112,7 @@ function abstract_eval_special_value(interp::AbstractInterpreter, @nospecialize( elseif isa(e, SSAValue) return abstract_eval_ssavalue(e::SSAValue, sv.src) elseif isa(e, Slot) - return vtypes[slot_id(e)].typ + return (vtypes[slot_id(e)]::VarState).typ elseif isa(e, GlobalRef) return abstract_eval_global(e.mod, e.name) end diff --git a/base/compiler/typeutils.jl b/base/compiler/typeutils.jl index a37558870173f..d5db2ab70ef1f 100644 --- a/base/compiler/typeutils.jl +++ b/base/compiler/typeutils.jl @@ -34,7 +34,9 @@ end function has_nontrivial_const_info(@nospecialize t) isa(t, PartialStruct) && return true - return isa(t, Const) && !isdefined(typeof(t.val), :instance) && !(isa(t.val, Type) && hasuniquerep(t.val)) + isa(t, Const) || return false + val = t.val + return !isdefined(typeof(val), :instance) && !(isa(val, Type) && hasuniquerep(val)) end # Subtyping currently intentionally answers certain queries incorrectly for kind types. For From 39305d21d8c0caef7792cb387d2fc6add671bc1c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 4 Jan 2021 22:52:10 -0500 Subject: [PATCH 100/239] don't dereference Expected --- src/jitlayers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 6269607ae575c..19ff195be4faf 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -726,7 +726,7 @@ JuliaOJIT::JuliaOJIT(TargetMachine &TM, LLVMContext *LLVMCtx) static void *atomic_hdl = jl_load_dynamic_library(libatomic, JL_RTLD_LOCAL, 0); if (atomic_hdl != NULL) { GlobalJD.addGenerator( - std::move(*orc::DynamicLibrarySearchGenerator::Load( + cantFail(orc::DynamicLibrarySearchGenerator::Load( libatomic, DL.getGlobalPrefix(), [&](const orc::SymbolStringPtr &S) { From b816edc7f060403bbb60bc21975ec631226db885 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 5 Jan 2021 12:32:03 -0500 Subject: [PATCH 101/239] [JITLayers] Consume errors on address lookup --- src/jitlayers.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 19ff195be4faf..aada046d46b69 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -814,13 +814,21 @@ JL_JITSymbol JuliaOJIT::findUnmangledSymbol(StringRef Name) uint64_t JuliaOJIT::getGlobalValueAddress(StringRef Name) { auto addr = findSymbol(getMangledName(Name), false); - return addr ? cantFail(addr.getAddress()) : 0; + if (!addr) { + consumeError(addr.takeError()); + return 0; + } + return cantFail(addr.getAddress()); } uint64_t JuliaOJIT::getFunctionAddress(StringRef Name) { auto addr = findSymbol(getMangledName(Name), false); - return addr ? cantFail(addr.getAddress()) : 0; + if (!addr) { + consumeError(addr.takeError()); + return 0; + } + return cantFail(addr.getAddress()); } static int globalUniqueGeneratedNames; From 4e6a3a41404d5ceae05fe717dc0a000f06b5029f Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 14 Jan 2021 13:32:58 -0500 Subject: [PATCH 102/239] fix #39218, bug in subtyping fast path for tuples with repeated elements (#39237) --- src/subtype.c | 2 +- test/subtype.jl | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/subtype.c b/src/subtype.c index 22c212e2d8cd2..3b45a207de707 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -1033,7 +1033,7 @@ static int subtype_tuple_tail(jl_datatype_t *xd, jl_datatype_t *yd, int8_t R, jl // an identical type on the left doesn't need to be compared to a Vararg // element type on the right more than twice. } - else if (x_same && + else if (x_same && e->Runions.depth == 0 && ((yi == lasty && !jl_has_free_typevars(xi) && !jl_has_free_typevars(yi)) || (yi == lastx && !vx && vy && jl_is_concrete_type(xi)))) { // fast path for repeated elements diff --git a/test/subtype.jl b/test/subtype.jl index 5e2bd51ab69c4..dd0147406f57c 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1854,3 +1854,17 @@ let A = Tuple{Type{T} where T<:Ref, Ref, Union{T, Union{Ref{T}, T}} where T<:Ref @test I == typeintersect(A,B) @test I == Tuple{Type{T}, Ref{T}, Union{Ref{T}, T}} where T<:Ref end + +# issue #39218 +let A = Int, B = String, U = Union{A, B} + @test issub_strict(Union{Tuple{A, A}, Tuple{B, B}}, Tuple{U, U}) + @test issub_strict(Union{Tuple{A, A}, Tuple{B, B}}, Tuple{Union{A, B}, Union{A, B}}) +end + +struct A39218 end +struct B39218 end +const AB39218 = Union{A39218,B39218} +f39218(::T, ::T) where {T<:AB39218} = false +g39218(a, b) = (@nospecialize; if a isa AB39218 && b isa AB39218; f39218(a, b); end;) +@test g39218(A39218(), A39218()) === false +@test_throws MethodError g39218(A39218(), B39218()) From 8fcf21a4a51a7b4e9eb26adc0ec339b8b72a0d1f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 14 Jan 2021 11:35:34 -0800 Subject: [PATCH 103/239] [Artifacts]: Support `using Pkg.Artifacts` with LazyArtifacts (#39210) Just as we wanted to support users that used `using Pkg`, we should support users that use `using Pkg.Artifacts` with their lazy artifacts. This PR merely extends support to those users and adds regression tests. --- stdlib/Artifacts/src/Artifacts.jl | 14 ++++++++++---- stdlib/Artifacts/test/runtests.jl | 27 +++++++++++++++++++++------ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/stdlib/Artifacts/src/Artifacts.jl b/stdlib/Artifacts/src/Artifacts.jl index fb59b4df82bb7..626e480377bb8 100644 --- a/stdlib/Artifacts/src/Artifacts.jl +++ b/stdlib/Artifacts/src/Artifacts.jl @@ -541,7 +541,9 @@ function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dic meta = artifact_meta(name, artifact_dict, artifacts_toml; platform) if meta !== nothing && get(meta, "lazy", false) if lazyartifacts isa Module && isdefined(lazyartifacts, :ensure_artifact_installed) - nameof(lazyartifacts) === :Pkg && Base.depwarn("using Pkg instead of using LazyArtifacts is deprecated", :var"@artifact_str", force=true) + if nameof(lazyartifacts) in (:Pkg, :Artifacts) + Base.depwarn("using Pkg instead of using LazyArtifacts is deprecated", :var"@artifact_str", force=true) + end return jointail(lazyartifacts.ensure_artifact_installed(string(name), artifacts_toml; platform), path_tail) end error("Artifact $(repr(name)) is a lazy artifact; package developers must call `using LazyArtifacts` in $(__module__) before using lazy artifacts.") @@ -659,9 +661,13 @@ macro artifact_str(name, platform=nothing) Base.include_dependency(artifacts_toml) # Check if the user has provided `LazyArtifacts`, and thus supports lazy artifacts - lazyartifacts = isdefined(__module__, :LazyArtifacts) ? GlobalRef(__module__, :LazyArtifacts) : nothing - if lazyartifacts === nothing && isdefined(__module__, :Pkg) - lazyartifacts = GlobalRef(__module__, :Pkg) # deprecated + # If not, check to see if `Pkg` or `Pkg.Artifacts` has been imported. + lazyartifacts = nothing + for module_name in (:LazyArtifacts, :Pkg, :Artifacts) + if isdefined(__module__, module_name) + lazyartifacts = GlobalRef(__module__, module_name) + break + end end # If `name` is a constant, (and we're using the default `Platform`) we can actually load diff --git a/stdlib/Artifacts/test/runtests.jl b/stdlib/Artifacts/test/runtests.jl index 1433d89d3b5fb..59ae0057971e5 100644 --- a/stdlib/Artifacts/test/runtests.jl +++ b/stdlib/Artifacts/test/runtests.jl @@ -133,12 +133,27 @@ end end @testset "@artifact_str install errors" begin - mktempdir() do tempdir - with_artifacts_directory(tempdir) do - ex = @test_throws ErrorException artifact"c_simple" - @test startswith(ex.value.msg, "Artifact \"c_simple\" was not installed correctly. ") - ex = @test_throws ErrorException artifact"socrates" - @test startswith(ex.value.msg, "Artifact \"socrates\" is a lazy artifact; ") + for imports in ("Artifacts, Pkg", "Pkg, Pkg.Artifacts", "Pkg.Artifacts") + mktempdir() do tempdir + with_artifacts_directory(tempdir) do + ex = @test_throws ErrorException artifact"c_simple" + @test startswith(ex.value.msg, "Artifact \"c_simple\" was not installed correctly. ") + ex = @test_throws ErrorException artifact"socrates" + @test startswith(ex.value.msg, "Artifact \"socrates\" is a lazy artifact; ") + + # Can install if we load `Pkg` or `Pkg.Artifacts` + anon = Module(:__anon__) + Core.eval(anon, Meta.parse("using $(imports), Test")) + # Ensure that we get the expected exception, since this test runs with --depwarn=error + Core.eval(anon, quote + try + artifact"socrates" + @assert false "this @artifact_str macro invocation should have failed!" + catch e + @test startswith("using Pkg instead of using LazyArtifacts is deprecated", e.msg) + end + end) + end end end end From a3291e567ad9ced309506346455125be354cd47e Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 14 Jan 2021 19:43:28 +0000 Subject: [PATCH 104/239] Bump `Pkg` to `9b78818f09ea7e938bbb514f2056c6241714716f` This Pkg commit contains necessary improvements for BB on v1.6+ --- .../Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 | 1 - .../Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 | 1 - .../Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 | 1 + .../Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 create mode 100644 deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 deleted file mode 100644 index 2e364bd200a60..0000000000000 --- a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -ae28e6c295c1c0922c8fb80f79dd758e diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 deleted file mode 100644 index 726c40a0cda84..0000000000000 --- a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -a75a05cb81aa9955fa15f0e9f3aff079b76878ada3a601b021f3cdaa09fb3b2bde603c94b6549647ca6af90187bd871841fd07f44e3a38acff8607b281c2d388 diff --git a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 new file mode 100644 index 0000000000000..1671a3eb273b2 --- /dev/null +++ b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 @@ -0,0 +1 @@ +771f8f372aa452170ec60376d12eea3b diff --git a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 new file mode 100644 index 0000000000000..b78d51ebcdadc --- /dev/null +++ b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 @@ -0,0 +1 @@ +4319ddda03103e3307491ce3590f4dd338104bada72e4dd9a9082b847439bfbde239e1a3cc7032ed6c6fe6391ecb5697d6ec83a321e33234b3c8fd67f1dedd9a diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 9d6334e96c603..55c397bb28dac 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = release-1.6 -PKG_SHA1 = 5c9d3a82e363d98db7f8e99c92203774878b3df0 +PKG_SHA1 = 9b78818f09ea7e938bbb514f2056c6241714716f From 367841a054257cce71cdc491f6a7b04b5f15c6f8 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 14 Jan 2021 12:08:14 -0800 Subject: [PATCH 105/239] Fix incorrect `PKG_BRANCH` (#39257) --- stdlib/Pkg.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 55c397bb28dac..4d90f40e73786 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ -PKG_BRANCH = release-1.6 +PKG_BRANCH = master PKG_SHA1 = 9b78818f09ea7e938bbb514f2056c6241714716f From a29b62f51df835138b09bd0b38bc6a68aca5ab50 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Thu, 14 Jan 2021 16:04:54 -0600 Subject: [PATCH 106/239] Fix invalidations for `show(::MethodInstance)` and `detect_ambiguities` (#39253) --- base/show.jl | 2 +- stdlib/Test/src/Test.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/show.jl b/base/show.jl index 6a53b1c193f3e..650a697316b9d 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1004,7 +1004,7 @@ function show_mi(io::IO, l::Core.MethodInstance, from_stackframe::Bool=false) # to print a little more identifying information. if !from_stackframe linetable = l.uninferred.linetable - line = isempty(linetable) ? "unknown" : (lt = linetable[1]; string(lt.file) * ':' * string(lt.line)) + line = isempty(linetable) ? "unknown" : (lt = linetable[1]::Union{LineNumberNode,Core.LineInfoNode}; string(lt.file) * ':' * string(lt.line)) print(io, " from ", def, " starting at ", line) end end diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index 9005b2a8468b6..a9343a896c68f 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1459,7 +1459,7 @@ Use `recursive=true` to test in all submodules. `Union{}` type parameters are included; in most cases you probably want to set this to `false`. See [`Base.isambiguous`](@ref). """ -function detect_ambiguities(mods...; +function detect_ambiguities(mods::Module...; recursive::Bool = false, ambiguous_bottom::Bool = false) @nospecialize From 77865f2d86afb505b947bfadf44399bf032856e9 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Thu, 14 Jan 2021 16:51:25 -0600 Subject: [PATCH 107/239] Fix binaryplatforms `union` invalidation (#39251) DataStructures' `union(s::DataStructures.SparseIntSet, ns)` yields a bad invalidation. --- base/binaryplatforms.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index 493cf446c906c..e93494fac0f7e 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -992,7 +992,7 @@ only available in macOS `v"10.11"` and later, or an artifact can state that it r a libstdc++ that is at least `v"3.4.22"`, etc... """ function platforms_match(a::AbstractPlatform, b::AbstractPlatform) - for k in union(keys(tags(a)), keys(tags(b))) + for k in union(keys(tags(a)::Dict{String,String}), keys(tags(b)::Dict{String,String})) ak = get(tags(a), k, nothing) bk = get(tags(b), k, nothing) From f91bb749fb5b7498ee34ff2451a76870eeef90d6 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 14 Jan 2021 18:01:47 -0500 Subject: [PATCH 108/239] staticdata: fix unreferenced data assertion (#39246) Need to sequence operations correctly here. We need to first finish marking referenced data before we start deleting unreferenced data. This otherwise can lead to an assertion failure in some situations. Refs #37650 --- src/staticdata.c | 49 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/staticdata.c b/src/staticdata.c index 9b599c0ff1a7f..5a67ebd7eb313 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -1425,22 +1425,25 @@ static void jl_finalize_deserializer(jl_serializer_state *s) JL_GC_DISABLED -// --- helper functions --- - -// remove cached types not referenced in the stream -static int keep_type_cache_entry(jl_value_t *ti) +static void jl_scan_type_cache_gv(jl_serializer_state *s, jl_svec_t *cache) { - if (ptrhash_get(&backref_table, ti) != HT_NOTFOUND || jl_get_llvm_gv(native_functions, ti) != 0) - return 1; - if (jl_is_datatype(ti)) { - jl_value_t *singleton = ((jl_datatype_t*)ti)->instance; - if (singleton && (ptrhash_get(&backref_table, singleton) != HT_NOTFOUND || - jl_get_llvm_gv(native_functions, singleton) != 0)) - return 1; - } - return 0; + size_t l = jl_svec_len(cache), i; + for (i = 0; i < l; i++) { + jl_value_t *ti = jl_svecref(cache, i); + if (ti == NULL || ti == jl_nothing) + continue; + if (jl_get_llvm_gv(native_functions, ti)) { + jl_serialize_value(s, ti); + } + else if (jl_is_datatype(ti)) { + jl_value_t *singleton = ((jl_datatype_t*)ti)->instance; + if (singleton && jl_get_llvm_gv(native_functions, singleton)) + jl_serialize_value(s, ti); + } + } } +// remove cached types not referenced in the stream static void jl_prune_type_cache_hash(jl_svec_t *cache) { size_t l = jl_svec_len(cache), i; @@ -1448,7 +1451,7 @@ static void jl_prune_type_cache_hash(jl_svec_t *cache) jl_value_t *ti = jl_svecref(cache, i); if (ti == NULL || ti == jl_nothing) continue; - if (!keep_type_cache_entry(ti)) + if (ptrhash_get(&backref_table, ti) == HT_NOTFOUND) jl_svecset(cache, i, jl_nothing); } } @@ -1460,7 +1463,7 @@ static void jl_prune_type_cache_linear(jl_svec_t *cache) jl_value_t *ti = jl_svecref(cache, i); if (ti == NULL) break; - if (keep_type_cache_entry(ti)) + if (ptrhash_get(&backref_table, ti) != HT_NOTFOUND) jl_svecset(cache, ins++, ti); } if (i > ins) { @@ -1526,14 +1529,28 @@ static void jl_save_system_image_to_stream(ios_t *f) JL_GC_DISABLED jl_value_t *tag = *tags[i]; jl_serialize_value(&s, tag); } - // prune unused entries from built-in type caches + // step 1.1: check for values only found in the generated code + arraylist_t typenames; + arraylist_new(&typenames, 0); for (i = 0; i < backref_table.size; i += 2) { jl_typename_t *tn = (jl_typename_t*)backref_table.table[i]; if (tn == HT_NOTFOUND || !jl_is_typename(tn)) continue; + arraylist_push(&typenames, tn); + } + for (i = 0; i < typenames.len; i++) { + jl_typename_t *tn = (jl_typename_t*)typenames.items[i]; + jl_scan_type_cache_gv(&s, tn->cache); + jl_scan_type_cache_gv(&s, tn->linearcache); + } + // step 1.2: prune (garbage collect) some special weak references from + // built-in type caches + for (i = 0; i < typenames.len; i++) { + jl_typename_t *tn = (jl_typename_t*)typenames.items[i]; jl_prune_type_cache_hash(tn->cache); jl_prune_type_cache_linear(tn->linearcache); } + arraylist_free(&typenames); } { // step 2: build all the sysimg sections From 3c407687fb6b98c2fc1254e97d2548d536473a1f Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 14 Jan 2021 15:39:00 -0800 Subject: [PATCH 109/239] Revert "Bump `Pkg` to `9b78818f09ea7e938bbb514f2056c6241714716f`" (#39263) --- .../Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 | 1 + .../Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 | 1 + .../Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 | 1 - .../Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 | 1 - stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 create mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 delete mode 100644 deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 new file mode 100644 index 0000000000000..2e364bd200a60 --- /dev/null +++ b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 @@ -0,0 +1 @@ +ae28e6c295c1c0922c8fb80f79dd758e diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 new file mode 100644 index 0000000000000..726c40a0cda84 --- /dev/null +++ b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 @@ -0,0 +1 @@ +a75a05cb81aa9955fa15f0e9f3aff079b76878ada3a601b021f3cdaa09fb3b2bde603c94b6549647ca6af90187bd871841fd07f44e3a38acff8607b281c2d388 diff --git a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 deleted file mode 100644 index 1671a3eb273b2..0000000000000 --- a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -771f8f372aa452170ec60376d12eea3b diff --git a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 b/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 deleted file mode 100644 index b78d51ebcdadc..0000000000000 --- a/deps/checksums/Pkg-9b78818f09ea7e938bbb514f2056c6241714716f.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -4319ddda03103e3307491ce3590f4dd338104bada72e4dd9a9082b847439bfbde239e1a3cc7032ed6c6fe6391ecb5697d6ec83a321e33234b3c8fd67f1dedd9a diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 4d90f40e73786..220a0d201daae 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = master -PKG_SHA1 = 9b78818f09ea7e938bbb514f2056c6241714716f +PKG_SHA1 = 5c9d3a82e363d98db7f8e99c92203774878b3df0 From 051f47b414687f27c2297c55bc45b4a8edf711fb Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 14 Jan 2021 18:50:37 -0500 Subject: [PATCH 110/239] codegen: mostly fix uses of undefined PhiNodes (#39236) Unlike the rest of codegen, we permit PhiNodes to legally return undefined values, so we need to carefully skip those. Fixes #39232 --- src/codegen.cpp | 37 ++++++++++++++++++++++++++++--------- test/compiler/codegen.jl | 10 ++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 29cb3572e5b03..70daecb6fb61e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1376,7 +1376,7 @@ static inline jl_cgval_t update_julia_type(jl_codectx_t &ctx, const jl_cgval_t & return jl_cgval_t(v, typ, NULL); } -static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ); +static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ, Value **skip=nullptr); // --- allocating local variables --- @@ -1437,7 +1437,7 @@ static void CreateConditionalAbort(IRBuilder<> &irbuilder, Value *test) #include "cgutils.cpp" -static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ) +static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ, Value **skip) { // previous value was a split union, compute new index, or box Value *new_tindex = ConstantInt::get(T_int8, 0x80); @@ -1462,6 +1462,10 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t & // new value doesn't need to be boxed // since it isn't part of the new union t = true; + if (skip) { + Value *skip1 = ctx.builder.CreateICmpEQ(tindex, ConstantInt::get(T_int8, idx)); + *skip = *skip ? ctx.builder.CreateOr(*skip, skip1) : skip1; + } } else { // will actually need to box this element @@ -1552,7 +1556,8 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t & if (v.V == NULL) { // v.V might be NULL if it was all ghost objects before return jl_cgval_t(boxv, NULL, false, typ, new_tindex); - } else { + } + else { Value *isboxv = ctx.builder.CreateIsNotNull(boxv); Value *slotv; MDNode *tbaa; @@ -1584,7 +1589,7 @@ static jl_cgval_t convert_julia_type_union(jl_codectx_t &ctx, const jl_cgval_t & // given a value marked with type `v.typ`, compute the mapping and/or boxing to return a value of type `typ` // TODO: should this set TIndex when trivial (such as 0x80 or concrete types) ? -static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ) +static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_value_t *typ, Value **skip) { if (typ == (jl_value_t*)jl_typeofbottom_type) return ghostValue(typ); // normalize TypeofBottom to Type{Union{}} @@ -1595,6 +1600,7 @@ static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_ return ghostValue(typ); Value *new_tindex = NULL; if (jl_is_concrete_type(typ)) { + assert(skip == nullptr && "skip only valid for union type return"); if (v.TIndex && !jl_is_pointerfree(typ)) { // discovered that this union-split type must actually be isboxed if (v.Vboxed) { @@ -1617,7 +1623,7 @@ static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_ else { bool makeboxed = false; if (v.TIndex) { - return convert_julia_type_union(ctx, v, typ); + return convert_julia_type_union(ctx, v, typ, skip); } else if (!v.isboxed && jl_is_uniontype(typ)) { // previous value was unboxed (leaftype), statically compute union tindex @@ -1637,6 +1643,11 @@ static jl_cgval_t convert_julia_type(jl_codectx_t &ctx, const jl_cgval_t &v, jl_ else if (jl_subtype(v.typ, typ)) { makeboxed = true; } + else if (skip) { + // undef + *skip = ConstantInt::get(T_int1, 1); + return jl_cgval_t(); + } else { // unreachable CreateTrap(ctx.builder); @@ -6919,12 +6930,16 @@ static std::pair, jl_llvm_functions_t> V = boxed(ctx, val); } else { + // XXX: must emit undef here (rather than a bitcast or + // load of val) if the runtime type of val isn't phiType V = emit_unbox(ctx, VN->getType(), val, phiType); } VN->addIncoming(V, ctx.builder.GetInsertBlock()); assert(!TindexN); } else if (dest && val.typ != (jl_value_t*)jl_bottom_type) { + // XXX: must emit undef here (rather than a bitcast or + // load of val) if the runtime type of val isn't phiType assert(lty != T_prjlvalue); (void)emit_unbox(ctx, lty, val, phiType, maybe_decay_tracked(ctx, dest)); } @@ -6957,7 +6972,10 @@ static std::pair, jl_llvm_functions_t> } } else { - jl_cgval_t new_union = convert_julia_type(ctx, val, phiType); + Value *skip = NULL; + // must compute skip here, since the runtime type of val might not be in phiType + // caution: only Phi and PhiC are allowed to do this (and maybe sometimes Pi) + jl_cgval_t new_union = convert_julia_type(ctx, val, phiType, &skip); RTindex = new_union.TIndex; if (!RTindex) { assert(new_union.isboxed && new_union.Vboxed && "convert_julia_type failed"); @@ -6972,11 +6990,12 @@ static std::pair, jl_llvm_functions_t> if (VN) V = new_union.Vboxed ? new_union.Vboxed : V_rnull; if (dest) { // basically, if !ghost union - Value *skip = NULL; - if (new_union.Vboxed != nullptr) - skip = ctx.builder.CreateICmpNE( // if 0x80 is set, we won't select this slot anyways + if (new_union.Vboxed != nullptr) { + Value *isboxed = ctx.builder.CreateICmpNE( // if 0x80 is set, we won't select this slot anyways ctx.builder.CreateAnd(RTindex, ConstantInt::get(T_int8, 0x80)), ConstantInt::get(T_int8, 0)); + skip = skip ? ctx.builder.CreateOr(isboxed, skip) : isboxed; + } emit_unionmove(ctx, dest, tbaa_arraybuf, new_union, skip); } } diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index 9b147fd0b571b..18401288a1c4a 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -512,3 +512,13 @@ let a = Core.Intrinsics.trunc_int(UInt24, 3), @test sizeof(Union{UInt8,UInt24}) == 3 @test sizeof(Base.RefValue{Union{UInt8,UInt24}}) == 8 end + +# issue #39232 +function f39232(a) + z = Any[] + for (i, ai) in enumerate(a) + push!(z, ai) + end + return z +end +@test f39232((+, -)) == Any[+, -] From 344f72ee9ca1fa61f3e912d576ee86a38f987465 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Thu, 14 Jan 2021 21:51:03 -0500 Subject: [PATCH 111/239] fix #39259, leave `Main.ARGS` unresolved on startup (#39262) --- contrib/generate_precompile.jl | 2 +- test/cmdlineargs.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/generate_precompile.jl b/contrib/generate_precompile.jl index 1572e81aa2b75..d17123d70105a 100644 --- a/contrib/generate_precompile.jl +++ b/contrib/generate_precompile.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -if isempty(ARGS) || ARGS[1] !== "0" +if isempty(Base.ARGS) || Base.ARGS[1] !== "0" Sys.__init_build() # Prevent this from being put into the Main namespace @eval Module() begin diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 300883773099b..51051f379f496 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -719,3 +719,6 @@ for yn in ("no", "yes") end @test v[2] end + +# issue #39259, shadowing `ARGS` +@test success(`$(Base.julia_cmd()) --startup-file=no -e 'ARGS=1'`) From 985dfa54c333e58d40c1b28de7692dc2cce4c965 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Fri, 15 Jan 2021 00:48:42 -0600 Subject: [PATCH 112/239] Prevent TOML invalidation by pirates of `T[elements...]` (#39252) StaticArrays (perhaps among others) semi-pirates this method, although they've worked hard to make it pretty innocuous. Still, there are times when it invalidates the TOML-reading, so best to protect this. --- base/toml_parser.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/base/toml_parser.jl b/base/toml_parser.jl index d872cfac60864..c69096504df0b 100644 --- a/base/toml_parser.jl +++ b/base/toml_parser.jl @@ -657,13 +657,20 @@ end ######### function push!!(v::Vector, el) + # Since these types are typically non-inferrable, they are a big invalidation risk, + # and since it's used by the package-loading infrastructure the cost of invalidation + # is high. Therefore, this is written to reduce the "exposed surface area": e.g., rather + # than writing `T[el]` we write it as `push!(Vector{T}(undef, 1), el)` so that there + # is no ambiguity about what types of objects will be created. T = eltype(v) t = typeof(el) if el isa T || t === T push!(v, el::T) return v elseif T === Union{} - return t[el] + out = Vector{t}(undef, 1) + out[1] = el + return out else if typeof(T) === Union newT = Any From b9f115f4f15965044239abe8854dba19763fd8ac Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 15 Jan 2021 02:56:40 -0800 Subject: [PATCH 113/239] Bump `Pkg` to latest tip of `Pkg.jl#master` (#39264) * Bump `Pkg` to latest tip of `Pkg.jl#master` * add a docmeta to Pkg Forward-porting https://github.com/JuliaLang/julia/commit/20c94f9d6e1143eb0fe0fd96df880c1be67a75c9 --- .../Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 | 1 - .../sha512 | 1 - .../Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 | 1 + .../sha512 | 1 + doc/make.jl | 6 ++++++ stdlib/Pkg.version | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 create mode 100644 deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 deleted file mode 100644 index 2e364bd200a60..0000000000000 --- a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -ae28e6c295c1c0922c8fb80f79dd758e diff --git a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 b/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 deleted file mode 100644 index 726c40a0cda84..0000000000000 --- a/deps/checksums/Pkg-5c9d3a82e363d98db7f8e99c92203774878b3df0.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -a75a05cb81aa9955fa15f0e9f3aff079b76878ada3a601b021f3cdaa09fb3b2bde603c94b6549647ca6af90187bd871841fd07f44e3a38acff8607b281c2d388 diff --git a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 new file mode 100644 index 0000000000000..02ff5a9bb65b7 --- /dev/null +++ b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 @@ -0,0 +1 @@ +684b4945fabc25572f529bf6df2fdcc0 diff --git a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 new file mode 100644 index 0000000000000..6edc0e3251b1b --- /dev/null +++ b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 @@ -0,0 +1 @@ +b7b45decb50bde49d217d336f0a98d3b38bbbc473128c8ad09df1fbd02e94d0f177ad6214235ebe3ffa1401c63a55dc5101ed99b5f0fe10788dda59bc71a38a7 diff --git a/doc/make.jl b/doc/make.jl index ceff218df175d..c58b3eebed716 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -255,6 +255,12 @@ DocMeta.setdocmeta!( maybe_revise(:(using Base.BinaryPlatforms)); recursive=true, warn=false, ) +DocMeta.setdocmeta!( + Pkg.LazilyInitializedFields, + :DocTestSetup, + maybe_revise(:(using Pkg.LazilyInitializedFields)); + recursive=true, warn=false, +) let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS) global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures) diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 220a0d201daae..20a2974401e70 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = master -PKG_SHA1 = 5c9d3a82e363d98db7f8e99c92203774878b3df0 +PKG_SHA1 = 94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f From d4119a2ac4216760379953e92c41c4983641afbf Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 2 Jan 2021 01:32:30 +0100 Subject: [PATCH 114/239] Fix jl_new_task to avoid allocating stack twice If the user requested dedicated stack of a certain size, then `jl_new_task` immediately allocates the stack by invoking `jl_alloc_fiber`. However, it also later nulls `t->stkbuf`. As a result, `ctx_switch` invokes `jl_alloc_fiber` *again* to allocate another stack. --- src/task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index 0ab4075ac0067..5460e79618ba6 100644 --- a/src/task.c +++ b/src/task.c @@ -679,6 +679,7 @@ JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion else { t->bufsz = JL_STACK_SIZE; } + t->stkbuf = NULL; } else { // user requested dedicated stack of a certain size @@ -704,7 +705,6 @@ JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion t->sticky = 1; t->gcstack = NULL; t->excstack = NULL; - t->stkbuf = NULL; t->started = 0; t->prio = -1; t->tid = -1; From f813257d24b4e6ca6ee94559aae826a6a7aca008 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 15 Jan 2021 08:57:36 -0800 Subject: [PATCH 115/239] Fix macos codesign workflow (#39152) We changed the permissions on executable files which caused this `find` to not find any of the actual binaries that we need to sign. Change it to instead find anything with any executable permissions set, rather than ones with exactly the permissions `0755` --- contrib/mac/app/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mac/app/Makefile b/contrib/mac/app/Makefile index a8c0c4d707c5c..edb6f868c9486 100644 --- a/contrib/mac/app/Makefile +++ b/contrib/mac/app/Makefile @@ -52,7 +52,7 @@ dmg/$(APP_NAME): startup.applescript julia.icns find $@/Contents/Resources/julia -type f -exec chmod -w {} \; if [ -n "$$MACOS_CODESIGN_IDENTITY" ]; then \ echo "Codesigning with identity $$MACOS_CODESIGN_IDENTITY"; \ - MACHO_FILES=$$(find "$@" -type f -perm -755 | cut -d: -f1); \ + MACHO_FILES=$$(find "$@" -type f -perm -0111 | cut -d: -f1); \ for f in $${MACHO_FILES}; do \ echo "Codesigning $${f}..."; \ codesign -s "$$MACOS_CODESIGN_IDENTITY" --option=runtime --entitlements Entitlements.plist -vvv --timestamp --deep --force "$${f}"; \ From 35fcfda5505459ef9a54d017a67c18ec57d896b4 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 15 Jan 2021 13:50:13 -0500 Subject: [PATCH 116/239] Close uv_idle handles when we're done with them (#39268) uv_idle handles are a bit dangerous because the essentially prevent the uv loop from going to sleep, so if there's no work to be done on the julia side, it just turns into a busy loop. We start such an idle callback in the threads.jl test. We make sure it goes out of scope, so the GC will eventually close it, but in the meantime they keep the loop spinning. Now, unfortunately, the next test in line is the Distributed test, which runs everything in a subprocess, so it never builds up enough memory pressure to actually run the GC, so the idle handles never get closed. This isn't too big a deal, as the worst thing that happens is that it hogs one CPU core on CI while the threads test is running, but we don't have enough parallelism there anyway, so I don't expect a meaningful impact on CI. It does however blow up our rr traces and apparently causes significantly problems when trying to replay them on pernosco. This is easy to fix by just closing these handles once we're done with them. --- test/threads.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/threads.jl b/test/threads.jl index f2f7e1a8f035a..8ba90a26bee83 100644 --- a/test/threads.jl +++ b/test/threads.jl @@ -100,6 +100,10 @@ function Base.uvfinalize(t::UvTestIdle) nothing end +function Base.close(idle::UvTestIdle) + Base.uvfinalize(idle) +end + function Base.wait(idle::UvTestIdle) Base.iolock_begin() Base.preserve_handle(idle) @@ -129,12 +133,14 @@ proc = open(pipeline(`$(Base.julia_cmd()) -e $cmd`; stderr=stderr); write=true) let idle=UvTestIdle() wait(idle) + close(idle) end using Base.Threads @threads for i = 1:1 let idle=UvTestIdle() wait(idle) + close(idle) end end From 0e6ed75078331afd0e3fe5b79b13c11b586b50af Mon Sep 17 00:00:00 2001 From: Jeremie Knuesel Date: Fri, 15 Jan 2021 20:37:31 +0100 Subject: [PATCH 117/239] Fix LaTeX completions of Greek variants, add \frakI and \frakR (#39148) * Fix LaTeX completions of Greek variants, add \frakI and \frakR * Remove \Join completion It is redundant with \join * Add canonical symbol->LaTeX mapping for ambiguous cases A test checks that all ambiguous cases are handled. * Replace \dots suggestion with \ldots --- stdlib/REPL/src/docview.jl | 4 ++ stdlib/REPL/src/latex_symbols.jl | 79 ++++++++++++++++++++++++-------- stdlib/REPL/test/docview.jl | 7 ++- 3 files changed, 69 insertions(+), 21 deletions(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 9394c7f22ba68..042d11a627861 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -334,7 +334,11 @@ function symbol_latex(s::String) REPLCompletions.emoji_symbols)) symbols_latex[v] = k end + + # Overwrite with canonical mapping when a symbol has several completions (#39148) + merge!(symbols_latex, REPLCompletions.symbols_latex_canonical) end + return get(symbols_latex, s, "") end function repl_latex(io::IO, s::String) diff --git a/stdlib/REPL/src/latex_symbols.jl b/stdlib/REPL/src/latex_symbols.jl index 098f28766b255..57e41ed670538 100644 --- a/stdlib/REPL/src/latex_symbols.jl +++ b/stdlib/REPL/src/latex_symbols.jl @@ -76,6 +76,10 @@ end # Finally, we also add some symbols manually (at the top) as needed, # and edited others for consistency (e.g. #21646 and #14751). +# When a symbol has several completions, a canonical reverse mapping is +# specified at the bottom of this file. The complete reverse mapping is +# generated lazily in docview.jl. + # "font" prefixes const bold = "\\bf" const italic = "\\it" @@ -182,7 +186,7 @@ const latex_symbols = Dict( "\\^iota" => "ᶥ", "\\^phi" => "ᵠ", "\\^chi" => "ᵡ", - "\\^Phi" => "ᶲ", + "\\^ltphi" => "ᶲ", "\\^uparrow" => "ꜛ", "\\^downarrow" => "ꜜ", "\\^!" => "ꜝ", @@ -1827,6 +1831,7 @@ const latex_symbols = Dict( frak*"E" => "𝔈", # mathematical fraktur capital e frak*"F" => "𝔉", # mathematical fraktur capital f frak*"G" => "𝔊", # mathematical fraktur capital g + frak*"I" => "ℑ", # black-letter capital i (manual addition) frak*"J" => "𝔍", # mathematical fraktur capital j frak*"K" => "𝔎", # mathematical fraktur capital k frak*"L" => "𝔏", # mathematical fraktur capital l @@ -1835,6 +1840,7 @@ const latex_symbols = Dict( frak*"O" => "𝔒", # mathematical fraktur capital o frak*"P" => "𝔓", # mathematical fraktur capital p frak*"Q" => "𝔔", # mathematical fraktur capital q + frak*"R" => "ℜ", # black-letter capital r (manual addition) frak*"S" => "𝔖", # mathematical fraktur capital s frak*"T" => "𝔗", # mathematical fraktur capital t frak*"U" => "𝔘", # mathematical fraktur capital u @@ -2257,7 +2263,7 @@ const latex_symbols = Dict( bold*"beta" => "𝛃", # mathematical bold small beta bold*"gamma" => "𝛄", # mathematical bold small gamma bold*"delta" => "𝛅", # mathematical bold small delta - bold*"epsilon" => "𝛆", # mathematical bold small epsilon + bold*"varepsilon" => "𝛆", # mathematical bold small epsilon bold*"zeta" => "𝛇", # mathematical bold small zeta bold*"eta" => "𝛈", # mathematical bold small eta bold*"theta" => "𝛉", # mathematical bold small theta @@ -2279,7 +2285,7 @@ const latex_symbols = Dict( bold*"psi" => "𝛙", # mathematical bold small psi bold*"omega" => "𝛚", # mathematical bold small omega bold*"partial" => "𝛛", # mathematical bold partial differential - bold*"varepsilon" => "𝛜", # mathematical bold epsilon symbol + bold*"epsilon" => "𝛜", # mathematical bold epsilon symbol bold*"vartheta" => "𝛝", # mathematical bold theta symbol bold*"varkappa" => "𝛞", # mathematical bold kappa symbol bold*"phi" => "𝛟", # mathematical bold phi symbol @@ -2315,7 +2321,7 @@ const latex_symbols = Dict( italic*"beta" => "𝛽", # mathematical italic small beta italic*"gamma" => "𝛾", # mathematical italic small gamma italic*"delta" => "𝛿", # mathematical italic small delta - italic*"epsilon" => "𝜀", # mathematical italic small epsilon + italic*"varepsilon" => "𝜀", # mathematical italic small epsilon italic*"zeta" => "𝜁", # mathematical italic small zeta italic*"eta" => "𝜂", # mathematical italic small eta italic*"theta" => "𝜃", # mathematical italic small theta @@ -2332,15 +2338,15 @@ const latex_symbols = Dict( italic*"sigma" => "𝜎", # mathematical italic small sigma italic*"tau" => "𝜏", # mathematical italic small tau italic*"upsilon" => "𝜐", # mathematical italic small upsilon - italic*"phi" => "𝜑", # mathematical italic small phi + italic*"varphi" => "𝜑", # mathematical italic small phi italic*"chi" => "𝜒", # mathematical italic small chi italic*"psi" => "𝜓", # mathematical italic small psi italic*"omega" => "𝜔", # mathematical italic small omega italic*"partial" => "𝜕", # mathematical italic partial differential - italic*"varepsilon" => "𝜖", # mathematical italic epsilon symbol + italic*"epsilon" => "𝜖", # mathematical italic epsilon symbol italic*"vartheta" => "𝜗", # mathematical italic theta symbol italic*"varkappa" => "𝜘", # mathematical italic kappa symbol - italic*"varphi" => "𝜙", # mathematical italic phi symbol + italic*"phi" => "𝜙", # mathematical italic phi symbol italic*"varrho" => "𝜚", # mathematical italic rho symbol italic*"varpi" => "𝜛", # mathematical italic pi symbol bolditalic*"Alpha" => "𝜜", # mathematical bold italic capital alpha @@ -2373,7 +2379,7 @@ const latex_symbols = Dict( bolditalic*"beta" => "𝜷", # mathematical bold italic small beta bolditalic*"gamma" => "𝜸", # mathematical bold italic small gamma bolditalic*"delta" => "𝜹", # mathematical bold italic small delta - bolditalic*"epsilon" => "𝜺", # mathematical bold italic small epsilon + bolditalic*"varepsilon" => "𝜺", # mathematical bold italic small epsilon bolditalic*"zeta" => "𝜻", # mathematical bold italic small zeta bolditalic*"eta" => "𝜼", # mathematical bold italic small eta bolditalic*"theta" => "𝜽", # mathematical bold italic small theta @@ -2390,15 +2396,15 @@ const latex_symbols = Dict( bolditalic*"sigma" => "𝝈", # mathematical bold italic small sigma bolditalic*"tau" => "𝝉", # mathematical bold italic small tau bolditalic*"upsilon" => "𝝊", # mathematical bold italic small upsilon - bolditalic*"phi" => "𝝋", # mathematical bold italic small phi + bolditalic*"varphi" => "𝝋", # mathematical bold italic small phi bolditalic*"chi" => "𝝌", # mathematical bold italic small chi bolditalic*"psi" => "𝝍", # mathematical bold italic small psi bolditalic*"omega" => "𝝎", # mathematical bold italic small omega bolditalic*"partial" => "𝝏", # mathematical bold italic partial differential - bolditalic*"varepsilon" => "𝝐", # mathematical bold italic epsilon symbol + bolditalic*"epsilon" => "𝝐", # mathematical bold italic epsilon symbol bolditalic*"vartheta" => "𝝑", # mathematical bold italic theta symbol bolditalic*"varkappa" => "𝝒", # mathematical bold italic kappa symbol - bolditalic*"varphi" => "𝝓", # mathematical bold italic phi symbol + bolditalic*"phi" => "𝝓", # mathematical bold italic phi symbol bolditalic*"varrho" => "𝝔", # mathematical bold italic rho symbol bolditalic*"varpi" => "𝝕", # mathematical bold italic pi symbol boldsans*"Alpha" => "𝝖", # mathematical sans-serif bold capital alpha @@ -2431,7 +2437,7 @@ const latex_symbols = Dict( boldsans*"beta" => "𝝱", # mathematical sans-serif bold small beta boldsans*"gamma" => "𝝲", # mathematical sans-serif bold small gamma boldsans*"delta" => "𝝳", # mathematical sans-serif bold small delta - boldsans*"epsilon" => "𝝴", # mathematical sans-serif bold small epsilon + boldsans*"varepsilon" => "𝝴", # mathematical sans-serif bold small epsilon boldsans*"zeta" => "𝝵", # mathematical sans-serif bold small zeta boldsans*"eta" => "𝝶", # mathematical sans-serif bold small eta boldsans*"theta" => "𝝷", # mathematical sans-serif bold small theta @@ -2448,15 +2454,15 @@ const latex_symbols = Dict( boldsans*"sigma" => "𝞂", # mathematical sans-serif bold small sigma boldsans*"tau" => "𝞃", # mathematical sans-serif bold small tau boldsans*"upsilon" => "𝞄", # mathematical sans-serif bold small upsilon - boldsans*"phi" => "𝞅", # mathematical sans-serif bold small phi + boldsans*"varphi" => "𝞅", # mathematical sans-serif bold small phi boldsans*"chi" => "𝞆", # mathematical sans-serif bold small chi boldsans*"psi" => "𝞇", # mathematical sans-serif bold small psi boldsans*"omega" => "𝞈", # mathematical sans-serif bold small omega boldsans*"partial" => "𝞉", # mathematical sans-serif bold partial differential - boldsans*"varepsilon" => "𝞊", # mathematical sans-serif bold epsilon symbol + boldsans*"epsilon" => "𝞊", # mathematical sans-serif bold epsilon symbol boldsans*"vartheta" => "𝞋", # mathematical sans-serif bold theta symbol boldsans*"varkappa" => "𝞌", # mathematical sans-serif bold kappa symbol - boldsans*"varphi" => "𝞍", # mathematical sans-serif bold phi symbol + boldsans*"phi" => "𝞍", # mathematical sans-serif bold phi symbol boldsans*"varrho" => "𝞎", # mathematical sans-serif bold rho symbol boldsans*"varpi" => "𝞏", # mathematical sans-serif bold pi symbol bolditalicsans*"Alpha" => "𝞐", # mathematical sans-serif bold italic capital alpha @@ -2489,7 +2495,7 @@ const latex_symbols = Dict( bolditalicsans*"beta" => "𝞫", # mathematical sans-serif bold italic small beta bolditalicsans*"gamma" => "𝞬", # mathematical sans-serif bold italic small gamma bolditalicsans*"delta" => "𝞭", # mathematical sans-serif bold italic small delta - bolditalicsans*"epsilon" => "𝞮", # mathematical sans-serif bold italic small epsilon + bolditalicsans*"varepsilon" => "𝞮", # mathematical sans-serif bold italic small epsilon bolditalicsans*"zeta" => "𝞯", # mathematical sans-serif bold italic small zeta bolditalicsans*"eta" => "𝞰", # mathematical sans-serif bold italic small eta bolditalicsans*"theta" => "𝞱", # mathematical sans-serif bold italic small theta @@ -2506,15 +2512,15 @@ const latex_symbols = Dict( bolditalicsans*"sigma" => "𝞼", # mathematical sans-serif bold italic small sigma bolditalicsans*"tau" => "𝞽", # mathematical sans-serif bold italic small tau bolditalicsans*"upsilon" => "𝞾", # mathematical sans-serif bold italic small upsilon - bolditalicsans*"phi" => "𝞿", # mathematical sans-serif bold italic small phi + bolditalicsans*"varphi" => "𝞿", # mathematical sans-serif bold italic small phi bolditalicsans*"chi" => "𝟀", # mathematical sans-serif bold italic small chi bolditalicsans*"psi" => "𝟁", # mathematical sans-serif bold italic small psi bolditalicsans*"omega" => "𝟂", # mathematical sans-serif bold italic small omega bolditalicsans*"partial" => "𝟃", # mathematical sans-serif bold italic partial differential - bolditalicsans*"varepsilon" => "𝟄", # mathematical sans-serif bold italic epsilon symbol + bolditalicsans*"epsilon" => "𝟄", # mathematical sans-serif bold italic epsilon symbol bolditalicsans*"vartheta" => "𝟅", # mathematical sans-serif bold italic theta symbol bolditalicsans*"varkappa" => "𝟆", # mathematical sans-serif bold italic kappa symbol - bolditalicsans*"varphi" => "𝟇", # mathematical sans-serif bold italic phi symbol + bolditalicsans*"phi" => "𝟇", # mathematical sans-serif bold italic phi symbol bolditalicsans*"varrho" => "𝟈", # mathematical sans-serif bold italic rho symbol bolditalicsans*"varpi" => "𝟉", # mathematical sans-serif bold italic pi symbol bold*"Digamma" => "\U1d7ca", # mathematical bold capital digamma @@ -2575,7 +2581,6 @@ const latex_symbols = Dict( "\\leftouterjoin" => "⟕", # left outer join "\\rightouterjoin" => "⟖", # right outer join "\\fullouterjoin" => "⟗", # full outer join - "\\Join" => "⨝", # join "\\join" => "⨝", # join "\\underbar" => "̲", # combining low line "\\underleftrightarrow" => "͍", # underleftrightarrow accent @@ -2613,3 +2618,37 @@ const latex_symbols = Dict( "\\0/3" => "↉", # vulgar fraction zero thirds "\\1/4" => "¼", # vulgar fraction one quarter ) + + +# Canonical reverse mapping for symbols that have several completions (#39148). +# +# These duplicate mappings can be investigated with the folllowing commands: +#= +ls = REPL.REPLCompletions.latex_symbols; symbols = values(ls) +duplicates = [v for v in unique(symbols) if count(==(v), symbols) > 1] +[(v, REPL.symbol_latex(v)) => findall(==(v), ls) for v in duplicates] +=# +const symbols_latex_canonical = Dict( + "ð" => "\\dh", + "…" => "\\ldots", + "∅" => "\\emptyset", + "ℯ" => "\\euler", + "♀" => "\\female", + "≥" => "\\ge", + "⟺" => "\\iff", + "ℑ" => "\\Im", + "⟸" => "\\impliedby", + "⟹" => "\\implies", + "≤" => "\\le", + "⟦" => "\\llbracket", + "♂" => "\\male", + "∇" => "\\del", + "ℎ" => "\\planck", + "ℜ" => "\\Re", + "⟧" => "\\rrbracket", + "√" => "\\sqrt", + "̶" => "\\sout", + "→" => "\\to", + "ε" => "\\varepsilon", + "⊻" => "\\xor", +) diff --git a/stdlib/REPL/test/docview.jl b/stdlib/REPL/test/docview.jl index a5935a0426434..6f4ad569de082 100644 --- a/stdlib/REPL/test/docview.jl +++ b/stdlib/REPL/test/docview.jl @@ -1,7 +1,7 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license using Test -import REPL +import REPL, REPL.REPLCompletions import Markdown @testset "symbol completion" begin @@ -19,6 +19,11 @@ import Markdown Core.eval(Main, REPL.helpmode(buf, "ᵞ₁₂₃¹²³α")) String(take!(buf)) end, "\"ᵞ₁₂₃¹²³α\" can be typed by \\^gamma\\_123\\^123\\alpha\n") + + # Check that all symbols with several completions have a canonical mapping (#39148) + symbols = values(REPLCompletions.latex_symbols) + duplicates = [v for v in unique(symbols) if count(==(v), symbols) > 1] + @test all(duplicates .∈ Ref(keys(REPLCompletions.symbols_latex_canonical))) end @testset "Non-Markdown" begin From bea5e6e7a2c8013b1fedf889bf1a2663dd4c9445 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 15 Jan 2021 20:42:44 +0100 Subject: [PATCH 118/239] Update manual: Vararg{T,N} is not a type anymore (#39239) --- base/docs/basedocs.jl | 4 ++-- doc/src/manual/types.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index 8ce73667cf03c..1151d7423a018 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -2357,8 +2357,8 @@ kw"::" """ Vararg{T,N} -The last parameter of a tuple type [`Tuple`](@ref) can be the special type `Vararg`, which denotes any -number of trailing elements. The type `Vararg{T,N}` corresponds to exactly `N` elements of type `T`. +The last parameter of a tuple type [`Tuple`](@ref) can be the special value `Vararg`, which denotes any +number of trailing elements. `Vararg{T,N}` corresponds to exactly `N` elements of type `T`. Finally `Vararg{T}` corresponds to zero or more elements of type `T`. `Vararg` tuple types are used to represent the arguments accepted by varargs methods (see the section on [Varargs Functions](@ref) in the manual.) diff --git a/doc/src/manual/types.md b/doc/src/manual/types.md index 3753e00263a09..31ae3d7f26fe6 100644 --- a/doc/src/manual/types.md +++ b/doc/src/manual/types.md @@ -916,10 +916,11 @@ julia> isa(("1",1,2,3.0), mytupletype) false ``` -Notice that `Vararg{T}` corresponds to zero or more elements of type `T`. Vararg tuple types are +Moreover `Vararg{T}` corresponds to zero or more elements of type `T`. Vararg tuple types are used to represent the arguments accepted by varargs methods (see [Varargs Functions](@ref)). -The type `Vararg{T,N}` corresponds to exactly `N` elements of type `T`. `NTuple{N,T}` is a convenient +The special value `Vararg{T,N}` (when used as the last parameter of a tuple type) +corresponds to exactly `N` elements of type `T`. `NTuple{N,T}` is a convenient alias for `Tuple{Vararg{T,N}}`, i.e. a tuple type containing exactly `N` elements of type `T`. ### Named Tuple Types From 7647ab574fba6460877d0c1c571a86fdf18b5d31 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 15 Jan 2021 14:52:13 -0800 Subject: [PATCH 119/239] Use arch-independent magic number as start seed for Preferences hash (#39274) `Preferences.jl` is currently broken on 32-bit because hashing natively uses `UInt32`'s instead of `UInt64`'s. We allow `Preferences.jl` to polymorph to whichever it requires here, while eliminating a confusing large constant and simply starting from zero. --- base/loading.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/base/loading.jl b/base/loading.jl index cc0cd88a4b123..093e14e00e74e 100644 --- a/base/loading.jl +++ b/base/loading.jl @@ -1645,9 +1645,10 @@ function get_preferences(uuid::UUID) end function get_preferences_hash(uuid::Union{UUID, Nothing}, prefs_list::Vector{String}) - # Start from the "null" hash - h = UInt64(0x6e65726566657250) - uuid === nothing && return h + # Start from a predictable hash point to ensure that the same preferences always + # hash to the same value, modulo changes in how Dictionaries are hashed. + h = UInt(0) + uuid === nothing && return UInt64(h) # Load the preferences prefs = get_preferences(uuid) @@ -1659,7 +1660,8 @@ function get_preferences_hash(uuid::Union{UUID, Nothing}, prefs_list::Vector{Str h = hash(prefs_name, h) end end - return h + # We always return a `UInt64` so that our serialization format is stable + return UInt64(h) end get_preferences_hash(m::Module, prefs_list::Vector{String}) = get_preferences_hash(PkgId(m).uuid, prefs_list) From 6416a3e9196a5aac351fbd7ab997e67c28010b7a Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Fri, 15 Jan 2021 19:05:44 -0500 Subject: [PATCH 120/239] Correct mbedtls-cmake-findpy.patch whitespace. mbedtls-cmake-findpy.patch lacks some whitespace that exists in the target file, which causes patch application failure when the patch tool is strict about whitespace. This teensy diff makes the patch's whitespace strictly match that in the target file. --- deps/patches/mbedtls-cmake-findpy.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/patches/mbedtls-cmake-findpy.patch b/deps/patches/mbedtls-cmake-findpy.patch index 0b66a8b2ac1d7..ddbb1fc2f4aa7 100644 --- a/deps/patches/mbedtls-cmake-findpy.patch +++ b/deps/patches/mbedtls-cmake-findpy.patch @@ -19,5 +19,5 @@ index 8833246..2ed55ed 100644 +cmake_policy(SET CMP0012 NEW) + if(TEST_CPP) - project("mbed TLS" C CXX) + project("mbed TLS" C CXX) else() From 26a721b28ad56c006957ee1f2de083befcfe7904 Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Sun, 17 Jan 2021 03:18:51 -0500 Subject: [PATCH 121/239] Prepend build_bindir to LLVM_CONFIG_PATH_FIX rather than append (#39275) --- Make.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Make.inc b/Make.inc index 5799544bf82e3..30b454a6a103b 100644 --- a/Make.inc +++ b/Make.inc @@ -1043,7 +1043,7 @@ endif # SYSTEM_LLVM # Windows builds need a little help finding the LLVM libraries for llvm-config LLVM_CONFIG_PATH_FIX := ifeq ($(OS),WINNT) -LLVM_CONFIG_PATH_FIX := PATH="$(PATH):$(build_bindir)" +LLVM_CONFIG_PATH_FIX := PATH="$(build_bindir):$(PATH)" endif ifeq ($(BUILD_OS),$(OS)) From e6cbfdae16212b1d4346f8ac44ce2611262e9fad Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 18 Jan 2021 14:01:55 +0100 Subject: [PATCH 122/239] quote bindings with spaces in doc search (#39273) --- stdlib/REPL/src/docview.jl | 15 +++++++++++---- stdlib/REPL/test/docview.jl | 9 +++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index 042d11a627861..dbdfaa3d0dd1a 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -247,7 +247,8 @@ function summarize(binding::Binding, sig) if defined(binding) summarize(io, resolve(binding), binding) else - println(io, "Binding `", binding, "` does not exist.") + quot = any(isspace, sprint(print, binding)) ? "'" : "" + println(io, "Binding ", quot, "`", binding, "`", quot, " does not exist.") end md = Markdown.parse(seekstart(io)) # Save metadata in the generated markdown. @@ -311,17 +312,23 @@ end # repl search and completions for help + +quote_spaces(x) = any(isspace, x) ? "'" * x * "'" : x + function repl_search(io::IO, s::Union{Symbol,String}) pre = "search:" print(io, pre) - printmatches(io, s, doc_completions(s), cols = _displaysize(io)[2] - length(pre)) + printmatches(io, s, map(quote_spaces, doc_completions(s)), cols = _displaysize(io)[2] - length(pre)) println(io, "\n") end repl_search(s) = repl_search(stdout, s) function repl_corrections(io::IO, s) print(io, "Couldn't find ") - printstyled(io, s, '\n', color=:cyan) + quot = any(isspace, s) ? "'" : "" + print(io, quot) + printstyled(io, s, color=:cyan) + print(io, quot, '\n') print_correction(io, s) end repl_corrections(s) = repl_corrections(stdout, s) @@ -627,7 +634,7 @@ end print_joined_cols(args...; cols::Int = _displaysize(stdout)[2]) = print_joined_cols(stdout, args...; cols=cols) function print_correction(io::IO, word::String) - cors = levsort(word, accessible(Main)) + cors = map(quote_spaces, levsort(word, accessible(Main))) pre = "Perhaps you meant " print(io, pre) print_joined_cols(io, cors, ", ", " or "; cols = _displaysize(io)[2] - length(pre)) diff --git a/stdlib/REPL/test/docview.jl b/stdlib/REPL/test/docview.jl index 6f4ad569de082..5001a981a35f8 100644 --- a/stdlib/REPL/test/docview.jl +++ b/stdlib/REPL/test/docview.jl @@ -26,6 +26,15 @@ import Markdown @test all(duplicates .∈ Ref(keys(REPLCompletions.symbols_latex_canonical))) end +@testset "quoting in doc search" begin + str = let buf = IOBuffer() + Core.eval(Main, REPL.helpmode(buf, "mutable s")) + String(take!(buf)) + end + @test occursin("'mutable struct'", str) + @test occursin("Couldn't find 'mutable s'", str) +end + @testset "Non-Markdown" begin # https://github.com/JuliaLang/julia/issues/37765 @test isa(REPL.insert_hlines(IOBuffer(), Markdown.Text("foo")), Markdown.Text) From 642a88cdea04b8aeeb15dfb8be09b184351680e8 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Mon, 18 Jan 2021 14:02:27 +0100 Subject: [PATCH 123/239] quote task_local_storage in docstrings (#39306) Without the quoting, several terminals render the string as ``` help?> Test.push_testset push_testset(ts::AbstractTestSet) Adds the test set to the tasklocalstorage. ``` with the word `local` being underlined. --- stdlib/Test/src/Test.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index a9343a896c68f..c2332c67d58c7 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1302,7 +1302,7 @@ end """ push_testset(ts::AbstractTestSet) -Adds the test set to the task_local_storage. +Adds the test set to the `task_local_storage`. """ function push_testset(ts::AbstractTestSet) testsets = get(task_local_storage(), :__BASETESTNEXT__, AbstractTestSet[]) @@ -1313,7 +1313,7 @@ end """ pop_testset() -Pops the last test set added to the task_local_storage. If there are no +Pops the last test set added to the `task_local_storage`. If there are no active test sets, returns the fallback default test set. """ function pop_testset() From 29f2f896363c43a9d01758b75e2b2b5882d8ba80 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 18 Jan 2021 13:50:49 -0500 Subject: [PATCH 124/239] aotcompile: avoid cache lookup when disallowed (#39265) Fix #38548 --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 70daecb6fb61e..a4ffb0a760e5e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4620,7 +4620,7 @@ static Function *emit_tojlinvoke(jl_code_instance_t *codeinst, Module *M, jl_cod ctx.builder.SetInsertPoint(b0); Function *theFunc; Value *theFarg; - if (codeinst->invoke != NULL) { + if (params.cache && codeinst->invoke != NULL) { StringRef theFptrName = jl_ExecutionEngine->getFunctionAtAddress((uintptr_t)codeinst->invoke, codeinst); theFunc = cast( M->getOrInsertFunction(theFptrName, jlinvoke_func->_type(jl_LLVMContext)).getCallee()); From 6848da28d505dbd858ec4bcb093cbd8ddb0fd937 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 14 Jan 2021 16:03:03 -0500 Subject: [PATCH 125/239] [LLVM] Adjust patch list for LLVM 11.0.1 --- deps/llvm.mk | 8 ++ deps/patches/llvm-11-D94813-mergeicmps.patch | 111 ++++++++++++++++++ .../llvm-11-D94828-ppc-half-fpconv.patch | 102 ++++++++++++++++ 3 files changed, 221 insertions(+) create mode 100644 deps/patches/llvm-11-D94813-mergeicmps.patch create mode 100644 deps/patches/llvm-11-D94828-ppc-half-fpconv.patch diff --git a/deps/llvm.mk b/deps/llvm.mk index f97438dcf847d..96a9812441ad1 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -513,7 +513,9 @@ $(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLV endif # LLVM_VER 10.0 ifeq ($(LLVM_VER_SHORT),11.0) +ifeq ($(LLVM_VER_PATCH), 0) $(eval $(call LLVM_PATCH,llvm-D27629-AArch64-large_model_6.0.1)) # remove for LLVM 12 +endif # LLVM_VER 11.0.0 $(eval $(call LLVM_PATCH,llvm8-D34078-vectorize-fdiv)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-7.0-D44650)) # replaced by D90969 for LLVM 12 $(eval $(call LLVM_PATCH,llvm-6.0-DISABLE_ABI_CHECKS)) # Needs upstreaming @@ -523,13 +525,17 @@ $(eval $(call LLVM_PATCH,llvm-11-D75072-SCEV-add-type)) $(eval $(call LLVM_PATCH,llvm-julia-tsan-custom-as)) $(eval $(call LLVM_PATCH,llvm-D80101)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-D84031)) # remove for LLVM 12 +ifeq ($(LLVM_VER_PATCH), 0) $(eval $(call LLVM_PATCH,llvm-10-D85553)) # remove for LLVM 12 +endif # LLVM_VER 11.0.0 $(eval $(call LLVM_PATCH,llvm-10-unique_function_clang-sa)) # Needs upstreaming ifeq ($(BUILD_LLVM_CLANG),1) $(eval $(call LLVM_PATCH,llvm-D88630-clang-cmake)) endif +ifeq ($(LLVM_VER_PATCH), 0) $(eval $(call LLVM_PATCH,llvm-11-D85313-debuginfo-empty-arange)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-D90722-rtdyld-absolute-relocs)) # remove for LLVM 12 +endif # LLVM_VER 11.0.0 $(eval $(call LLVM_PATCH,llvm-invalid-addrspacecast-sink)) # upstreamed as D92210 $(eval $(call LLVM_PATCH,llvm-11-D92906-ppc-setjmp)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-PR48458-X86ISelDAGToDAG)) # remove for LLVM 12 @@ -538,6 +544,8 @@ $(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as)) $(eval $(call LLVM_PATCH,llvm-11-ppc-half-ctr)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-ppc-sp-from-bp)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12 +$(eval $(call LLVM_PATCH,llvm-11-D94828-ppc-half-fpconv)) +$(eval $(call LLVM_PATCH,llvm-11-D94813-mergeicmps)) endif # LLVM_VER 11.0 diff --git a/deps/patches/llvm-11-D94813-mergeicmps.patch b/deps/patches/llvm-11-D94813-mergeicmps.patch new file mode 100644 index 0000000000000..5eb98be41cbe5 --- /dev/null +++ b/deps/patches/llvm-11-D94813-mergeicmps.patch @@ -0,0 +1,111 @@ +From 5fda6724d697d428136266a61159a46c5da092f0 Mon Sep 17 00:00:00 2001 +From: Valentin Churavy +Date: Sat, 16 Jan 2021 17:36:09 -0500 +Subject: [PATCH] [MergeICmps] Don't merge icmps derived from pointers with + addressspaces + +IIUC we can't emit `memcmp` between pointers in addressspaces, +doing so will trigger an assertion since the signature of the memcmp +will not match it's arguments (https://bugs.llvm.org/show_bug.cgi?id=48661). + +This PR disables the attempt to merge icmps, +when the pointer is in an addressspace. + +Differential Revision: https://reviews.llvm.org/D94813 +--- + llvm/lib/Transforms/Scalar/MergeICmps.cpp | 4 ++ + .../Transforms/MergeICmps/addressspaces.ll | 67 +++++++++++++++++++ + 2 files changed, 71 insertions(+) + create mode 100644 llvm/test/Transforms/MergeICmps/addressspaces.ll + +diff --git llvm/lib/Transforms/Scalar/MergeICmps.cpp llvm/lib/Transforms/Scalar/MergeICmps.cpp +index 1559e7a41a7c..621c9e504398 100644 +--- llvm/lib/Transforms/Scalar/MergeICmps.cpp ++++ llvm/lib/Transforms/Scalar/MergeICmps.cpp +@@ -154,6 +154,10 @@ BCEAtom visitICmpLoadOperand(Value *const Val, BaseIdentifier &BaseId) { + return {}; + } + Value *const Addr = LoadI->getOperand(0); ++ if (Addr->getType()->getPointerAddressSpace() != 0) { ++ LLVM_DEBUG(dbgs() << "from non-zero AddressSpace\n"); ++ return {}; ++ } + auto *const GEP = dyn_cast(Addr); + if (!GEP) + return {}; +diff --git llvm/test/Transforms/MergeICmps/addressspaces.ll llvm/test/Transforms/MergeICmps/addressspaces.ll +new file mode 100644 +index 000000000000..9a74b4a5b2ca +--- /dev/null ++++ llvm/test/Transforms/MergeICmps/addressspaces.ll +@@ -0,0 +1,67 @@ ++; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ++; RUN: opt < %s -mergeicmps -S | FileCheck %s ++ ++source_filename = "==" ++target datalayout = "e-m:e-i64:64-n32:64" ++target triple = "powerpc64le-unknown-linux-gnu" ++ ++define void @juliaAS([2 x [5 x i64]] addrspace(11)* nocapture nonnull readonly align 8 dereferenceable(80) %0, [2 x [5 x i64]] addrspace(11)* nocapture nonnull readonly align 8 dereferenceable(80) %1) { ++; CHECK-LABEL: @juliaAS( ++; CHECK-NEXT: top: ++; CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP0:%.*]], i64 0, i64 1, i64 2 ++; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP0]], i64 0, i64 1, i64 3 ++; CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP0]], i64 0, i64 1, i64 4 ++; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP1:%.*]], i64 0, i64 1, i64 2 ++; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP1]], i64 0, i64 1, i64 3 ++; CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* [[TMP1]], i64 0, i64 1, i64 4 ++; CHECK-NEXT: [[TMP8:%.*]] = load i64, i64 addrspace(11)* [[TMP2]], align 8 ++; CHECK-NEXT: [[TMP9:%.*]] = load i64, i64 addrspace(11)* [[TMP5]], align 8 ++; CHECK-NEXT: [[DOTNOT17:%.*]] = icmp eq i64 [[TMP8]], [[TMP9]] ++; CHECK-NEXT: br i1 [[DOTNOT17]], label [[L70:%.*]], label [[L90:%.*]] ++; CHECK: L70: ++; CHECK-NEXT: [[TMP10:%.*]] = load i64, i64 addrspace(11)* [[TMP3]], align 8 ++; CHECK-NEXT: [[TMP11:%.*]] = load i64, i64 addrspace(11)* [[TMP6]], align 8 ++; CHECK-NEXT: [[DOTNOT18:%.*]] = icmp eq i64 [[TMP10]], [[TMP11]] ++; CHECK-NEXT: br i1 [[DOTNOT18]], label [[L74:%.*]], label [[L90]] ++; CHECK: L74: ++; CHECK-NEXT: [[TMP12:%.*]] = load i64, i64 addrspace(11)* [[TMP4]], align 8 ++; CHECK-NEXT: [[TMP13:%.*]] = load i64, i64 addrspace(11)* [[TMP7]], align 8 ++; CHECK-NEXT: [[DOTNOT19:%.*]] = icmp eq i64 [[TMP12]], [[TMP13]] ++; CHECK-NEXT: br label [[L90]] ++; CHECK: L90: ++; CHECK-NEXT: [[VALUE_PHI2_OFF0:%.*]] = phi i1 [ false, [[TOP:%.*]] ], [ [[DOTNOT19]], [[L74]] ], [ false, [[L70]] ] ++; CHECK-NEXT: ret void ++; ++top: ++ %2 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %0, i64 0, i64 1, i64 2 ++ %3 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %0, i64 0, i64 1, i64 3 ++ %4 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %0, i64 0, i64 1, i64 4 ++ %5 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %1, i64 0, i64 1, i64 2 ++ %6 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %1, i64 0, i64 1, i64 3 ++ %7 = getelementptr inbounds [2 x [5 x i64]], [2 x [5 x i64]] addrspace(11)* %1, i64 0, i64 1, i64 4 ++ %8 = load i64, i64 addrspace(11)* %2, align 8 ++ %9 = load i64, i64 addrspace(11)* %5, align 8 ++ %.not17 = icmp eq i64 %8, %9 ++ br i1 %.not17, label %L70, label %L90 ++ ++L70: ; preds = %top ++ %10 = load i64, i64 addrspace(11)* %3, align 8 ++ %11 = load i64, i64 addrspace(11)* %6, align 8 ++ %.not18 = icmp eq i64 %10, %11 ++ br i1 %.not18, label %L74, label %L90 ++ ++L74: ; preds = %L70 ++ %12 = load i64, i64 addrspace(11)* %4, align 8 ++ %13 = load i64, i64 addrspace(11)* %7, align 8 ++ %.not19 = icmp eq i64 %12, %13 ++ br label %L90 ++ ++L90: ; preds = %L74, %L70, %top ++ %value_phi2.off0 = phi i1 [ false, %top ], [ %.not19, %L74 ], [ false, %L70 ] ++ ret void ++} ++ ++!llvm.module.flags = !{!0} ++ ++!0 = !{i32 1, !"Debug Info Version", i32 3} ++ +-- +2.30.0 + diff --git a/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch b/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch new file mode 100644 index 0000000000000..9850d8fc9e68e --- /dev/null +++ b/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch @@ -0,0 +1,102 @@ +From 43b108a71d25d526a51c371cbc867ce5ae49ad8d Mon Sep 17 00:00:00 2001 +From: Valentin Churavy +Date: Fri, 15 Jan 2021 17:30:39 -0500 +Subject: [PATCH] [PowerPC] Disable CTR loops containing floating point + conversion on half-precision + +Follow-up on https://reviews.llvm.org/rG0a19fc3088f5 and fixes https://bugs.llvm.org/show_bug.cgi?id=48519 +for fpext and fptrunc. + +Differential Revision: https://reviews.llvm.org/D94828 +--- + .../Target/PowerPC/PPCTargetTransformInfo.cpp | 12 +++++ + llvm/test/CodeGen/PowerPC/pr48519.ll | 50 +++++++++++++++++++ + 2 files changed, 62 insertions(+) + +diff --git llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +index 71f867a617c8..614dc6746289 100644 +--- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp ++++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +@@ -677,6 +677,18 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, + } + } + ++ if (!ST->isISA3_0()) { ++ switch (J->getOpcode()) { ++ case Instruction::FPTrunc: ++ case Instruction::FPExt: { ++ CastInst *CI = cast(J); ++ if (CI->getSrcTy()->getScalarType()->isHalfTy() || ++ CI->getDestTy()->getScalarType()->isHalfTy()) ++ return true; ++ } ++ } ++ } ++ + for (Value *Operand : J->operands()) + if (memAddrUsesCTR(Operand, TM, Visited)) + return true; +diff --git llvm/test/CodeGen/PowerPC/pr48519.ll llvm/test/CodeGen/PowerPC/pr48519.ll +index 777874e91c26..85d42a1994e6 100644 +--- llvm/test/CodeGen/PowerPC/pr48519.ll ++++ llvm/test/CodeGen/PowerPC/pr48519.ll +@@ -49,6 +49,56 @@ pass.1: ; preds = %L139 + unreachable + } + ++define void @julia__hypot_17() { ++; CHECK-LABEL: julia__hypot_17: ++; CHECK: # %bb.0: # %top ++; CHECK-NEXT: mflr r0 ++; CHECK-NEXT: .cfi_def_cfa_offset 48 ++; CHECK-NEXT: .cfi_offset lr, 16 ++; CHECK-NEXT: .cfi_offset r30, -16 ++; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill ++; CHECK-NEXT: std r0, 16(r1) ++; CHECK-NEXT: stdu r1, -48(r1) ++; CHECK-NEXT: li r30, 3 ++; CHECK-NEXT: .p2align 5 ++; CHECK-NEXT: .LBB1_1: # %L57 ++; CHECK-NEXT: # ++; CHECK-NEXT: addi r30, r30, -1 ++; CHECK-NEXT: cmpldi r30, 0 ++; CHECK-NEXT: beq cr0, .LBB1_3 ++; CHECK-NEXT: # %bb.2: # %L68 ++; CHECK-NEXT: # ++; CHECK-NEXT: lhz r3, 0(0) ++; CHECK-NEXT: bl __gnu_h2f_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: fcmpu cr0, f1, f1 ++; CHECK-NEXT: bun cr0, .LBB1_1 ++; CHECK-NEXT: .LBB1_3: # %L78 ++; CHECK-NEXT: addi r1, r1, 48 ++; CHECK-NEXT: ld r0, 16(r1) ++; CHECK-NEXT: ld r30, -16(r1) # 8-byte Folded Reload ++; CHECK-NEXT: mtlr r0 ++; CHECK-NEXT: blr ++top: ++ br label %L57 ++ ++L57: ; preds = %L68, %top ++ %value_phi117 = phi i64 [ %0, %L68 ], [ 2, %top ] ++ %exitcond = icmp eq i64 %value_phi117, 4 ++ br i1 %exitcond, label %L78, label %L68 ++ ++L68: ; preds = %L57 ++ %0 = add nuw nsw i64 %value_phi117, 1 ++ %1 = load half, half* null, align 2 ++ %2 = fpext half %1 to float ++ %3 = fcmp uno float %2, 0.000000e+00 ++ %4 = or i1 %3, false ++ br i1 %4, label %L57, label %L78 ++ ++L78: ; preds = %L68, %L57 ++ ret void ++} ++ + ; Function Attrs: nounwind readnone speculatable willreturn + declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64, i64) #0 + +-- +2.30.0 + From 21068979f19801140b557647860b7dafe6689906 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 17 Jan 2021 16:17:14 -0500 Subject: [PATCH 126/239] [LLVM] Upgrade LLVM to 11.0.1 --- deps/Versions.make | 8 +- deps/checksums/clang | 116 +++--- deps/checksums/clang-11.0.1.src.tar.xz/md5 | 1 + deps/checksums/clang-11.0.1.src.tar.xz/sha512 | 1 + .../compiler-rt-11.0.0.src.tar.xz/md5 | 1 - .../compiler-rt-11.0.0.src.tar.xz/sha512 | 1 - .../compiler-rt-11.0.1.src.tar.xz/md5 | 1 + .../compiler-rt-11.0.1.src.tar.xz/sha512 | 1 + deps/checksums/libcxx-11.0.1.src.tar.xz/md5 | 1 + .../checksums/libcxx-11.0.1.src.tar.xz/sha512 | 1 + deps/checksums/lldb-11.0.0.src.tar.xz/md5 | 1 - deps/checksums/lldb-11.0.0.src.tar.xz/sha512 | 1 - deps/checksums/lldb-11.0.1.src.tar.xz/md5 | 1 + deps/checksums/lldb-11.0.1.src.tar.xz/sha512 | 1 + deps/checksums/llvm | 354 +++++++++--------- stdlib/libLLVM_jll/Project.toml | 2 +- 16 files changed, 249 insertions(+), 243 deletions(-) create mode 100644 deps/checksums/clang-11.0.1.src.tar.xz/md5 create mode 100644 deps/checksums/clang-11.0.1.src.tar.xz/sha512 delete mode 100644 deps/checksums/compiler-rt-11.0.0.src.tar.xz/md5 delete mode 100644 deps/checksums/compiler-rt-11.0.0.src.tar.xz/sha512 create mode 100644 deps/checksums/compiler-rt-11.0.1.src.tar.xz/md5 create mode 100644 deps/checksums/compiler-rt-11.0.1.src.tar.xz/sha512 create mode 100644 deps/checksums/libcxx-11.0.1.src.tar.xz/md5 create mode 100644 deps/checksums/libcxx-11.0.1.src.tar.xz/sha512 delete mode 100644 deps/checksums/lldb-11.0.0.src.tar.xz/md5 delete mode 100644 deps/checksums/lldb-11.0.0.src.tar.xz/sha512 create mode 100644 deps/checksums/lldb-11.0.1.src.tar.xz/md5 create mode 100644 deps/checksums/lldb-11.0.1.src.tar.xz/sha512 diff --git a/deps/Versions.make b/deps/Versions.make index c46eb8e6c8a71..9fd9608fc1fa6 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 11.0.0+7 +CLANG_JLL_VER := 11.0.1+0 # DSFMT DSFMT_VER := 2.2.4 @@ -45,13 +45,13 @@ LIBUV_VER := 2 LIBUV_JLL_NAME := LibUV # LLVM -LLVM_VER := 11.0.0 -LLVM_ASSERT_JLL_VER := 11.0.0+7 +LLVM_VER := 11.0.1 +LLVM_ASSERT_JLL_VER := 11.0.1+0 LLVM_JLL_NAME := libLLVM # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM -LLVM_TOOLS_JLL_VER := 11.0.0+7 +LLVM_TOOLS_JLL_VER := 11.0.1+0 # MbedTLS MBEDTLS_VER := 2.24.0 diff --git a/deps/checksums/clang b/deps/checksums/clang index 1ba74208abaf6..e8925bc759262 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/523880d02dd53ff48b6b6097f0abc7cf -Clang.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/dd9c418d7c014d45ddd79292cb4d8764eaeda29a7fd2818dad5c31fe8a3eb9fcb672872ec48c2bd8a5d46bdef1b83c95ea518a6ebc71621099e61af95cf6118d -Clang.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/ff239626d87fb287096014d4efbbab11 -Clang.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/666dc827aecb82c7b44b941805f84cfc68b3bb29a5b4ce7a55ec42ec08e05da3e29c7d894d1d7da01d10344c1303d5bd2609d93498771523d2bdfb6cdcd6f6c9 -Clang.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/2363604f41e5ca6100535c80dc3b80f1 -Clang.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/e80f5e8d27eeb9202c7e239bc0e8a28ba17d013d2785a1a6a196fe62e1f649a49e77c395e7f95c8c006b4442c89ce9ea6d24e31b764baf8805e9387f369fc2e2 -Clang.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/db2dc0ea38e3f7ce34ffbbffb21e09b5 -Clang.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/96e915e59f0dfcdc19d8926549e34c4840aa9e21a9405d66cb031de13cc2f3b77fc628b1fe0d7dda444310cb8e2325ce3054bbbd6797d86046527d65d71a0e8e -Clang.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/7e79d95f9bb4f102d2f764feaede6810 -Clang.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/ef84544b2ab136c7ce513e119c2425eda1393046e5fabad17e5eca5347e1f14392a2f91a0ae7ddc67c3bd0f85cf7f9eebcca447d76dbccb0e239e57fea35263d -Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/46ca009704fd5625d8b8f7ff4fbc0e8d -Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/7a62022d55fe926e09ec25accd0d7e89b9125213b1d8a831d91be325f1f48b806b0075797d8696122750070f012b1bedb1ead297a807739c44670125a7892d1f -Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/01159dd8a103a601f1f3c931ab8c0cf1 -Clang.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/86ba3017d3d7921b665bf80d0a6b8fb84a5448fcd4dfbe274893d34d5601df06a6c36e4f76bf6afc550e140e96000d0ef8889bca868359b8478aeef12b35cae6 -Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/8354574eaa55d53176e811b6a0737357 -Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/546970a1e94a62d498bf1236324274231da8b226d579f46b1e82b3a80ad2f3b16307e26d7f695f799e35dc56998e178452322e5eb4224f6de9824abc975a6d90 -Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/7cfdc62a2cd74a11b12535982e24c186 -Clang.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/571d757442c85466d90d340af0b78c263b3aa5b99033c9efb0f8af344b65a1e2bd2e1f76801214804146b93d6c4a48362225e9dcb40633a8167ef78e1873b491 -Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/555fb0382e5717d5a5e38a76a1e1aa9b -Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/19541d1a3258ca81b1d838f555522d13df09539735c7a865d8f58d8b34e6ed10691a144d9b8b08af56590ed7a880342d16b657a14f65066bfba3ab6f2491d3bd -Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/13938301261315065b1395a414e889a2 -Clang.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/0f211ac82d2ccfaed7e6f52eee88b740feb7dc3dc99d3ef1727bf409112024f4bee07665d67336c918fb06d6d7db29956f931fb81bb014e6a5ae1261c8d1b397 -Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/2a1cbbad08d19b3af00003613b0ee7fa -Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/5136f28a19e8307182f39f35fb7a722f6b8b71761e7276243f35aa010e0d9e3449e332b164bd4d603bdf4e48cb4980c5dd97fb805741d348bd4269343a36cd0f -Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c25d1cc28abe4a559f5e4e89fc459013 -Clang.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/26a4342352e0afef5470e42239a51ee7e5c82d6157a1cca21873f53c0c49c0f47e0a0baa57669f7617fce8d56cce7ad039f79fd0f1c3a57242f9f09f47a3fe51 -Clang.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/9e48cac26e0cb5a6c703540c781f2f98 -Clang.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/c1d9e2edcffc57864a6e1848fdd7e5fc562d905adca18573dcb1d4ecd148438de69286dad7e611f3655ab8380857ad58ea1097c54fd439e4714cac19000addf1 -Clang.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/e6600376f1b17bb9309cdc79e32ccc72 -Clang.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/17553e379ac4ecee37f319f0bd8e439fa69875dbafe455835f2c7a89cf7140b894793789b53d3759f3ab6bf712fb0c9ce0ecf9426f2d86bbcb7df13959faad82 -Clang.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/f9008d7ba18a29fcfef6fcb8bf48bbaa -Clang.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/41c72c035309aaa6df1a9594d83bf5cf8901948636e54c84aa127021f552a8b86e1a404c3445fe9a06a6120f01169a95fde412dfbd0a7909621ecdccdc653019 -Clang.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/cbafab459452e990975508e33f64752c -Clang.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/9ffbf81a5b53be8ccb123e3be7fb1f2b9388a6a659a07206808acf5b2dde3036b60d56a015ef338889af35169f49ea32e2a5b8e6da3d140d035ee0f0d5cb033a -Clang.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/a0ac9cb46e3646e636c5683b453c3329 -Clang.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/be55a815c8670a2b6590878607bb42a4a7d288a80233df0a293ce0a83880d3b4e3e92597387472aa4abc29bd6713c7abb74cba46d009431f1ea733dfa0af5609 -Clang.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/ba3d5a5e5ebf015683f2ab564343b3bb -Clang.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/f8b5f526b10c52b3933a9d8ae138d101e4f085aa910061c88264e18e24d2464c80c30814cf8a5523bac355ff257886aa6252836ebf728fbcafbe00517caff9e1 -Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/fa123dfff222c59c0398811fa7e456c7 -Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/2a9362578675c3e4aaca9db4246b07e3e3fe14f001d83f0829e2818032a2e769d85790552fa953838db613f1592e648f59830625d97e634b4b67dcc3ad6218e0 -Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/90e3dc34b0f8dfc06a3191e6d1ae8db6 -Clang.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/b298d29f58ed0e90e2cdfec9a3eef31f750901c7ad74d5d8dfaceeb5526ae57ad1f9bea4734e5ea4a00735ad60ad5d54bce5905bbe392a0141d43e1ba1835280 -Clang.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/8cf8ff4b08b20d011b07e8305542ba93 -Clang.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/ea79289ae1ee2c3e55890987d9c797e937cfcf99e2d539c75ef0ed03d58d717cee646ebddc836577e5f7aa027e1e269777e5bc65a57b8ca3e045cedcee98c271 -Clang.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/1b69ca77c58e4902021aca003d9b8aaf -Clang.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/59bd34bcc503c13629bb34f4caa82cadd231a24b8dcecdc9074c7ef7314df0fadd812043ad009d473c9e4203d0123edd0dcb65f772dffdfdf72f724b7bbb0a98 -Clang.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/827d64ffd271dbb4df2145ad3da088bf -Clang.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/ea3aa9fa2d6e21f7fbf7911122b1b3058eedc0786d4fac0a42ca830b182fc302e74d28bb8cd90c0bea7040e08c7a222d5af1dfce9447ee1a0203fdd5141f543e -Clang.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/e59693783f954d2270fb6efd669a71ef -Clang.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/48d482d698f053201c176c9baaba1ace7e709dbbf1d5b92081e7797ecee8e9ca1ae29612e39430acf157bb83dcdde9c585a6f57734150f0723c9fd55c6bb7d28 -Clang.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/1054ef293fb51478dfb24a93cafc0649 -Clang.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/34d2a6da6bf0c0aae04c67cf357d1a3f262077114371330e78bbbdacacdb62034bb2a3a86b19b1ef32d21dc0c4377c843795680b4e3acc43b4ae7e58ded205d7 -Clang.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/dce990d18f508d88bfba165e4b920db1 -Clang.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/1c66e54443e666e51e78c660035071f764a09e5711c6050b8fa996d655e370ad92c99ecbc092c90e633746c31bf230064ee159d23cb5456d15997284c2fa4708 -Clang.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/e46ae1de76b9251fb85d048614a90f72 -Clang.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/60131aa6851dc8cad5fa2243ec1f39172c714f9ac747b7e197f5c55c8dcde2f2f295912a260f31492a46824ad03664cc919ed78dd9e458d6b7a31f82409cc3cf -Clang.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/36db61088ea830bf0f8859aecabceb41 -Clang.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/4b0df5f10612d5d2e2ab971289038a3800debc729d06c17b0f8ced9a9128919df6ebb76ecfd5d4912b74d56df62bd6c4cd6cc0147105a22d3ee654740ce8c40c +Clang.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/f01b3fb362068c230bfe65b07a55bd3f +Clang.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/5cccc6e042f5c435bd7e25535651c6803b078dc1ebb49a2f653a928870bf686ff2b8963f80d6b2f553da6d23d3e168c24273bee9b6aa4391bbce7a681065a1aa +Clang.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/4e67174cebead479bd89b3390debaf5e +Clang.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/1449fc2ee161d5d81ec125b9e93089fe0c9cb519fc44738a7867b717ab26d53dcf4dc2ae93cf08df3470f7c3c1209671a4f9540a32ac7525427c12b724898aed +Clang.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/9c8ad928aa8fbb9c27da41dfc9f6355c +Clang.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/9f32c67064e8a4bccbfce02a9214fafaba9ad7043bfac59edb2ece5ef08864cea4e516179bcb1331178a6aa7449b6d22b556b3a3bc295d819e10a0885102ef72 +Clang.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/585a30e5a5a68f92f154574e5f2086e3 +Clang.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/fd8c7131c4e288f092840feda0e7b20feabdbece45abca0fa7ce3161ce6579dbc839097a635686012f26aff0a860bfaa593c296066d062f0bec4ec3872b2126f +Clang.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f1cdb2be71d8c16ab8f7850261890070 +Clang.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/4f44dacc01a3a39cf7c0efcdfa6704bec75ca38b93971d336bcdabfddb7fd39a1d7dd6c4b8574b8190ef03507cd8990352bfb524d6df9af82c5a6083b38321c0 +Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/7f58048db2e5095a5fb797f58f804430 +Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/2712637e3cb38bf74d1695ec84478e6c76aaa8d52bd000f81a4e4e73771d6c2b008ed17e94154588310cd51378d43a6f158b51645cfc75e665bbe84c488adc3f +Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/1299a67b65ec7a1adc2b327c6e5a4195 +Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/5d9fe1fa151fc065c38525a880ee1993c53f049717475cf473b67c6a8c44021f1bc6add29fe6c1ab196a66b524647c5dabb1bd336651bea2a2a7910a668fb096 +Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/a51f767667e7be8d0ead7c5b4f58656e +Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/2ea5218cbec3e4d1aa61c182451e8717f0295b9be221462fe24bb24dbd503c82051156420d090003b49b2454baf2f171e5e8d5011b3643c4153025474738f043 +Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/6ce5593f191da26b58a84844d6834af6 +Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/b07d9546db5105eb60010fcd21476be625e4bf5d5804dddc53a242363ddb93f0dbc1e2de67fb91c545000c38c197eabb0db219acc293e2e175eb95866527b4f8 +Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/5beac00e4c5755c14f66656470a2d91a +Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/d98d516724d4d6ecf5c7c6f6e4e64ba333af91949a14661a60318ab1f48a50f54923f9e9071578e447a0744b8ffba2e468591f92373c0d5cfc202ada4283e2e1 +Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/1bf95e16121bf4ef7ab7534ec2906e8d +Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/922b45b33f316d41ba6b089c30ba0606a26a58cac341e32db37c3565b711d74d43b9b6e6e2db64b307300f6f9b1613bdc69e8b85a47605474b34b2eb5132db65 +Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/3905ff26b1ba349bfed10036cfadc8b2 +Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/209b8087ba26cdaffe6d5f379f7dda00d32fabaf914139067728fabef7788ecd54b39a298ce9191ec45ff708a109e99add41d7953a1e9c4c0ddadff204df4a80 +Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/13c587485207dce3537b3349d4bfa33d +Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/d0bd627a6f6b23833c728ba50dc38f9a8b172202d3a581cb72da3ef8add6ce2a4d3dfdae10f8c4a694f4881c5c08d48e61ab6d426002651f5e9ebaf2c8167c76 +Clang.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/27d72e0c76e2269daa5db96d66640b10 +Clang.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/ab0ba11b03fc97c9b2817bfe43d6871e2eb201b14849ffac284eb49be02c9c5893d50bc89b48411de9d87b7267c1527f60b5995d81b1495afa3af473224cf216 +Clang.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/200d9bb6dac86649fc671467d2343585 +Clang.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/7808084dfe733577932f434cc5107a6f77cdc6f25e830928045f3ab8d9b8a75349aad0bbc337075d06b1492c84e3704dc922cd5006abafe3d10a197420952197 +Clang.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/41c1508f51f157d0df10a7f4ac901a17 +Clang.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/370202acb230a82a2b9613a984d22d0208aa7458d032b31d90a5cc04ed7afcaef3f704ae37910815ed090c4fec093dec0b90a10a0bbd2539c1dc0c5e564aa85c +Clang.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/d2a5fd3dc0feb4964383f425d6e00477 +Clang.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/0b7a442b2b87883e3b50996af7e114dee77d46ae898fcaa4e934da0ecfe3efd9603c5af433d61997c2722917937fb04c5c29cdb2ddd0f718375b8915636000e9 +Clang.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/a9af99fa1c6e7ab67dbb9f317ebe7431 +Clang.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/1fc204a2c1a6b5668d3e80b4226226f0cc301c70dc794030d32dbb9280b2010fddf3298158750a32c0ce1e40191e8fa2c036c1f4d3532888bcefffd8194bf64e +Clang.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/7ea67c2feed4e7227cd9079abb4b39d5 +Clang.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/f3926a8f9a6fce8198a31a5a221954c60cf3df28ded5b3683344b223ba8de769cb543de81f807bf09c3007b421e7c5c06a1aa6c36c4f3dcff5704caffc3c23bf +Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/e33c9f7503b25350ea757871b8b6dc92 +Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/6eb506361cd427ab9b7cb60458d26dba453bd2c152246391482028fb94643b4868a77fa34f8c59ef14150f17c32c29ec8ac50fcccb83511e5fe6154f4e172b6e +Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/1cce0a376b3b3ae764e153c70d0480b5 +Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d6685af43b0bffbd141e03ab7613b3a6431496b9734cba92025863cf0cad2d25d2baf4d6eb6aeaf342d0670389d45ccda5bfff6d3e859e65a0dffac17c11240c +Clang.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/4af3cbcfb1c0d352bc1e8f61ed108017 +Clang.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/9d20901febabcb06d87b706aabbc0aa7a0ebb173c4999b8708b590fa5113577bc93a4bce59f9cc0aa9078d3e35f4242424a6d949c21118a146484901297661e3 +Clang.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/e8c701382bf8e2d01ff79e5415a51875 +Clang.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/72187909227c7bcdb30c60655a53178af9b518c02a5ac5784bcf522ed536365da12054c3d16b7aa7e2a2d21f88b6b4fa1c54a66437ca221122859079409426ed +Clang.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/5d92dda365296697e88abd5996495b38 +Clang.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/6d2acf3bf2d2ba6e9d9c6351aa1e43d59528e89c5218bdf732ad4e475f4b4787d578055b863401a4573b7c88b76cf6787f76bc06d0a100ddd5908f31538752c6 +Clang.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/7b51ff2a6eb55c45bad712318a6aff5f +Clang.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/3d607531beeea0e46b0d2b5f0d6589a11f933fff1ed53b59758375efcce9a3dfe5513f57f242b85983a2b11205a797f9ee1e2033a17efe0ffa77e3286820efba +Clang.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/119345ed95b24b84cdbd272e575e3143 +Clang.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/8ea6a61d6275c15d47528a465fac3707159b37dd994c80da70712bc869b860417e26d71a99a8c09f91e7d274ddce4fcb27003c10058319efe75a592de40bad0b +Clang.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/9c1c8559ed4d0bb16194cc09cc2186ba +Clang.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/91522014a111180f86b7e0e026cce31836481f12136b9e3cfb196c1b769b389571f586d9528fc8834a6282f7eee72513f9f144aa519c5bdb37b4c0ae50627f77 +Clang.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/c68ddbca935a7edcb698a4a8582fcfd3 +Clang.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/892d9f55a4647d5f3b3a458647c2aa642ef931e10af253972ac344acd264c3be9cb0d7fab4e8b0249b606a98f43f9f95601fbf8dbcb7572a01422982d0e66d95 +Clang.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/16dae3d351001a49378c200f9990d7cb +Clang.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/8e29ae0d0d1747ca566f1c79736d2d53dd6b883ecada2561a613378d84d3e733d2946783f48a6ddb462cfe5676f1ee62369ae5e5cd68ba411f9fa43e5b541cc1 diff --git a/deps/checksums/clang-11.0.1.src.tar.xz/md5 b/deps/checksums/clang-11.0.1.src.tar.xz/md5 new file mode 100644 index 0000000000000..4c4b87aa1e2c7 --- /dev/null +++ b/deps/checksums/clang-11.0.1.src.tar.xz/md5 @@ -0,0 +1 @@ +b4cb0b74b1f3292a89c9720f3e1e2934 diff --git a/deps/checksums/clang-11.0.1.src.tar.xz/sha512 b/deps/checksums/clang-11.0.1.src.tar.xz/sha512 new file mode 100644 index 0000000000000..14b91b3162906 --- /dev/null +++ b/deps/checksums/clang-11.0.1.src.tar.xz/sha512 @@ -0,0 +1 @@ +bb98ffb0a992c9907795f7bb7492196f7195fdb5e292e8a764a7a1a8cc078dcf60bebf26ed3db116f78b7022a600c996fd2645e5f6e5d24e4ed99392e1f08df3 diff --git a/deps/checksums/compiler-rt-11.0.0.src.tar.xz/md5 b/deps/checksums/compiler-rt-11.0.0.src.tar.xz/md5 deleted file mode 100644 index a155272bad5a1..0000000000000 --- a/deps/checksums/compiler-rt-11.0.0.src.tar.xz/md5 +++ /dev/null @@ -1 +0,0 @@ -182511f9ba2c83b9d3c934501d48bee9 diff --git a/deps/checksums/compiler-rt-11.0.0.src.tar.xz/sha512 b/deps/checksums/compiler-rt-11.0.0.src.tar.xz/sha512 deleted file mode 100644 index 19cdcef20fcb2..0000000000000 --- a/deps/checksums/compiler-rt-11.0.0.src.tar.xz/sha512 +++ /dev/null @@ -1 +0,0 @@ -e2085753528670d300d49c4b2dd2991f78c36f356c40ba9da8918f141e6dd5dca8d91686466252829af936206e8c1219a69da2448691922a9e6624f6523ab0c7 diff --git a/deps/checksums/compiler-rt-11.0.1.src.tar.xz/md5 b/deps/checksums/compiler-rt-11.0.1.src.tar.xz/md5 new file mode 100644 index 0000000000000..0ad8aad90f820 --- /dev/null +++ b/deps/checksums/compiler-rt-11.0.1.src.tar.xz/md5 @@ -0,0 +1 @@ +29d6186e048936008512b8bbdb3a1b71 diff --git a/deps/checksums/compiler-rt-11.0.1.src.tar.xz/sha512 b/deps/checksums/compiler-rt-11.0.1.src.tar.xz/sha512 new file mode 100644 index 0000000000000..59f76a7d34acd --- /dev/null +++ b/deps/checksums/compiler-rt-11.0.1.src.tar.xz/sha512 @@ -0,0 +1 @@ +869208f0d2c5f0828a317a6006d4ce47a946b03db2692c8557485caddc56fbeb0335a87b4c9663aa0d1397de94337e56ae10f802c4aca443072962f728e2bdf4 diff --git a/deps/checksums/libcxx-11.0.1.src.tar.xz/md5 b/deps/checksums/libcxx-11.0.1.src.tar.xz/md5 new file mode 100644 index 0000000000000..5b905de3304cc --- /dev/null +++ b/deps/checksums/libcxx-11.0.1.src.tar.xz/md5 @@ -0,0 +1 @@ +4b2467eb023c9b4c84335808f811d5fa diff --git a/deps/checksums/libcxx-11.0.1.src.tar.xz/sha512 b/deps/checksums/libcxx-11.0.1.src.tar.xz/sha512 new file mode 100644 index 0000000000000..251c002b1e83d --- /dev/null +++ b/deps/checksums/libcxx-11.0.1.src.tar.xz/sha512 @@ -0,0 +1 @@ +adda227d412bc28a47612cc6580bf85353838792b4816633d8401efb92cd65f6801278941f779d301bd6162b75ef8d54825f9cdfb0f61c6f5f621eca7fb7c004 diff --git a/deps/checksums/lldb-11.0.0.src.tar.xz/md5 b/deps/checksums/lldb-11.0.0.src.tar.xz/md5 deleted file mode 100644 index 6b1dcc9ca61d6..0000000000000 --- a/deps/checksums/lldb-11.0.0.src.tar.xz/md5 +++ /dev/null @@ -1 +0,0 @@ -f36e38d039721555cd41e8687d577094 diff --git a/deps/checksums/lldb-11.0.0.src.tar.xz/sha512 b/deps/checksums/lldb-11.0.0.src.tar.xz/sha512 deleted file mode 100644 index 1c5d8b6b4021d..0000000000000 --- a/deps/checksums/lldb-11.0.0.src.tar.xz/sha512 +++ /dev/null @@ -1 +0,0 @@ -e781d70de2b59142779503df6078ff118e49a0f8053e9296c34251a4c3ddb9676b375a7a6f94de61e472209bba72d719744b143990d4fdaea722fd0997e99920 diff --git a/deps/checksums/lldb-11.0.1.src.tar.xz/md5 b/deps/checksums/lldb-11.0.1.src.tar.xz/md5 new file mode 100644 index 0000000000000..901bdea38188d --- /dev/null +++ b/deps/checksums/lldb-11.0.1.src.tar.xz/md5 @@ -0,0 +1 @@ +e49cde09adb5ed43a651e6d5bcb2aded diff --git a/deps/checksums/lldb-11.0.1.src.tar.xz/sha512 b/deps/checksums/lldb-11.0.1.src.tar.xz/sha512 new file mode 100644 index 0000000000000..16f939fb1007e --- /dev/null +++ b/deps/checksums/lldb-11.0.1.src.tar.xz/sha512 @@ -0,0 +1 @@ +05de84a0606becdabacb46fbc5cd67607ca47c22469da13470b76a96b96e6f34b3045fd1f5bed9c82228c2ce529562ee71667788a5048f079fef450d63a1557c diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 5189817e7f691..43d18317aad5a 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,176 +1,178 @@ -libLLVM_assert.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/01ce1fa1c844d25592a356960f107083 -libLLVM_assert.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/3c4a94b225a0a277f5587dc646d4cfa74c269d4411f1d08e5fec78ecf5adc2766d0382626e47d5ef375a1c817750e9bcc74655f29fcf6dc35e396882f05e43ec -libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/801e14ea4683c1aaea7471d3ab6d1cff -libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/5bc5733dbfb328b738c1bc12e0fe5d1beb6d5638ed68db590ac8e6f6904f7f4eeb11749202be34b6cb9edddd8fbabfadd8ee4b9bb7a7267cdf1e111b4910b56c -libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/0272cb3351dfb0d9b305c614f95d6b9c -libLLVM_assert.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/2bc95342c55a137290421837d0cffaa2b5e7c46b1ed02c01c5ae090bdfe67699d46f9e9cebe935b35edd64870c2174b810b175dd26a6c9d37a361feff9b3ab4a -libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/010c7b4819b3f62507f4d94da323b91b -libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/759ca60134f8ae44b4375f1756b9b830262efc2852479cc5dfe7222a7088958e1c34f6122a9bd038d5121a18d9fb5d60611fa7cdbdcd9c77c9a7a6c27bf725a5 -libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/795e01d60430cc4d94dfa4141fd4a95f -libLLVM_assert.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/da172e81b064dd758609efe3cd48dbc9e9967543cf94cac5f27b775df0ab87b787e2ea247092a16078d33407878bcc9ba2223b548d0fb84285113e92d03a9cd1 -libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/99bb6924aa6bf6e04f87fb96f50ea9fb -libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/1d2a5ac479915062bcb13ebad1e9040bc8fecdb54a4fd30aaa97a2ce10463cc2292677000e51dd8b3c2289c695f35f17a9864ebf4adc6c4702842c2cae8e0785 -libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/9fdd873c27109adbff52bdeb9774bacd -libLLVM_assert.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/c7aa34e102eb3941c55b9a207bf5c2af851ddc97e1a575a8f4a1f50102be2cf9e6f2ea4fc88e0d7fd29e440cb74bb9f805d91f813a5c1d91552c337af31af85f -libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/245d0d63afa7e81b924bb0a909e5ad4c -libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/b90259fb9afbc4d4ce7fdbc717d0321e72b8ae6e777d66960bb8754e57f1612438131e2061a0db5de78dc0aabc8a1ef5839e4ff2d80d263c1db2b949f28c5ceb -libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/8ef34cedadfc87d9bc81b72165fe3ffe -libLLVM_assert.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/1f2e7b12b788405a48eeecd4dc5999cd9ebeb7de2c19068a0809e7804ab6fa27f64307127dab0d5a34c368be967f86e4ec866310a9af30eef0bf4b9c0330a386 -libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/29d8daecf3254d31db7a92d069692cab -libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/6d217c278b80dc8f56730508aa6c93104f3bb6cc92d90c763c8403a17b107ce615bf320232d3fd6d439f76f0260da5c7bc34fb13b592f95b4113a6394b0d6ad7 -libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/4545a7d06bbeaf1b8061d7728107f222 -libLLVM_assert.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8c881b33ea364845bfe85757b70a11f8bd75bc5f79929ccd7b4f6a01ce2582ca0cd353abd8b61ae76202674211b9b8e18492ebd10bd94262536ceac53bfec625 -libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/7f23b6e002f429ce2805014686e4cbee -libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/232176e500d9c086ee2f30e2139f26b26956921bd76007f99433d18fe6007f15cdd6c72981527792e712d82f513cce510b7e0767136534613fa89f76e6e8dfac -libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/a33428d48938ffeb39568fb116590b09 -libLLVM_assert.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/53926f07da2f712fa75cc76decd8427c868297c5b2a7f82732caa36f406c8e0709adb1f5c5a5f3893bb1daf7dfb710716cb1d9d78ba94d5b2adf603fcc9df453 -libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/516255057a3dd18e010b9994c0fc7df0 -libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/3031b4655487b11fd65670af8b4362cadfc3240a1ebdd5aa4348b6db95c68e1dc312ccc6d2690ab147601d438b06fdb7283772136ad9f3e23f94df585a7c01fb -libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/c698bad624a1c0d0351a12089d2fab0d -libLLVM_assert.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/83d821bdd79b0fb3ff979969f3797aedd77c7fc7e8bc6c28b43584b208d62c2d1c8d655f934c17a52d6af112ca69f455636412132daf7b097d0c8e9034eac9ba -libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/c6f07ad0e28e80c8cdc4bb8ee0954e93 -libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/8998823d88f0b31a26b3733d17056f3411c7079b27acdcd19f43b7091368563756243ed796b4c24c9c5540ef9021ea04c874101145d1e22ee90dbecc4df88444 -libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/3cac3d493d67c65131e621eb7b5f9642 -libLLVM_assert.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/addbff3c4bd4f861fe8543b590df1c1e21f932e5fbfc077c998d6ee8aea4057e4ef5b2b3db22ccb35274d667c3e4f4cf93a80b4b25c3db815cd2afe6f1ae9bb7 -libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/3f28b8c02393b3df8dea1b4a60b5caa0 -libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/cdf973c9fc6eb4126b084d94a95328f0c11f5e321439b527afc964e16b9edc157096cdea6fe4cb65ad23b5962c1aff80cdcc865a3bcd7db2ba94f2850e7224bb -libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/6a50f7c21e1c26bd498e604d9e703218 -libLLVM_assert.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/6458830c94ca914a47ad68d42d4ad7ac36b0f04846e9fb6f8f0d71e1fc72d7e7d72489243b2d669a21a4a90cafc1762da51c6aaaa9bc88fad012f7fe2ae60ee8 -libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/344bb37464050981120df0c375535bbf -libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/ce3705a52d3c59b611d6a37b96cb3185054e99e9731b3792e460eb2844ba52d2c7bef6c83516ee40298cc54f8022e73f933d23d814b7ab4f07ed8ea486ff9eed -libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/9a380e07b9a85ae2adb9a322b6e4d77e -libLLVM_assert.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/29871da2a92d7ac001f92ff6233ce66fa2a6e61a3f6b6bbd00e0748dfd64ce0d95ef7213681384ca4de81979f573485ac2e22b849551aa60bf301d633b888a4c -libLLVM_assert.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/c324368a1703af17c6c57746a9453ed6 -libLLVM_assert.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/3422886200149d5e958ac75a1f7be4a982c19a8285e256bcc7c9c63e239856bee8d033c9e08695166720d7a9c3766d22d19afa2b8c2b7efb750b18b172a1a730 -libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/898b409fbd92540ec7d184b89acd0332 -libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/98898f24ac17486350292f5cc18ecb09059757c5bb18b61903608985cc2105a0172142b9469b27f07a92c1bee6dc22759cdbabc35762f0c1a5411902be76089c -libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/5d827bb566640cd95bdf63a0c893b26f -libLLVM_assert.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/0ab5a7ff7e647277bf1c019c5e3a7c7018cb2d1798c831c443529a0d1b010c730e442148d0ed943920b5592d1718b27f6493d7d3bac250c76d5a733a1f91c150 -libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/87df505a58117741ac66c3031a25c355 -libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/2cd8ab5c7c846ec8c8a1f35bce7cfa4fec12a349418e0cae88ee12262190d73b24926bcd1027dfbf7b961cb417d50edba3d2831949af3738b9c3dc2bb63036e8 -libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/a6714ae1f6cf77ddccac7fae3095ff16 -libLLVM_assert.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/3de3d48754e9c5f5ea50a005570963c175e87c83202c4924b41422d279194379076c4c42c8c59cd7a8257181fddbf0166658187474f409cc368f76e97994672e -libLLVM_assert.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/f573ad0488fe0560393fe8fb04d18a65 -libLLVM_assert.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/e8645df8a29f7e2d875839604ab7bd7f23d5118efd61838f3ce2f45aa784c0a6d11bdb0c9010d864c0f071c1fde1a9d5d868a59da8077d036cf3673452506d86 -libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/895c1fced30f8d6608b2741cb6fb6a01 -libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/1b7aefadaf9ec753f8579def68d0a21e45c53c98b86654f0f6c65612b4b1d6fd4721b852015ca2d8b4783c79cbdfbe11d139cac3fa49424c18499bf6b86fcf68 -libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/ccaeb2297dbc77f3f43b45ba8668e684 -libLLVM_assert.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/54691ed3a5169b945428efc3846b09e4e6d9d57fdc2c2cdbfe0f9839aca76471e6d0dd34f7adefa290290d9aabcc9c290808213e380931ba4c0d15c6b6140b62 -libLLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/3f1040e2f4d169b7218ac0e4029dc598 -libLLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/bcf9b831a95139e594a3ffdb07a9d63bcb51a53ab537615dd18c23e6da53dba6c1f60cca02b234ab99714c23b78ac0a2296d4d214347ffb95fabf09ead8f8e11 -libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/335c2df4b91c55abf929d063068f66b8 -libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/25bcbf83eb201e9e7e2dd93d2ddee9ca0d9fbcd5bf29b2b0b24ffc93421edaf219657e72fff904aa388d7b29f6e10adf224a17bc0fa4831687b301f238f01dee -libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/f90354ebedc8aa28cb0951427701e56b -libLLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/2bfffacbce7b5dd60313bf538440f9d5f8c7c44318d762a802a620e98da198bf3498b41fb772b519dea17b18efc5fa667a67c4981c91767886c544f62fe41759 -libLLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/5950047408876870ccf870800f365a1f -libLLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/871e067c84bf85b83cdbdff4abccb55d9438216332ca80a56c4db12d29e74b53d88de78f5618f64a32d56f7832697c6f3ee38eeabcf706f12fa058e5ce4c6704 -libLLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/094b76a377eded3e1b17b43abfde1932 -libLLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/0e632662bf268287cf3907e23ccdf4acb535c5215a188abc729d91feea68bc4e704f2bb083695018332fd5b4e0bdbf443069de0c0935a76a49aa02b94e939056 -libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/b562fe4058de0edb2b60facf35781242 -libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/c48a99071cd2ba317e9a1be3c3198eb7e655a072891ab2eed125c940002c7da951dc33bb14ff014b64fcc2eb8fe97caca3bf64bb3701ef3fe8bf2e0f2986a9e4 -libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/273b2202f93761ac464641f88fad7059 -libLLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/2963a2e35874726ebdf246a32814e0f5354eb5d2f62ec3f303924ab67d52b59e9bd73d03530b6a292b93e9bc3421ed9168a02aab4d6e6ff1cf25411cd03c7bb8 -libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/19e8437b5e99aed82703aeed8bb1755b -libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/745c5cbe14f05ebb422853d1d45c841b5bc5664d0199c5a37d677e992d97e3072c0604b337f27a04d6388fbb355b9347eca7a9d642e75121d461823fbceef999 -libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/576c2646143733f19d558dc05acf3d6a -libLLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/79e2ff48341a8542b4ef017dd4b2566821beff06c95df40701c2f3344a3948b7595cfb2cfc082eca76f7fd77463204590e58073ba87ff59b4b0a8c9df34b637c -libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/a14d1d1e6b45fb2cf533417c0b81a8fb -libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/2fe855985bd2b88beb35ecabae424f70781ce61aaf6314cc19da4b7bceea5b1dd1de4df2b893f5b8844bcb3794805bf9dd5e5d1acf61bf29c4d7912150101717 -libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/1fe456f1c826dbb0b47d74ad855ef459 -libLLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/583f794fb40d8216cd21133d0606591e7e2f0497d991dd449aa7101bbfd48608e63934940fb94df751ad782ba189b2549d5be5e1d74b26f90ecc8effc948d123 -libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/2860de0825c3a5bcfd809f45744562cb -libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e959f793f15b3181bea02cac927caf4ec242cef1a72ea3eb9363dce651549c5faae3f576b1a39980571279719115d89252d703c718a2e73a50125ac82a3a4cc4 -libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/c5de837cfd59f5baf08f0661cba2f667 -libLLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/68026ea3a3e77f91430e375645b1415c20e2d9b05c0a81b83b859759577295b17883c74eed97dc3df91a167e136f68577af2c978352b990f7f4e517df0b0bc30 -libLLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/b2348a8a03bc79d8c65689529f7a4516 -libLLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/92bb809cf50eda52cb3dd1b37ad221e930be0a05cf91cda567f25936c62f069ee05719fbf959876df45ef0270cb13668ceed983608d897c17dfdd57dab7fef55 -libLLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/acd3ff22681f11a0a5b254f7a55c6fb3 -libLLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/dddf6ae0eca7b1d275582920b115808fc8c22bf29035c0e0d4263c88a45cf7818eb96e8ec2ef482e3d293110a38d790ab0733e469944c5fa4b0441c5c9400c9f -libLLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/2a3921afb578c5fa25c1c6ddab97466f -libLLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/4ed9bcc03b5a45b9297375fffbaae58052834d278f17a90923d8e296f2d53c88c1c45e37473f53eae99cf3a8f7cdf829a5a98a99d20647db76784acaf44e7a11 -libLLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/97573e2ef4aedf50448e23d442c105de -libLLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/5654b86df97e7ef03c3543dfd3f5b3b60dc0906e7963bb758825c99eaff0f43a1edb2c6b8c6969f9cedf2f68833d18b20cc708452b628999cf7ae40438f575e5 -libLLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/2f57354ddae4d50ec4abce30d71f12fd -libLLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/29b8af9bc5188ec49e61fa413215c84209102137c9ba0325e598abac52c43b3cace43fc80971b96a447ab0393b883e25d8e489e865a1ebbd4913a76ff66b0a80 -libLLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/ed9cf691b651ed59e731f57545369086 -libLLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/926f9059283becfeef3fccd319229c09c11dde86f718a9610d204621225a1e09b88a9fb23d9ce2c4186133b1b71eb611f52571e63ae570bb3e55a7803949f202 -libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/0c9e9ce8bb846fee0e8e8bf5ee7cf3bf -libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/d804d538406b9aa0ab1b28993c0239d40dbf73267f68b5b195ddf96ba6477b4040764333c5fa1ce44b8010d9b2ecfc17dd9ac1bc00439e0c6a36488a1d925e9d -libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/d824e078349d3ae53fa4c6b5c2704dbe -libLLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/f9f22868335ce24c40663df2a87ab98c377b666905238fe15023d5a1e2446ecf5d12f88ad2e7268a858058aa9113f65cd3f02812715e7251f092a1e6767e3775 -libLLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/6faa07677a8d3b7c38eeadeeca0229e4 -libLLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/e93a6ea6ff3221b54014c684134bc35b1aded66775453c5ba0657a6e03e046eabcea435fc7db3a90a59cfbd6167bd27405c9c997fd2993e2faac164042973495 -libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/9d8b84a79a020c3b5bd118b340ca6417 -libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/824bd9ee3246cfb08cb065c3e8428ee9a1bd8907df672b3e2a65a23efda0765d9dcfc1cb10d12ac3a118d946dc29dce682f7d4cfdcea7bf4be5b37ab970515fe -libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/bb8a73c93efe36baa8fe6537b1dba82c -libLLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/81e69ffdf73ad6f14d99b496aec236c9e83684862415cc86d07d321716f8da590b27966b6ac28ebf62fe7acaae6fa4fb192ee76171a8b140dfed9e49fce2b21d -libLLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/dfb5e7eb0246f10e1a8a49d99c8e9145 -libLLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/645f79be4e7bbc67dc2bdb503e2ad41cf9e135b9e67ad07b8e33df0982917c4103dc0d70bc6305b313e5ba555af8c8f893af1f220720e6a0a1cc4faa545a4157 -libLLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/87f3f0707a0a2a2dbbf119000dc2621e -libLLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/9f23e1f7f097beb6066234fb854545754b6e5938c2092ef282cafeea3fae4903dbdc2e39e52030130e8137ea223367b1ed05557f1d08dd026c9e5c0c5db0b0af -libLLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/23d639edb45276d5b705122f180265b7 -libLLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/7b1d8d70a8718af421f86db049cd6264717dbe9cdd601ac317ae1c93323a790d1e4b7288f558d7e9b4509510132a166210ba1bf8c06652027d685f0ca05cea62 -libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/f61342c9ca2b75f5992680b3c748162d -libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/aae8a9c5b9d468b3a615e91bd411e2ed044684b10fbec7de5fcf4a469b6f18fb71c62b377c3b941e277a1f492d331ab4577d8814adfb29a12b25e8b7bd073bf0 -libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/173b0fafa2529b8b4f91e4aa731bb579 -libLLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/b74876bd713e319762fd02e6b13dac0bae72157329ce928eb8044105ba6b005a24e36d618cbb4fa59725ddef0bcc0dc64b24a4169d1ae76424665d5869ef63d8 -llvm-11.0.0.src.tar.xz/md5/85844102335b2e01b3c64b6734fb56f2 -llvm-11.0.0.src.tar.xz/sha512/b3e92091ac48772edc0c30801218ce646ef374e1968baab91df9005f58e11c3ce149b2c4c655c7001f8554fd337caa02c08783bc736153bf58f35fe008e624a4 -LLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/md5/dabe6f51ae4836191c3bffb3c13ac152 -LLVM.v11.0.0+7.aarch64-apple-darwin.tar.gz/sha512/251581327d59efa6a218f6923a1303fa45d71ac192c9602f9fb675b0140356b163319e98728f872616472a72c5edb0f5bbf72e00a440cbb208ee30264d507ed0 -LLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/md5/7914dca0f3d1cdd4ea3ffa684c5da2e2 -LLVM.v11.0.0+7.aarch64-linux-gnu-cxx03.tar.gz/sha512/3fcf719a85b6f6d28c53fa0348099953673499544a421fe60a3424b6bd022c1bea1fe57289a502069c31928eceaf6163ece1843cabeb3d1d4f497b1a37771185 -LLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/md5/6a12e330fca6a5dd6323aa0b2fc79def -LLVM.v11.0.0+7.aarch64-linux-gnu-cxx11.tar.gz/sha512/4ff85dcafcf00a8a903b855cbe1d55b04c56b939e7c7952dbd3c03a38edfe6e1ce97ba4d721e87d97d83c5e23771ddce4a1f21785a3c11acbaebded997a7cc33 -LLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/md5/74aff1550da6780325b5b511524bc44b -LLVM.v11.0.0+7.aarch64-linux-musl-cxx03.tar.gz/sha512/f88b785ef394e75b7b0d98c0f590a1966d9d4e13e6db38459af84ac8a99121312e5c649c2a85ed0414ff946c7812919909f79babe6f045fe986b31cb48d7f13b -LLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/md5/8109e6d08f4c0e81e301e2efe368ef88 -LLVM.v11.0.0+7.aarch64-linux-musl-cxx11.tar.gz/sha512/e59c42daa2d4fb17fe8036108d34d37f9df890eb0f8e9c0a216602f601edf164a0ee4d74b8bb85773435a3f901b08c9e4563f9fc9fe6104221f97adb40031b0d -LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/c15c20c86f35252e8f952f268976fada -LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/82afc8222a34cde051399ade2c187988c45fdfec86c1052611eec9a0374463e8ce156b336a0b82091b8c1f811fce01d0dcd0ae29a97c4cb5d6a513ffbca54a42 -LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/d6c1455fd8ac1d9605bc1c48614880ee -LLVM.v11.0.0+7.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/00a060d3f130fbfcefab34af50f2de72188cdaf54a2bc9dc90ebde2c685054a3763e86de83ae6872a959d1f5a915686a380cf171b2bc8721779ed000b606aa7c -LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/md5/5f841ebbe61e126e1ba1d92faef604d2 -LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/8b7643ec31aaf8a66c52db6d4489f56496a5cacfc725bcb36ca85b90e6b167e229282b4356c2c9ac7c4a5d5e533144ff7d09f7f653976aba74c8e8144db069e3 -LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/md5/d6b02c3c02ff21705110facf68fb48f6 -LLVM.v11.0.0+7.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/0283271705c46fe6ecf6943b7ef824beb8f34ddcd3c6c395f5ad67043c04119a00fc5ef6ed1ab0b3416ff604b9c2a68f8df48abe3b998233e56d8f17ebc1de45 -LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/b5e6936d7953b4032cf9b61779d3bffc -LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/3e90c7c81580f18a3e9cbc09b384215424c7b4e23cb0d012a6ac445ddfa71bbae725a92d9c11be0c2b332f66449dd8e9fbc0a63b9bedf5904190d32eae8b9d3a -LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/9bd755b395be340f32f89b9276e5a4c4 -LLVM.v11.0.0+7.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f8d3f98cb21a990b317728eefa33b0e0d5407f3bef2000013c6bc2c384d78cf5419f907a62a27b14c60e8b7666b86c1e012297bed9960bb2c0f737e101ca269b -LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/md5/076b24fc6b2777bda89add6239bd47d0 -LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/fe4df75f654c0847e62a1340a7933c40990151ee2245759936eab996db157cb61457fd90ac57381b01b2044dacb50c4b7502ceb42cd7c176445b020f128be6e7 -LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/md5/8a21cc45168ac7c506a95d4854237be1 -LLVM.v11.0.0+7.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/44c3e7c5e2c3b521f69d99a1d7e3246e45074d66bcd0b4bee5dd4d15a83e9fa602f0ce6c7a76a957df53205f4a7906cc7fa316078b064d4cf02550921dca3147 -LLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/md5/4c838d5ad65102afa9162a00f888bee6 -LLVM.v11.0.0+7.i686-linux-gnu-cxx03.tar.gz/sha512/cf65126d3d8c399476d84e98e6050d5a5481ffa745e931196c7663a72b40818918e64bc4aac584ab11e1ff15019286345e6e7ae460b0c4455da004d54f97fff2 -LLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/md5/8f245351d8e4a657752ca5d2f1f4a8d9 -LLVM.v11.0.0+7.i686-linux-gnu-cxx11.tar.gz/sha512/2d9b8c9932c5bd87ca4ab6b2937651e015a03629360a1d7368aa49a073315639e3794428d8986fbcc38a2f04746201032a59d002eb31fce7552458de8418ca20 -LLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/md5/9634c9ec4d8d72fdc89a6690fc3aed6a -LLVM.v11.0.0+7.i686-linux-musl-cxx03.tar.gz/sha512/44f7fe90cc7a158ff2dd63321076223c010343bcda1f773db41deee9a2d12f49efca3fcf00f272cf10249b43ab9dfe302f0c0a897e26176984bbbc3f507304f0 -LLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/md5/f0d4e03fcca7a034db1e60028a54f4ab -LLVM.v11.0.0+7.i686-linux-musl-cxx11.tar.gz/sha512/409cbe1e99caa320c9acfbb948550e058e96589363f7aceae5a17d88ee0d62f0e5e0f4396b7f2b0508f29568ea9c42f49e5df5f024115238651b6fb5709885ec -LLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/md5/c3fe268d3bf3bf7ef2afcf9a387f420f -LLVM.v11.0.0+7.i686-w64-mingw32-cxx03.tar.gz/sha512/cfeaf2ed294780eb4e008bae10202e77abcbae564eee2c53566320bce58305c20a6d7bbae63e37ce2b15bb177352e1f623434329319a7a6594110cc8a297c9ec -LLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/md5/6ee4ee2ed357585797fb95e6e5dff3b6 -LLVM.v11.0.0+7.i686-w64-mingw32-cxx11.tar.gz/sha512/cf5ce880b930fc2ce0d28597515cfbc203f20555398f5e79341e2be4e643da757a13aaf1b67ca16936a79c7c708194defdbfa8c011213363dadbd49a3f035554 -LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/md5/1b86cd0064df4872f45256702e799b06 -LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/062f49235357d5c4cda23050e13c5c0f3de643a8c4137f8e9b9cdae7a3a9ab31c7421e44ba5bab5902b92982c6a135c6a069583caf0409bc4960d9e68513d954 -LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/md5/467c91cdb61c35e2f769701393a27a3a -LLVM.v11.0.0+7.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/7bbd1f497b6b8edba056540084f09d367bcb245be8fe9fd6b6455d3847f77a61ca1c66cd9465a84a89d37e832f36a046ec6b9d815f8b511fddf952cdf43ccf96 -LLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/md5/06ec920a21a49168fe2e6315bf8e05ae -LLVM.v11.0.0+7.x86_64-apple-darwin.tar.gz/sha512/d8138dacc7dcd4e3cfb91bc09ec7cb4d446a94c3b056d685da4e3816d6b77c84937aa2a54417a6646738ea721ff90ad7b79989fc9e79ad55b5944618591d0a23 -LLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/md5/af22cb0dcf36d9a15b9d287dc090b09f -LLVM.v11.0.0+7.x86_64-linux-gnu-cxx03.tar.gz/sha512/befa06d0e2e455dc7b046b083ebf9b4a10771f2916f639ecd135f2c8628f0231a2ffeef5c6f777212363c435aefee05fcf61e93bf4eb0f8603569785121b1557 -LLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/md5/98d1f187020c958dbfc5be7f56810b3d -LLVM.v11.0.0+7.x86_64-linux-gnu-cxx11.tar.gz/sha512/55767a59047ef34832b08aa46765b819d53efc344b64d3096ff37f9d123d78e175c5e2b55cb49367732325a4c3da69b78e322f437f5bbc0eb01eab7b47b9a89d -LLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/md5/473515270f060d2f6c457dac599eb979 -LLVM.v11.0.0+7.x86_64-linux-musl-cxx03.tar.gz/sha512/b00071383cf6b7b6e4bfdc24be044b67aafec149dfab537275146b82d6de5fc3eecc2d5c3efc59de51caae83642db48b7694ad2f5ddd2e4c3a40257a56e511d0 -LLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/md5/502277dd5f359701e82cda7cc9c2e842 -LLVM.v11.0.0+7.x86_64-linux-musl-cxx11.tar.gz/sha512/58f140aa55946e288cf63bd6872489a5de3aac5a9af49c37e1d1ce451570f2de32a178ce431a948279170a6ad4ef251f78b72608b76fe2b72f6e2c6bc8e92187 -LLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/md5/5b4feb145bc572b52b731bd8c3811e47 -LLVM.v11.0.0+7.x86_64-unknown-freebsd.tar.gz/sha512/7defb7aefca9869926c6c54e5f51c8c8facc24d4aaed6dc27c6d9a8446fd0122ef5117de1b221011569fba033f0e7574de81a573f37277a8ef5235f8eeb539fb -LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/md5/f5cfcbcc59a8b053526d4abaf24c41eb -LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx03.tar.gz/sha512/7803b0c745c804b8fe3c66f997da59501bdf64f3ebe4606261807f5636a846e548ea3c3c265643fde4bc02573d40aeb14107a57cebb68976f02f3ad56fcabf92 -LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/md5/2634b59f0520f010ffcf51928d7db7c1 -LLVM.v11.0.0+7.x86_64-w64-mingw32-cxx11.tar.gz/sha512/1f16b61e1cbe64892c60597fd938a52d4e239a4b98834fb1e6f27a1d28df8b1278604f057798ef8e6f545bbc23b1c2dc85e3300e6905f2c1bbf2fdd0fe46b0e7 +libLLVM_assert.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/72cb73b4eb0420466ebccc0fea17a324 +libLLVM_assert.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/09f443cf3ea3daf81a650822e7277f4da5edfaf5c1f79b9456f503cb7d884855d5c23f7b25fd7674d66e7ae7892a1749ea7ab87893e99c568e718fc4596e4c33 +libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/b387f40172a505f48c06b04943e939a8 +libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/ca4b1ea26c6151c72c56f70be2cecea58ab5d9b2b793e0316a15c10ed25e3fafaa392219e508d7a21a33e0b1a7e172e70c1b0b9fc70693fc2409312675af2bbe +libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/5b65df008d5b6f824e5cf456cc6112df +libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/b0525756f8099bc44b50392bcce955909a8e784bd55de09a1bad445d9f079e34ea8fafc8c6992522edc8a19fc15b23318cce40ddb9b23191d300ff3554c0ee06 +libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/eaf292542f6c2f24f98563c7a25cb242 +libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/350a5158d6cd79039c45068fe26e5bc73343b184407f12442096a4e5f3549f70468ec7bb72d40bdfd69d945b8d3b75a280367c9fb7fce13012d5fe5d07802b9b +libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f25d713fd86eebd93e5ad4cb049b1569 +libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/a536a5bb3c23b8f1a76d8eaced4842b711ecae820ce38dbe0e0ac7466773a0b838832465518f2c54e881208a557d88a73bf7120b3263b03e697e38a1914686c8 +libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/fe0952b6450241b7b517c166ccea4c88 +libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/49f8b100199f4d9d668be6314b3ae6c1b4044c9520b2a3bd7812813bac469341208df67b5f875c8cec18a6eec93bb287a36a5235fdd289b2e43bdeecb7621e23 +libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/9f879b954eccefef125bd3a8a62021c1 +libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/aca699cad540681d1b07845492abb42b96d3662313aa0177b1764616cf281398d3e8e9cfa59b18440be58c8f65f843857e626ba95fa9baca296fc2406f453a34 +libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/a7b1d9a513d587591aa3308203ce6268 +libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/03e1bbc38635e8c65a1e14a173f2920519e2566ac240afaceea669345982459d7d98c6ef82aeb1c9e199b1f1e3e556ee34f5516bd30ff18cf8b683d91169fa0e +libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/12457a9b3fa21c99a49caf93b373c574 +libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ab193741a31f5452abc295d2a09301eeae0c3b6a03bf92691cac84880b40d6527a4628e468234822991ad55e35598ae5858a2bd00ef9eab9c90c45e18317b851 +libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/576f3ec63c7d64491cef6205c359b115 +libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/e48baf95c5812bb3a9c7d37fd78beb961c91fe58beef549d1b4e0e1b66809341c096fae68cc908be3dc94de71b0fe828496ae2febdcc4e09cd308cf697e4c414 +libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/6e1b2c07501a17453c039f549ae3a75a +libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/c7f12fefacb420b40ba7283226e1c458ce46e70ce5e5527c81cdbd2fa2cc7debdbfd14aeadb1dada1bf510ac678928432f850e1c3f8f74c8f8c34f078ded30f6 +libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/4c550be2bb9de498aa9c2a71b42b4980 +libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e5b505476ae796d52549884d2924c5ee4546b1d43b6a6205b9be18badbe1cf842181d4c8e699ef6daeefc12d7741c558f2594ea8bda1661a6a00bb34339191fb +libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/247a069c1af0d07353ababdd8d0ad534 +libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/e7b46803f2dbc9734d824e0464cf1c999d0b4efd2ee7283695a94e9e04ded524b60cc97498e02d3b4330604fff7ce3b59ec74839cd6793657cb064158dfe0f70 +libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/424a59e82d63f0559a4440f97c4fb0a4 +libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/aef94d142af96419f3749c13fdc89d2f0a9d072d5bb817fdb787718aa04825c28c9187970645d0dc48f79f58e5eb48003267d78d20e09c8bf76155e016f8c2f7 +libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/684d885f70bcd2fed245a6d5e275a86f +libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/808d932f565a03837bc5a189d58e942ee205e34cc5f985f384aceb83dfb3b721c10507339079dc87edc90db92aacd01e95534754867a6184755580b06699a6f3 +libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/087b86f490f1b0032f0b63beedc5d8bf +libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/566bc8c09d9b4e01ad8ea784d1e4ba13c3fe54338d49043251b91f9e3ef2ca718f64369f7b637a45b011eca03940825d2f0a48d306182ed32dc3af6b6ce757ee +libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/4e86a5d2a79ec57402a36d05f19ab870 +libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/de36ce76dc6611c12957123aeefccb1be26ef7b63c5aea0967afeddd7f473ac4674365ebfd9e35ea1607567b9701a1d58b55b1100b7e2f830723bf45315c68ca +libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/7cda46769ad2c27e0ba9e7404e1cd7cb +libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/a51eb2d0f4a61947b3449ba3ed60110b5e183fcd09126b9b0bfc63d285e881373e8ae26c0925e42bb3b69176bdb6c9bf9301ebc5d7c9775115af690f728d1476 +libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/8449c26f913b7b6ce1aff4e0c89d223d +libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/4196db36c4fddd2f267b97144ba0469f616952931df757708bdbdb28bd5e7615cdc292456019f5ca5747b708e7b805a2651e56dda74e33b1a8638d3e6197f856 +libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/73933ef6ac652ab1df761f44054ff926 +libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5267f1bb0fd73bc87f77c5b323b2664fd98c1e92aec67d7dac0ce748c57bf68284585f0474b995cdb7bd25c7b0840a21be55cf00e9a0b12f7bafaa7a4626c04d +libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/788729c6e58a0e0d1ff06f7a07157e09 +libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/e97c0461c88c86f2ef07fbe3e1298d03381b3240fde1ce1e3e49e267eec81bd3a043ddabad90a9014d9eefecb632eeb07597a5e8316ff9c37cc6617800ff5e8a +libLLVM_assert.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/5fd60a44a572000f2621dee40ea16841 +libLLVM_assert.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/c8104fbe347b8984a6c60ce4f26ebc85f2618a225f1b9787b4f7867bbab887ac9b661847e72e0bf8ac703505b9e37aa83aaa1367228d96ff7e52477c5de805ec +libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/e97353b1761afd7a24eb9ddcc38f701e +libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/34580edbfb68c7472ec40c14d5aa48458d754b9cab24ae7cfe3c1bd6ab7b383ff021af4963b79495028fc0c94e07e221dfcad8272e7815b1cbf3bf4042bddf70 +libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/59c6c59e083c55ac2e2ab2ad25a330f4 +libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/569bd4a55f6cddcfcce250f408cd1f8ea1c1a20ba81076a24acd27fb84242ba9c44c70bb7ec32d544c23679bd9032f378e604d0df30b948e12a0ac4b08afb521 +libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/ff17494ba9d7ca146d56eaef17ac9d20 +libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/10e1eee6d1b0e84aaaaf8424ebd9c07f08315dc0d92d34ea05165673416a1c41aded9ce4f1980b8a06abf301017884756e0835735677e125ee0854f81e90a881 +libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/3848a194f4dee0f4e0140e31f68e2e8c +libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/d0b2423a21de72ebaa76a69e7764f83f87f572f880a36cc6e26582db8f49d054265c4d8c12411b735b623c6ee2ba90b28dd37821e9bbe83120a7babde376a969 +libLLVM_assert.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/cba351ba676be1ae16ae194f1d313a39 +libLLVM_assert.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/c8dde7849ab528ff0c1fddc5f76d4fff67680fd93e8c44f5241009f4c5a6049e6fcf4ba5c168574f6efabc59ec87d81f1d1382ff55abeb9617addf69aef385cf +libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/6c2b449509d27d65a70549def9566c58 +libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/bfcf864871c590eef891cf604daf1507f1a9f117e091d88c3730dfb60dc8b49133b388315da8cd75a51683c54d7e7ae1887aee617cb8c704a6eafe7d0b81e948 +libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/7cb9c53aceb48acc4b1ff0bcb2d32073 +libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/e5b47e3697b695f45117af1d0ac0a37886e9c85d128d8b7d6ae40f3ea957b6ef04dd1539578bdc37a80f52b241ff34f49d75e104bafeaa76790b8a57ed95d1c8 +libLLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/6bbbe4f8828d965e6bda15ca6ed686d3 +libLLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/6f0ba6a0b8cfe9ca00d4a1ca11a0537542ca6b0d108b44148ad558245fc9b9a5849a8c31c98ea78c5cbc781cb264c9fafa4568412030f98ce78d895f88ddb083 +libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/ff941c8f9b710d8300eeeb29bf77688b +libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/fc5a41931d5af01452f9a104ffe4434a8842fa6ec4279f7534e8825bab0f7b5395d973a7269643af6e662b4dd8680920cd2879af4208aa6a96f0ec3d9eaa847b +libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/b429299c2ea4123b53d352bf15436fb4 +libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/1365e9df2f0c69be190b956e33ae8d89fb468f3475b25a1955ad9ad3a87545c9c433af9bc1a419394afba2ed7d06557a59ae700b19a8ca99b1989fe2c51fc24b +libLLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/7d1d63f817c40728881da6d5e5a759f3 +libLLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/c2b81988a6fa95a5186580fefe9ca645a37bd0b1529e77d3b32c60c2cd3201260197997230d43d96f5d94418ca85b641041c13a1a5737b6dc5002be6b410cc47 +libLLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f497572a7ddc42ccccf8588ef1be63ea +libLLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/5646bd76573eec9ee7276a702bdf72681f9271b8ee06903a04fede7057c012dde7fd2a4c297f92b5a13ebdddbb7e82decc9bfbb1e6bf561da16bfe4e91a39615 +libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/e2ca9e7ce03d1d5f9a8f926ec43a2f1d +libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a62343736796c8f38593db6f433bf88652163e440ae597647acd2d03935ce8644c8a73b5759533a126479ff8c1e7aecb80f96683b119b0568432f90b1eb9a616 +libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/e21cb8bf3381613346c8e7e0a557f3b0 +libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/ca8c593339b19b514b29dd60e0ddfe8027b74c549915430e63baa94bcbb655640e1cfb5c0671eb02a5a966aa219b1be72a8433f79fd6b1cf35a48663cd0f9903 +libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/698481903ca0c777c866f7d3df59f665 +libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/1f06d2758817cbbc87e17e694b2a28e361579061e713d434a8305e67101b86d403a5032342f032e779c65e5bddc1618139d7dce328210599166d5b89aa6ea53c +libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/3a0bfd5e1b7f0bccb594d8247b1c3482 +libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ebe41b12be7dd9aeba28305e05cced23a4536af84712f09356071a2f8042f9ba5195bb252b4bf641dd56141bafc04aea8a98ff21249d865ffdd0f4d2e4954285 +libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/b6be95080504eed815a14d43ff20ebe9 +libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/a1107732bcab4810a0856e0150be52178b71d527b77f37c9cdc702f371c7cfc16c5b42377752cf403a15584d891a20b7cb73f5c61f4944dd5b7e20272c5e02b5 +libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/abbd5e59d90b7207137537782c08c685 +libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/b2386fad803560b3b995b0aee4b8bdebd225953f380f36e327893b6c29ddfd955b2792b02ff580d8656f978d28d7ab4d6ed1d06e585b2a7b2fa05e5e0a8e02b7 +libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6eafded818a43bc73d2673d09728f1ad +libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/970c3ac986fc57fc0e2326fb55ffc8a32b88771e2527e5407d0e7c70ceb6484b19e906c6e51f2e7f93c92c2fba808e91a7567a07c72b791fb150bd12d9e80716 +libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/7c8e834845e30584f3980ca02df71a0e +libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/21c1adbc367ff56f1873bc27d8e8ddd7e860b52b73a8e7663d93ad7f4c9a5a116975b97298d804821b1af7ec05547936a25586ff989cc52f61901fbf8ed60945 +libLLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/2dac9d6b8d1bf5ff11c76381aebf23fc +libLLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/894a4bb9eeb742f7db103d16c1f55f735afae26419d11791e4dc5cf97f285681b59c91d6f41aafcb59d6a274419fa3cd5e6bd9496577c0c71732c7789b61c839 +libLLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/1551a6e70daff5c990dbc40cc069a73b +libLLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/0c0c36e42323364648844bdb3afc8d0efc4553484924e1fcd74e33c689e0b4076d614e85b29afd989aa007e5c03bb5b117504558d44e0566aaaa616d18c26161 +libLLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/ea235c280d3c76f05842b7630d1a5de6 +libLLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/cea4aca951683b3ec4cd590dd2d6626267de2a12edafaf07304e2dfdd0ee799f88a9ef2a126cfa32546fa221f724da928397798e1beba0964a80a8a56fbdd1bb +libLLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/e3b21c9a06e8b28be5e727807517d71e +libLLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/880f67c2c7613ee2c50c834c128770e06d58297bfb1f80b11f05833c231ffb3e1449b5c6069590f697c6fbba58c80719c8fb3fdc2786252176ec7d45db93db8e +libLLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/73a6b7a8837aea5b75b3e6a8f721dcef +libLLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/6fb7611a7f9a95123eb706ead1d470c055c517194839feb2c235285ab9c7a11be8fdc774726f64bb51908a9c5ba6838ef2376455f3064a6bffda8e9f8e6a295e +libLLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/2d6b5dd1752f9425ab9aad465a6fe691 +libLLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/6d107e0929fd121bf7cd98afc83c5b2da8808d69ed3126b87a9238ac7adbe073de96da0ed211eb226eabb64ad88a0176cad2fd2e86f928f8903995814f47695f +libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/9c06d611fc1fa0ce4fcc0c12570f8471 +libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/25f8ba2faba088dd4a53e25ddbbfff7ae35f23caa05e43c7f8f269ca289820e423255b174451a7f50f3b0631b4b3a1a977a3edfd67132f461774cc5a59178778 +libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/79838f0f3b33f5808a029f9ad47655a3 +libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/2bf5f9bdbf04f15cbcbc31efa5d122f46994bb9070d8421105dde3ffac4379be0b9a1c87e4b1224cff198b75ddeb9edb32313bb6e63e6083d97d039bb1c11e87 +libLLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/f0e546033f265a397272a69704addc54 +libLLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/68c8a2f46f18e70998415c99c4e59241138b455e32f09077633ba8ecf4de90ec4ac76ea0d0dae0cecd4e0a000ff879151b54593bf9aaed076586bf6bb11f23cb +libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/39389153062b455b210aedd75c8ee0e7 +libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/4301516630ff4b0ae81c37a94b32d9905cbb180d564692a4ba6baed66813eb7fab9a630fc6a252312af44eee8453eb4758ffef14d01460bec6b9b60a8dc59e54 +libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/b57ba068f4a5bf91706d81ebb5951482 +libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/8c931fe67045f2d321e3529e714835fb12d45776e32da3ad88a2180f92e9d28c55c7260af8dbac6273de41a540e18bcc941bc46f733d01b10669ff2620603893 +libLLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/1cc16ff9eceeddf92f3dd2d84bf53602 +libLLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/5b076f85ac97141881d165941e7cf5d3b2cb2e7aa8456dc7401c066015443720047887ccb2ced73a730f936770dbce0a8d45c4dabd5743fc3e094a8e6aeb1ea9 +libLLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/c4fbdb281f80c19459fdf3b9c8e5df9e +libLLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/b79582daec0842d6975484cc7848c9e6517b6a1c4d71f66ec348b8fb04e671a1231f47eab51425fd08a5e7a1c6e85c6414fce85c9e305eba02949db7ba77c326 +libLLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/34d2e843abb3c3721fec3da9d024b00c +libLLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/49f2a15d78f4aec7768393490a80c48a88a3fe3c5728b303d9871efc74862bf7a76a6355e7bfc08068aa8b4f6f637f51276cabc9cea75749fbdf5ee373bf9e15 +libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/8e96606a79e4321b38546a15c05bc69d +libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/6313fd9ede345acd9b228971846208228f67f237380341e3631725a43759f7da804a2b9c57169a08d02d1130bef51f7a7168fcf200c51261cac04f590766bcd2 +libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/fa3c453c5ec7068fdc84bb1ce1575b98 +libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/576e09913861b3148894bf217c3c411a9e8f8e67c47c2faae1c5cdc01a69b7dd411e9d606822304b4454fec9594e09871e7a2f0e97b88b2d5a6def80b29f0eaf +llvm-11.0.1.src.tar.xz/md5/6ec7ae9fd43da9b87cda15b3ab9cc7af +llvm-11.0.1.src.tar.xz/sha512/b42c67ef88e09dd94171f85cdf49a421a15cfc82ff715c7ce6de22f98cefbe6c7cdf6bf4af7ca017d56ecf6aa3e36df3d823a78cf2dd5312de4301b54b43dbe8 +LLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/5be4edc31ab210cc82ebf1f54b1265ba +LLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/80766e9fbabeb917acd73170a5f1efe4c20e56057cb1ef3949e56af17998b9e0df6be2a49158d9a11178f92449ed6cb849024b8ea598d666c492da249863548b +LLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/a30c59e4203473bccc9101de03a2f397 +LLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/54b18e13d8ce56ee837031df7066cef80779f2c5b5bb6c95842d3263c86b0ac29e995fb96d91f259b7d97b2a6b716da6e12ed8194ddcd0c9320a6e69150a3057 +LLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/a59800f9b6590831294d42799e47e432 +LLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/edbd8bf8c5dd0b6150d0f092a043296f2c63a1a5ccdb101c2a953eafcd706c110c4791adfa46cc99332e9c67a2ed366289e704a7279fa760ac8af92efbd5fbd8 +LLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/8f0607508601a4c682c8d8dd251f4d2f +LLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/59d5418cc96f14137cb65737e9fbd1846010d724e8af533386fe820a71664992823b772b8dae58258bc911bbfb7e9e3319f7dad3b9fdd527e3f6a1f304578c16 +LLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/6c99ea3f1b0a9bbd04bbc919c9c4fad1 +LLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/8bfd91ae7412028d9d25320deff175d86b3e095bf5e7a2781950cea18d1f3e0ec7ad46ad3a3d3bff721d591828aac4b19af8ae10ec324f49ed092026a3490e67 +LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/6818ad05767ee2a782613125f48dcdf5 +LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/ab7e01257e1182f819bea8de889185e1d87eca4b1b2ca8205c9e7b284005aa498d0941856d15411e844f745bf02df096e2740f66e5630b7d280b215fc3883258 +LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c58d60a8097b29d9bbbae81331a84683 +LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/9258c1ccdd0bc135b3b5922a766fc20e5d9522719e10e648d344ac0817f08bcfe253026e18107d281cbd9a6ee98bcdeed5efdb52142adc024e77546c5d280569 +LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/351e7c8bfb2a925ece5811c6e08516a9 +LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/ae4ae45d033e263c8e7ae1f7ba24dc43b4f55c150e77d3d9c643ec3a09f702ef0fb28aa9f840e1c32a6fe5c28d8e45533ea9a25b1a767d78429f78b93c898992 +LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/a97853f6cd8046a5b730dda7b800b3cf +LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/e63f11f157e08f848d3103c0e807fec5dfae8348de4e854d5fe78e72c5c34f3f387b07feadade05437c84582440fd19322f24b03891b46260d28cf3fd33f2782 +LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/8ca68d4bb2e4076c49da331fea41fdac +LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/8fed9e024b3bd3424816588f5b3ee3566631f3bcb3f32501108d3e60391cb03a606d9c757c778c5850502519899ca1ed334e6b2a5762a8bab5cf64310ebf4c29 +LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a5ceb1385feb62f5ca3e8a6ad6531ad0 +LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/13ee40541029344c6f75a674c15aa0205d00dcbd1eca675e11f2ac1fb15a7f9624cfc9f8e26ab792f146b98362e981e63accb3217791b7260bbdb61aa84ef00c +LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/bbb55319cd6163998b6fe36b2eeef4db +LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/398c6a1836bd32467edc6572b409656a675c75917b097095c3d8bb33d13f3fc0b2c2331d7f5d150c4744f68a450fa6a5184f4d662a0cc4a7ef7152c81fd444e2 +LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/1ed476e3ebc4db6fb0b9ea218eb11558 +LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/e736bf84fe6180fa510a070f7f9591e8fad16300bc4e8dd1d982df2806de7061c31f4d152eb1cba9cdd9e41b074a0e65536e2fbd336a93f493bf1e13a0321016 +LLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/264b00ad61ee082e0ae68243532b9d63 +LLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/d5307a36c404d1b8a9164e89eabb220554423960d318c6ccb64feadb9900f1f00a4ba3a3400ea136a5c5b08efab928fbe8e998a896027c1261fcec6fc99ddc1d +LLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/a774e0bb1d7c94dd4e70cb59845979a3 +LLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/ff9fb1d986009df355e6c20472e819183fae939a60afcbbab50fb4a047d107ce946ba32aeb55c84079a8cfef92f85c1e0ced3976a715ae1b4f204aa7d69efd8a +LLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/88a0c5300850fbbb9e2be2fe0bcf377b +LLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/719e23389c70be70f4401cef07fcf1cdc51e670a3d6ae596088fc0c7994c3bf835c73e544e65cd92ac41fb08999fcbe8fa20d89c3b4242fbd65a127ffed3dd31 +LLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/63bd2a87830c152e58e980c27bb8fc9c +LLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/d7d50e66ff2176ca400910c03d7ddfc34afb7e9b4c7dc785b55fef8b1a49ccc933a2857a5a0315029e878bd0a8840c6043d6d1220a01ef252218ba14ba9c9b54 +LLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/367672d3155efbd4b11aa98ba6ba0c6a +LLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/577ffa7a06fb95b590c4670a02d9e98a3260c407f25e8772b7f8cfb9c9f1cd460535aeab980279145a22b0d8d92eb886ef8229c98fc4b65ca2f665c5cc262391 +LLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/0251f63dec58d97ef2413011c1d48400 +LLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/3c0f9da5b60035ce8465113ec543e4d1cf16ddfa6ed288a4480f3df5f324d96b8a1fb6ea96d79dee1c6de2a886853c2e80968ad07e7316ed74ed55d989438420 +LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/a7030f4c9bd9c10400c76da7171393f9 +LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/26ae774eaed261d8fdce36bf6fe2c6d0ac4e1a4af74b0cf6b26cc474c7c1579746e16a1ce2f0b4e080a9af1ad26bc17bd4e9d87b806d49da58e4947be5cdccf1 +LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/94884b7d1b30a79065e12d096c48f717 +LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/4bd281cf3a8af6c76436d04dfc3812c3d56d0e69028cffe39111a0389ea7bdb916065d742dfbd7e5268d45591abe3c26682171ee77c254d084167a547c54637b +LLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/a281080d225f0321aa7b9a924064e67d +LLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/9fc77ab5a555b86d256e8fd86031d58aaafd38cdcd3d579cd0d7041b529bd7dfa6538fc459568049545cb7f192f6d89eb1b88aa81e4595799895c4284cedb97c +LLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/2f34a3438aa0cd283cb7ad37cc3983d7 +LLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/1e1854b654784d9a6691e40e222f53e7647ec81e095d4e4263a2824f8cbd00554826a24557684f84c1807d7614c231387a81600a432e1c7580c9e63b6b956ee8 +LLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/174ee46ac15dc748967e11e5c669213f +LLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/325f4fea92edb982ce0a705ae5113684bcf5ad5d3a8a323edea3885fa6c84a7a668e660a0e24032fe63a2eb8c504128b17488aa2314e6c4fc898ae5907c34824 +LLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/f6a66b26dc73de147ff2f93897250b47 +LLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/403d101e35db30b3afe6f792bc8fd56fe3ca08d2a11b36243afa8f40a3889a8f0428fa0576e35385dc58bc2580163f8fbc00398d1ee82da16028a4c443c2ee2d +LLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/3d728c8e73961909b0af13a40d9e359b +LLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/3284e85e7d382ef857ccb6504d50588f679aebebc96da83b4d9cd37cb15d8c525b36b4772a9b9fea7f25453ca6a75e94084194f1167dbf6337c6bc52a0216d60 +LLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/895006761bc396e2bfc29cb2838e34b7 +LLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/9b10e02d2089fb48f652d3aad003a1ca0a73f89807baafa2de08c2aba886fc98b13b16ae1e4dcc739d5f697a2e09052a082ed1615d5eee62254a524c2348cffc +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/4f043db38279e19cc34a96a4997cb91f +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/4f043db38279e19cc34a96a4997cb91f +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/cdb8470d8d6100433367f8dec73861a2d9f5bf5570e21ac9fd415a03b9dd8aac33ca8c508dc42a4a36e52f7308370543c06880e80cf3cb33770fe61dbb65a32e +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/9e8c2570ae870165b4febd2cf51077d7 +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/9e8c2570ae870165b4febd2cf51077d7 +LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/56c15ace14d7dceca059ef680873a2fe6a5b889c1d6a0869860d8eddef6f4bc746ffa5996950515717efe2693f3532a95bfbe089b28c0d0edc299bc9dca8a735 diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index 5d77c213c39b7..3c1ffe0b35e0f 100644 --- a/stdlib/libLLVM_jll/Project.toml +++ b/stdlib/libLLVM_jll/Project.toml @@ -1,6 +1,6 @@ name = "libLLVM_jll" uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "11.0.0+7" +version = "11.0.1+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 29ff1b71c61af25ea48e7b88f86cb0bfa2765e6e Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 8 Dec 2020 12:31:02 -0500 Subject: [PATCH 127/239] [Make] remove BINARYBUILDER_LLVM_ASSERTS and use LLVM_ASSERTIONS instead --- Make.inc | 10 ---------- contrib/refresh_checksums.mk | 2 +- deps/llvm.mk | 2 +- src/debuginfo.cpp | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Make.inc b/Make.inc index 30b454a6a103b..f272bedca956c 100644 --- a/Make.inc +++ b/Make.inc @@ -454,10 +454,6 @@ CXX_DISABLE_ASSERTION := -DJL_NDEBUG DISABLE_ASSERTIONS := -DNDEBUG -DJL_NDEBUG endif -ifeq ($(LLVM_ASSERTIONS),0) -CXX_DISABLE_ASSERTION += -DNDEBUG -endif - # Compiler specific stuff ifeq ($(USEMSVC), 1) @@ -1200,12 +1196,6 @@ endef $(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj)))) - -# Use the Assertions build -BINARYBUILDER_LLVM_ASSERTS ?= 0 - - - # OS specific stuff # install_name_tool diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 3fddb7a66423f..38db1549e13e9 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -39,7 +39,7 @@ endef # If $(2) == `src`, this will generate a `USE_BINARYBUILDER_FOO=0` make flag # It will also generate a `FOO_BB_TRIPLET=$(2)` make flag. define make_flags -USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) BINARYBUILDER_LLVM_ASSERTS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 +USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call makevar,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) LLVM_ASSERTIONS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 endef # checksum_bb_dep takes in (name, triplet), and generates a `checksum-$(1)-$(2)` target. diff --git a/deps/llvm.mk b/deps/llvm.mk index 96a9812441ad1..729e7867565fd 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -632,7 +632,7 @@ endif else # USE_BINARYBUILDER_LLVM # We provide a way to subversively swap out which LLVM JLL we pull artifacts from -ifeq ($(BINARYBUILDER_LLVM_ASSERTS), 1) +ifeq ($(LLVM_ASSERTIONS), 1) LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert LLVM_JLL_VER := $(LLVM_ASSERT_JLL_VER) endif diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index 6e93d85e73ab1..cc7993390e0ee 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -974,10 +974,10 @@ static objfileentry_t &find_object_file(uint64_t fbase, StringRef fname) JL_NOTS DebugInfo(errorCodeToError(std::make_error_code(std::errc::no_such_file_or_directory))); // Can't find a way to construct an empty Expected object // that can be ignored. - ignoreError(DebugInfo); if (fname.substr(sep + 1) != info.filename) { debuginfopath = fname.substr(0, sep + 1).str(); debuginfopath += info.filename; + ignoreError(DebugInfo); DebugInfo = openDebugInfo(debuginfopath, info); } if (!DebugInfo) { From e762db8ab617e89dd935f9a9aaaa54d2e6ea8f69 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Fri, 15 Jan 2021 19:30:08 -0500 Subject: [PATCH 128/239] [CCall] Don't ZExt half --- src/ccall.cpp | 2 +- test/llvmpasses/llvmcall.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ccall.cpp b/src/ccall.cpp index 8ef419d18bf84..ed8f98d96df2c 100644 --- a/src/ccall.cpp +++ b/src/ccall.cpp @@ -1053,7 +1053,7 @@ std::string generate_func_sig(const char *fname) // see pull req #978. need to annotate signext/zeroext for // small integer arguments. jl_datatype_t *bt = (jl_datatype_t*)tti; - if (jl_datatype_size(bt) < 4) { + if (jl_datatype_size(bt) < 4 && bt != jl_float16_type) { if (jl_signed_type && jl_subtype(tti, (jl_value_t*)jl_signed_type)) ab.addAttribute(Attribute::SExt); else diff --git a/test/llvmpasses/llvmcall.jl b/test/llvmpasses/llvmcall.jl index 7da2dbec36a8f..687abe0a8cd46 100644 --- a/test/llvmpasses/llvmcall.jl +++ b/test/llvmpasses/llvmcall.jl @@ -13,7 +13,7 @@ end @generated foo(x)=:(ccall("extern foo", llvmcall, $x, ($x,), x)) bar(x) = ntuple(i -> VecElement{Float16}(x[i]), 2) -# CHECK: call half @foo(half zeroext %{{[0-9]+}}) +# CHECK: call half @foo(half %{{[0-9]+}}) emit(foo, Float16) # CHECK: call [2 x half] @foo([2 x half] %{{[0-9]+}}) From 054caaaa17f036861dba44b672bcb3f32c7982be Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Mon, 18 Jan 2021 13:06:16 -0600 Subject: [PATCH 129/239] Fix tests sensitive to `--color=yes` (#39286) --- stdlib/REPL/test/repl.jl | 6 +++--- test/ccall.jl | 3 ++- test/cmdlineargs.jl | 10 +++++----- test/loading.jl | 2 +- test/spawn.jl | 20 ++++++++++---------- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 7666dd04d9219..b1e0feccd4b50 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -784,12 +784,12 @@ end Base.exit_on_sigint(true) -let exename = Base.julia_cmd() +let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # Test REPL in dumb mode with_fake_pty() do pts, ptm nENV = copy(ENV) nENV["TERM"] = "dumb" - p = run(detach(setenv(`$exename --startup-file=no -q`, nENV)), pts, pts, pts, wait=false) + p = run(detach(setenv(`$exename -q`, nENV)), pts, pts, pts, wait=false) Base.close_stdio(pts) output = readuntil(ptm, "julia> ", keep=true) if ccall(:jl_running_on_valgrind, Cint,()) == 0 @@ -827,7 +827,7 @@ let exename = Base.julia_cmd() end # Test stream mode - p = open(`$exename --startup-file=no -q`, "r+") + p = open(`$exename -q`, "r+") write(p, "1\nexit()\n") @test read(p, String) == "1\n" end # let exename diff --git a/test/ccall.jl b/test/ccall.jl index c8484579929e1..6f8eb025752af 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -1578,7 +1578,8 @@ end # issue #34061 let o_file = tempname(), err = Base.PipeEndpoint() - run(pipeline(Cmd(`$(Base.julia_cmd()) --output-o=$o_file -e 'Base.reinit_stdio(); + run(pipeline(Cmd(`$(Base.julia_cmd()) --color=no --output-o=$o_file -e ' + Base.reinit_stdio(); f() = ccall((:dne, :does_not_exist), Cvoid, ()); f()'`; ignorestatus=true), stderr=err), wait=false) output = read(err, String) diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 51051f379f496..fd87e82332c0f 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -50,7 +50,7 @@ let @test format_filename("%a%%b") == "a%b" end -let exename = `$(Base.julia_cmd()) --startup-file=no` +let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # tests for handling of ENV errors let v = writereadpipeline("println(\"REPL: \", @which(less), @isdefined(InteractiveUtils))", setenv(`$exename -i -E 'empty!(LOAD_PATH); @isdefined InteractiveUtils'`, @@ -94,7 +94,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` end end -let exename = `$(Base.julia_cmd()) --startup-file=no` +let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` # --version let v = split(read(`$exename -v`, String), "julia version ")[end] @test Base.VERSION_STRING == chomp(v) @@ -673,7 +673,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` end # issue #6310 -let exename = `$(Base.julia_cmd()) --startup-file=no` +let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test writereadpipeline("2+2", exename) == ("4\n", true) @test writereadpipeline("2+2\n3+3\n4+4", exename) == ("4\n6\n8\n", true) @test writereadpipeline("", exename) == ("", true) @@ -698,7 +698,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no` end # incomplete inputs to stream REPL -let exename = `$(Base.julia_cmd()) --startup-file=no` +let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` in = Pipe(); out = Pipe(); err = Pipe() proc = run(pipeline(exename, stdin = in, stdout = out, stderr = err), wait=false) write(in, "f(\n") @@ -710,7 +710,7 @@ end # Issue #29855 for yn in ("no", "yes") - exename = `$(Base.julia_cmd()) --inline=no --startup-file=no --inline=$yn` + exename = `$(Base.julia_cmd()) --inline=no --startup-file=no --color=no --inline=$yn` v = writereadpipeline("Base.julia_cmd()", exename) if yn == "no" @test occursin(r" --inline=no", v[1]) diff --git a/test/loading.jl b/test/loading.jl index 809b667d3fdb2..3cf9f903ddfdd 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -46,7 +46,7 @@ include_string_test_func = include_string(@__MODULE__, "include_string_test() = @test isdir(@__DIR__) @test @__DIR__() == dirname(@__FILE__) @test !endswith(@__DIR__, Base.Filesystem.path_separator) -let exename = `$(Base.julia_cmd()) --compiled-modules=yes --startup-file=no`, +let exename = `$(Base.julia_cmd()) --compiled-modules=yes --startup-file=no --color=no`, wd = sprint(show, pwd()) s_dir = sprint(show, realpath(tempdir())) @test wd != s_dir diff --git a/test/spawn.jl b/test/spawn.jl index ddc5aaefee00f..dcc1bae234118 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -215,13 +215,13 @@ let r, t, sock end # issue #4535 -exename = Base.julia_cmd() +exename = `$(Base.julia_cmd()) --startup-file=no --color=no` if valgrind_off # If --trace-children=yes is passed to valgrind, we will get a # valgrind banner here, not "Hello World\n". - @test read(pipeline(`$exename --startup-file=no -e 'println(stderr,"Hello World")'`, stderr=catcmd), String) == "Hello World\n" + @test read(pipeline(`$exename -e 'println(stderr,"Hello World")'`, stderr=catcmd), String) == "Hello World\n" out = Pipe() - proc = run(pipeline(`$exename --startup-file=no -e 'println(stderr,"Hello World")'`, stderr = out), wait=false) + proc = run(pipeline(`$exename -e 'println(stderr,"Hello World")'`, stderr = out), wait=false) close(out.in) @test read(out, String) == "Hello World\n" @test success(proc) @@ -229,7 +229,7 @@ end # setup_stdio for AbstractPipe let out = Pipe(), - proc = run(pipeline(`$exename --startup-file=no -e 'println(getpid())'`, stdout=IOContext(out, :foo => :bar)), wait=false) + proc = run(pipeline(`$exename -e 'println(getpid())'`, stdout=IOContext(out, :foo => :bar)), wait=false) # < don't block here before getpid call > pid = getpid(proc) close(out.in) @@ -298,7 +298,7 @@ let fname = tempname(), p import Base.zzzInvalidIdentifier """ try - io = open(pipeline(`$exename --startup-file=no`, stderr=stderr), "w") + io = open(pipeline(exename, stderr=stderr), "w") write(io, cmd) close(io) wait(io) @@ -318,7 +318,7 @@ let bad = "bad\0name" end # issue #12829 -let out = Pipe(), echo = `$exename --startup-file=no -e 'print(stdout, " 1\t", read(stdin, String))'`, ready = Condition(), t, infd, outfd +let out = Pipe(), echo = `$exename -e 'print(stdout, " 1\t", read(stdin, String))'`, ready = Condition(), t, infd, outfd @test_throws ArgumentError write(out, "not open error") inread = false t = @async begin # spawn writer task @@ -399,7 +399,7 @@ let fname = tempname() run(cmd) end """ - @test success(pipeline(`$catcmd $fname`, `$exename --startup-file=no -e $code`)) + @test success(pipeline(`$catcmd $fname`, `$exename -e $code`)) rm(fname) end @@ -520,7 +520,7 @@ end # issue #19864 (PR #20497) let c19864 = readchomp(pipeline(ignorestatus( - `$exename --startup-file=no -e ' + `$exename -e ' struct Error19864 <: Exception; end Base.showerror(io::IO, e::Error19864) = print(io, "correct19864") throw(Error19864())'`), @@ -573,7 +573,7 @@ end # Logging macros should not output to finalized streams (#26687) let - cmd = `$exename --startup-file=no -e 'finalizer(x->@info(x), "Hello")'` + cmd = `$exename -e 'finalizer(x->@info(x), "Hello")'` output = readchomp(pipeline(cmd, stderr=catcmd)) @test occursin("Info: Hello", output) end @@ -686,7 +686,7 @@ end let text = "input-test-text" b = PipeBuffer() - proc = open(Base.CmdRedirect(Base.CmdRedirect(```$exename --startup-file=no -E ' + proc = open(Base.CmdRedirect(Base.CmdRedirect(```$exename -E ' in14 = Base.open(RawFD(14)) out15 = Base.open(RawFD(15)) write(out15, in14)'```, From 97e63e9c5c7e3ebe2d156a0eeaf1a3b8990d09c5 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Mon, 18 Jan 2021 13:07:29 -0600 Subject: [PATCH 130/239] Fix `Base.runtests("loading")` working directory (#39238) --- test/loading.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/loading.jl b/test/loading.jl index 3cf9f903ddfdd..377087a63f558 100644 --- a/test/loading.jl +++ b/test/loading.jl @@ -195,12 +195,11 @@ saved_load_path = copy(LOAD_PATH) saved_depot_path = copy(DEPOT_PATH) saved_active_project = Base.ACTIVE_PROJECT[] -push!(empty!(LOAD_PATH), "project") -append!(empty!(DEPOT_PATH), [mktempdir(), "depot"]) +push!(empty!(LOAD_PATH), joinpath(@__DIR__, "project")) +append!(empty!(DEPOT_PATH), [mktempdir(), joinpath(@__DIR__, "depot")]) Base.ACTIVE_PROJECT[] = nothing -@test load_path() == [abspath("project","Project.toml")] - +@test load_path() == [joinpath(@__DIR__, "project", "Project.toml")] # locate `tail(names)` package by following the search path graph through `names` starting from `where` function recurse_package(where::PkgId, name::String, names::String...) From 7eb72717f282f6c4e044e48fd07dcb9abff15021 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Mon, 18 Jan 2021 14:20:41 -0500 Subject: [PATCH 131/239] Add environment flag to pass extra exeflags (#39300) Allows one to pass extra flags to test, such as forcing a specific architecture to flush out codegen bugs. I have been using it to test LLVM for Power8 on Power9 ``` JULIA_TEST_EXTRA_EXEFLAGS=-Cpwr8 ``` --- test/testenv.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/testenv.jl b/test/testenv.jl index 6224cb16a9463..2aeee0f6dfc80 100644 --- a/test/testenv.jl +++ b/test/testenv.jl @@ -18,6 +18,9 @@ if !@isdefined(testenv_defined) push!(test_exeflags.exec, "--startup-file=no") push!(test_exeflags.exec, "--depwarn=error") end + if haskey(ENV, "JULIA_TEST_EXTRA_EXEFLAGS") + append!(test_exeflags.exec, Base.shell_split(ENV["JULIA_TEST_EXTRA_EXEFLAGS"])) + end if haskey(ENV, "JULIA_TEST_EXENAME") popfirst!(test_exeflags.exec) From 584572124b999576fe931035515c8c2c8938f891 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 18 Jan 2021 15:12:54 -0500 Subject: [PATCH 132/239] Revert "compiler: corrections to Conditional lattice" This reverts commit e1859a1c25aad42318777438dbedac485c40a7ce. I was wrong, and lattices are hard. --- base/compiler/typelattice.jl | 7 +------ base/compiler/typelimits.jl | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/base/compiler/typelattice.jl b/base/compiler/typelattice.jl index 6dcf0e4fcb49a..db9fbce7d59fb 100644 --- a/base/compiler/typelattice.jl +++ b/base/compiler/typelattice.jl @@ -126,12 +126,7 @@ function ⊑(@nospecialize(a), @nospecialize(b)) @assert !isa(b, TypeVar) "invalid lattice item" if isa(a, Conditional) if isa(b, Conditional) - issubconditional(a, b) && return true - b = maybe_extract_const_bool(b) - if b isa Bool && maybe_extract_const_bool(a) === b - return true - end - return false + return issubconditional(a, b) elseif isa(b, Const) && isa(b.val, Bool) return maybe_extract_const_bool(a) === b.val end diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index 99b8714e83216..ce264b576f6b3 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -299,10 +299,6 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb)) isa(typeb, MaybeUndef) ? typeb.typ : typeb)) end # type-lattice for Conditional wrapper - if isa(typea, Conditional) && isa(typeb, Conditional) && typea.var !== typeb.var - widenconditional(typea) isa Const && (typea = widenconditional(typea)) - widenconditional(typeb) isa Const && (typeb = widenconditional(typeb)) - end if isa(typea, Conditional) && isa(typeb, Const) if typeb.val === true typeb = Conditional(typea.var, Any, Union{}) From 33573eca1107531b3b33e8d20c08ef6db81c9f41 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Tue, 19 Jan 2021 01:48:41 -0600 Subject: [PATCH 133/239] Force-specialize on `T` in `cat_similar` (#39292) These methods are tiny (quick to compile), call methods that force-specialize on `T`, and are called by methods that force-specialize on `T`. Consequently, there does not seem to be any good reason to lose inferrability in these methods. --- base/abstractarray.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index ad32a102fa7aa..30072363a34c3 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1481,7 +1481,7 @@ vcat(V::AbstractVector{T}...) where {T} = typed_vcat(T, V...) # but that solution currently fails (see #27188 and #27224) AbstractVecOrTuple{T} = Union{AbstractVector{<:T}, Tuple{Vararg{T}}} -_typed_vcat_similar(V, T, n) = similar(V[1], T, n) +_typed_vcat_similar(V, ::Type{T}, n) where T = similar(V[1], T, n) _typed_vcat(::Type{T}, V::AbstractVecOrTuple{AbstractVector}) where T = _typed_vcat!(_typed_vcat_similar(V, T, mapreduce(length, +, V)), V) @@ -1577,8 +1577,8 @@ cat_size(A::AbstractArray, d) = size(A, d) cat_indices(A, d) = OneTo(1) cat_indices(A::AbstractArray, d) = axes(A, d) -cat_similar(A, T, shape) = Array{T}(undef, shape) -cat_similar(A::AbstractArray, T, shape) = similar(A, T, shape) +cat_similar(A, ::Type{T}, shape) where T = Array{T}(undef, shape) +cat_similar(A::AbstractArray, ::Type{T}, shape) where T = similar(A, T, shape) cat_shape(dims, shape::Tuple{Vararg{Int}}) = shape function cat_shape(dims, shapes::Tuple) From 27a6038aa07735ae6f75030247f9dfa900e63d06 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 19 Jan 2021 11:09:36 +0100 Subject: [PATCH 134/239] Only construct legal int types during alloc opt. When promoting heap to stack allocations, make sure we only emit legal integer allocas by checking with the module's datalayout. X86 doesn't seem to care, but back-ends like SPIR-V don't know how to handle arbitrarily-sized integers. Fixes JuliaGPU/oneAPI.jl#55 --- src/llvm-alloc-opt.cpp | 11 +++++++++-- test/llvmpasses/alloc-opt2.jl | 20 +++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/llvm-alloc-opt.cpp b/src/llvm-alloc-opt.cpp index c6d9dce9b8548..381380372db40 100644 --- a/src/llvm-alloc-opt.cpp +++ b/src/llvm-alloc-opt.cpp @@ -936,7 +936,12 @@ void Optimizer::moveToStack(CallInst *orig_inst, size_t sz, bool has_ref) ptr = cast(prolog_builder.CreateBitCast(buff, pass.T_pint8)); } else { - buff = prolog_builder.CreateAlloca(Type::getIntNTy(pass.getLLVMContext(), sz * 8)); + Type *buffty; + if (pass.DL->isLegalInteger(sz * 8)) + buffty = Type::getIntNTy(pass.getLLVMContext(), sz * 8); + else + buffty = ArrayType::get(Type::getInt8Ty(pass.getLLVMContext()), sz); + buff = prolog_builder.CreateAlloca(buffty); buff->setAlignment(Align(align)); ptr = cast(prolog_builder.CreateBitCast(buff, pass.T_pint8)); } @@ -1193,8 +1198,10 @@ void Optimizer::splitOnStack(CallInst *orig_inst) else if (field.elty && !field.multiloc) { allocty = field.elty; } - else { + else if (pass.DL->isLegalInteger(field.size * 8)) { allocty = Type::getIntNTy(pass.getLLVMContext(), field.size * 8); + } else { + allocty = ArrayType::get(Type::getInt8Ty(pass.getLLVMContext()), field.size); } slot.slot = prolog_builder.CreateAlloca(allocty); insertLifetime(prolog_builder.CreateBitCast(slot.slot, pass.T_pint8), diff --git a/test/llvmpasses/alloc-opt2.jl b/test/llvmpasses/alloc-opt2.jl index 00a4394352fbf..8a3f5aa941feb 100644 --- a/test/llvmpasses/alloc-opt2.jl +++ b/test/llvmpasses/alloc-opt2.jl @@ -79,12 +79,30 @@ L3: """) # CHECK-LABEL: }{{$}} +# CHECK-LABEL: @legal_int_types +# CHECK: alloca [12 x i8] +# CHECK-NOT: alloca i96 +# CHECK: ret void +println(""" +define void @legal_int_types() { + %ptls = call {}*** @julia.ptls_states() + %ptls_i8 = bitcast {}*** %ptls to i8* + %var1 = call {} addrspace(10)* @julia.gc_alloc_obj(i8* %ptls_i8, $isz 12, {} addrspace(10)* @tag) + %var2 = addrspacecast {} addrspace(10)* %var1 to {} addrspace(11)* + %var3 = call {}* @julia.pointer_from_objref({} addrspace(11)* %var2) + ret void +} +""") +# CHECK-LABEL: }{{$}} + + + println(""" declare void @external_function() declare {} addrspace(10)* @external_function2() declare {}*** @julia.ptls_states() declare noalias {} addrspace(10)* @julia.gc_alloc_obj(i8*, $isz, {} addrspace(10)*) -declare i64 @julia.pointer_from_objref({} addrspace(11)*) +declare {}* @julia.pointer_from_objref({} addrspace(11)*) declare void @llvm.memcpy.p11i8.p0i8.i64(i8 addrspace(11)* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) declare token @llvm.julia.gc_preserve_begin(...) declare void @llvm.julia.gc_preserve_end(token) From 543ac5ffb480467b01fb2be898df5ce9a97de6a1 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 19 Jan 2021 11:29:24 +0100 Subject: [PATCH 135/239] Adapt the alloc-opt tests. --- test/llvmpasses/alloc-opt.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/llvmpasses/alloc-opt.jl b/test/llvmpasses/alloc-opt.jl index dd1ff78151f95..e48a85641257b 100644 --- a/test/llvmpasses/alloc-opt.jl +++ b/test/llvmpasses/alloc-opt.jl @@ -5,6 +5,8 @@ isz = sizeof(UInt) == 8 ? "i64" : "i32" println(""" +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" + @tag = external addrspace(10) global {} """) @@ -167,7 +169,7 @@ define void @object_field({} addrspace(10)* %field) { # CHECK-LABEL: }{{$}} # CHECK-LABEL: @memcpy_opt -# CHECK: alloca i128, align 16 +# CHECK: alloca [16 x i8], align 16 # CHECK: call {}*** @julia.ptls_states() # CHECK-NOT: @julia.gc_alloc_obj # CHECK-NOT: @jl_gc_pool_alloc From efc986003356be5daea6ccd9e38008de961c18aa Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Tue, 19 Jan 2021 10:09:53 -0500 Subject: [PATCH 136/239] bump Pkg to fe759b2449b3ace291b6a5e43bd7ecff1767ff91 (#39288) --- .../Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 | 1 - .../Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 | 1 - .../Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/md5 | 1 + .../Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/sha512 | 1 + stdlib/Pkg.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 delete mode 100644 deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 create mode 100644 deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/md5 create mode 100644 deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/sha512 diff --git a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 deleted file mode 100644 index 02ff5a9bb65b7..0000000000000 --- a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -684b4945fabc25572f529bf6df2fdcc0 diff --git a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 b/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 deleted file mode 100644 index 6edc0e3251b1b..0000000000000 --- a/deps/checksums/Pkg-94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -b7b45decb50bde49d217d336f0a98d3b38bbbc473128c8ad09df1fbd02e94d0f177ad6214235ebe3ffa1401c63a55dc5101ed99b5f0fe10788dda59bc71a38a7 diff --git a/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/md5 b/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/md5 new file mode 100644 index 0000000000000..378a069a43182 --- /dev/null +++ b/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/md5 @@ -0,0 +1 @@ +2d755335944a8c0cd6802abfd4113146 diff --git a/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/sha512 b/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/sha512 new file mode 100644 index 0000000000000..041d5ab0fbbba --- /dev/null +++ b/deps/checksums/Pkg-fe759b2449b3ace291b6a5e43bd7ecff1767ff91.tar.gz/sha512 @@ -0,0 +1 @@ +b2d80cc86a5fed99db337cd6affbb411c71f31c8f35c4acf8e4cf0ddee04fc19851db0e01a60be34d54cc2d18a7a73bf9cbbf07e8a9aae79485297e34c43246c diff --git a/stdlib/Pkg.version b/stdlib/Pkg.version index 20a2974401e70..aefbba184612d 100644 --- a/stdlib/Pkg.version +++ b/stdlib/Pkg.version @@ -1,2 +1,2 @@ PKG_BRANCH = master -PKG_SHA1 = 94d3c45f1b7c6c7a1e887d97f4e87e3662801d0f +PKG_SHA1 = fe759b2449b3ace291b6a5e43bd7ecff1767ff91 From e8f23d7d3e2eb4c4550637af6ace95dab4bae49d Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 19 Jan 2021 11:47:11 -0500 Subject: [PATCH 137/239] improve performance of disabling finalizers in locks (#39153) helps #38947 --- base/gcutils.jl | 15 ++++++++++++++- base/lock.jl | 8 ++++---- base/locks-mt.jl | 10 +++++----- src/ccall.cpp | 22 ++++++++++++++++++++++ src/gc.c | 36 ++++++++++++++++++++++++++++++++---- src/julia_threads.h | 4 ++++ src/locks.h | 5 ++--- src/rtutils.c | 6 ++---- 8 files changed, 85 insertions(+), 21 deletions(-) diff --git a/base/gcutils.jl b/base/gcutils.jl index 82bdf74c9a4d4..1280b4ab71afc 100644 --- a/base/gcutils.jl +++ b/base/gcutils.jl @@ -114,7 +114,20 @@ the current Task. Finalizers will only run when the counter is at zero. (Set `true` for enabling, `false` for disabling). They may still run concurrently on another Task or thread. """ -enable_finalizers(on::Bool) = ccall(:jl_gc_enable_finalizers, Cvoid, (Ptr{Cvoid}, Int32,), C_NULL, on) +enable_finalizers(on::Bool) = on ? enable_finalizers() : disable_finalizers() + +function enable_finalizers() + Base.@_inline_meta + ccall(:jl_gc_enable_finalizers_internal, Cvoid, ()) + if unsafe_load(cglobal(:jl_gc_have_pending_finalizers, Cint)) != 0 + ccall(:jl_gc_run_pending_finalizers, Cvoid, (Ptr{Cvoid},), C_NULL) + end +end + +function disable_finalizers() + Base.@_inline_meta + ccall(:jl_gc_disable_finalizers_internal, Cvoid, ()) +end """ GC.@preserve x1 x2 ... xn expr diff --git a/base/lock.jl b/base/lock.jl index 7a8e0eaef878e..b013a593cde84 100644 --- a/base/lock.jl +++ b/base/lock.jl @@ -65,7 +65,7 @@ function trylock(rl::ReentrantLock) if rl.reentrancy_cnt == 0 rl.locked_by = t rl.reentrancy_cnt = 1 - GC.enable_finalizers(false) + GC.disable_finalizers() got = true else got = false @@ -93,7 +93,7 @@ function lock(rl::ReentrantLock) if rl.reentrancy_cnt == 0 rl.locked_by = t rl.reentrancy_cnt = 1 - GC.enable_finalizers(false) + GC.disable_finalizers() break end try @@ -135,7 +135,7 @@ function unlock(rl::ReentrantLock) rethrow() end end - GC.enable_finalizers(true) + GC.enable_finalizers() unlock(rl.cond_wait) end return @@ -157,7 +157,7 @@ function unlockall(rl::ReentrantLock) rethrow() end end - GC.enable_finalizers(true) + GC.enable_finalizers() unlock(rl.cond_wait) return n end diff --git a/base/locks-mt.jl b/base/locks-mt.jl index 6a3b68016cb81..41e1ef33c574c 100644 --- a/base/locks-mt.jl +++ b/base/locks-mt.jl @@ -61,12 +61,12 @@ Base.assert_havelock(l::SpinLock) = islocked(l) ? nothing : Base.concurrency_vio function lock(l::SpinLock) while true if _get(l) == 0 - GC.enable_finalizers(false) + GC.disable_finalizers() p = _xchg!(l, 1) if p == 0 return end - GC.enable_finalizers(true) + GC.enable_finalizers() end ccall(:jl_cpu_pause, Cvoid, ()) # Temporary solution before we have gc transition support in codegen. @@ -76,12 +76,12 @@ end function trylock(l::SpinLock) if _get(l) == 0 - GC.enable_finalizers(false) + GC.disable_finalizers() p = _xchg!(l, 1) if p == 0 return true end - GC.enable_finalizers(true) + GC.enable_finalizers() end return false end @@ -89,7 +89,7 @@ end function unlock(l::SpinLock) _get(l) == 0 && error("unlock count must match lock count") _set!(l, 0) - GC.enable_finalizers(true) + GC.enable_finalizers() ccall(:jl_cpu_wake, Cvoid, ()) return end diff --git a/src/ccall.cpp b/src/ccall.cpp index ed8f98d96df2c..65c0fa74c9ace 100644 --- a/src/ccall.cpp +++ b/src/ccall.cpp @@ -1481,6 +1481,28 @@ static jl_cgval_t emit_ccall(jl_codectx_t &ctx, jl_value_t **args, size_t nargs) tbaa_decorate(tbaa_const, tid); return mark_or_box_ccall_result(ctx, tid, retboxed, rt, unionall, static_rt); } + else if (is_libjulia_func(jl_gc_disable_finalizers_internal) +#ifdef NDEBUG + || is_libjulia_func(jl_gc_enable_finalizers_internal) +#endif + ) { + JL_GC_POP(); + Value *ptls_i32 = emit_bitcast(ctx, ctx.ptlsStates, T_pint32); + const int finh_offset = offsetof(jl_tls_states_t, finalizers_inhibited); + Value *pfinh = ctx.builder.CreateInBoundsGEP(ptls_i32, ConstantInt::get(T_size, finh_offset / 4)); + LoadInst *finh = ctx.builder.CreateAlignedLoad(pfinh, Align(sizeof(int32_t))); + Value *newval; + if (is_libjulia_func(jl_gc_disable_finalizers_internal)) { + newval = ctx.builder.CreateAdd(finh, ConstantInt::get(T_int32, 1)); + } + else { + newval = ctx.builder.CreateSelect(ctx.builder.CreateICmpEQ(finh, ConstantInt::get(T_int32, 0)), + ConstantInt::get(T_int32, 0), + ctx.builder.CreateSub(finh, ConstantInt::get(T_int32, 1))); + } + ctx.builder.CreateStore(newval, pfinh); + return ghostValue(jl_nothing_type); + } else if (is_libjulia_func(jl_get_current_task)) { assert(lrt == T_prjlvalue); assert(!isVa && !llvmcall && nccallargs == 0); diff --git a/src/gc.c b/src/gc.c index ef1ef52da26d4..94f5a80fd0cbe 100644 --- a/src/gc.c +++ b/src/gc.c @@ -181,6 +181,7 @@ bigval_t *big_objects_marked = NULL; // `to_finalize` should not have tagged pointers. arraylist_t finalizer_list_marked; arraylist_t to_finalize; +int jl_gc_have_pending_finalizers = 0; NOINLINE uintptr_t gc_get_stack_ptr(void) { @@ -261,6 +262,7 @@ static void schedule_finalization(void *o, void *f) JL_NOTSAFEPOINT { arraylist_push(&to_finalize, o); arraylist_push(&to_finalize, f); + jl_gc_have_pending_finalizers = 1; } static void run_finalizer(jl_ptls_t ptls, jl_value_t *o, jl_value_t *ff) @@ -386,12 +388,24 @@ static void run_finalizers(jl_ptls_t ptls) if (to_finalize.items == to_finalize._space) { copied_list.items = copied_list._space; } + jl_gc_have_pending_finalizers = 0; arraylist_new(&to_finalize, 0); // This releases the finalizers lock. jl_gc_run_finalizers_in_list(ptls, &copied_list); arraylist_free(&copied_list); } +JL_DLLEXPORT void jl_gc_run_pending_finalizers(jl_ptls_t ptls) +{ + if (ptls == NULL) + ptls = jl_get_ptls_states(); + if (!ptls->in_finalizer && ptls->locks.len == 0 && ptls->finalizers_inhibited == 0) { + ptls->in_finalizer = 1; + run_finalizers(ptls); + ptls->in_finalizer = 0; + } +} + JL_DLLEXPORT int jl_gc_get_finalizers_inhibited(jl_ptls_t ptls) { if (ptls == NULL) @@ -399,6 +413,22 @@ JL_DLLEXPORT int jl_gc_get_finalizers_inhibited(jl_ptls_t ptls) return ptls->finalizers_inhibited; } +JL_DLLEXPORT void jl_gc_disable_finalizers_internal(void) +{ + jl_ptls_t ptls = jl_get_ptls_states(); + ptls->finalizers_inhibited++; +} + +JL_DLLEXPORT void jl_gc_enable_finalizers_internal(void) +{ + jl_ptls_t ptls = jl_get_ptls_states(); +#ifdef NDEBUG + ptls->finalizers_inhibited--; +#else + jl_gc_enable_finalizers(ptls, 1); +#endif +} + JL_DLLEXPORT void jl_gc_enable_finalizers(jl_ptls_t ptls, int on) { if (ptls == NULL) @@ -421,10 +451,8 @@ JL_DLLEXPORT void jl_gc_enable_finalizers(jl_ptls_t ptls, int on) return; } ptls->finalizers_inhibited = new_val; - if (!new_val && old_val && !ptls->in_finalizer && ptls->locks.len == 0) { - ptls->in_finalizer = 1; - run_finalizers(ptls); - ptls->in_finalizer = 0; + if (jl_gc_have_pending_finalizers) { + jl_gc_run_pending_finalizers(ptls); } } diff --git a/src/julia_threads.h b/src/julia_threads.h index 4216b2012cedb..350fe9133e242 100644 --- a/src/julia_threads.h +++ b/src/julia_threads.h @@ -341,6 +341,10 @@ int8_t jl_gc_safe_leave(jl_ptls_t ptls, int8_t state); // Can be a safepoint JL_DLLEXPORT void (jl_gc_safepoint)(void); JL_DLLEXPORT void jl_gc_enable_finalizers(jl_ptls_t ptls, int on); +JL_DLLEXPORT void jl_gc_disable_finalizers_internal(void); +JL_DLLEXPORT void jl_gc_enable_finalizers_internal(void); +JL_DLLEXPORT void jl_gc_run_pending_finalizers(jl_ptls_t ptls); +extern JL_DLLEXPORT int jl_gc_have_pending_finalizers; JL_DLLEXPORT void jl_wakeup_thread(int16_t tid); diff --git a/src/locks.h b/src/locks.h index b02fc8c5011e5..262390bb718f3 100644 --- a/src/locks.h +++ b/src/locks.h @@ -132,9 +132,8 @@ static inline void jl_mutex_unlock(jl_mutex_t *lock) jl_mutex_unlock_nogc(lock); jl_lock_frame_pop(); JL_SIGATOMIC_END(); - if (ptls->locks.len == 0 && ptls->finalizers_inhibited == 0) { - ptls->finalizers_inhibited = 1; - jl_gc_enable_finalizers(ptls, 1); // call run_finalizers (may GC) + if (jl_gc_have_pending_finalizers) { + jl_gc_run_pending_finalizers(ptls); // may GC } } diff --git a/src/rtutils.c b/src/rtutils.c index 09ba2aed85075..99fce51128345 100644 --- a/src/rtutils.c +++ b/src/rtutils.c @@ -265,10 +265,8 @@ JL_DLLEXPORT void jl_eh_restore_state(jl_handler_t *eh) if (old_defer_signal && !eh->defer_signal) { jl_sigint_safepoint(ptls); } - if (unlocks && eh->locks_len == 0 && ptls->finalizers_inhibited == 0) { - // call run_finalizers - ptls->finalizers_inhibited = 1; - jl_gc_enable_finalizers(ptls, 1); + if (jl_gc_have_pending_finalizers && unlocks && eh->locks_len == 0) { + jl_gc_run_pending_finalizers(ptls); } } From fb39bdb0e7ad733f118ee520d882063ff89cbd84 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Tue, 19 Jan 2021 13:19:10 -0600 Subject: [PATCH 138/239] Preserve input type for unaliascopy(::ReinterpretArray) (#39316) --- base/reinterpretarray.jl | 3 ++- test/reinterpretarray.jl | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/base/reinterpretarray.jl b/base/reinterpretarray.jl index b5f13ed113f15..e2990bafcd086 100644 --- a/base/reinterpretarray.jl +++ b/base/reinterpretarray.jl @@ -278,7 +278,8 @@ eachindex(style::IndexSCartesian2, A::AbstractArray) = eachindex(style, parent(A parent(a::ReinterpretArray) = a.parent dataids(a::ReinterpretArray) = dataids(a.parent) -unaliascopy(a::ReinterpretArray{T}) where {T} = reinterpret(T, unaliascopy(a.parent)) +unaliascopy(a::NonReshapedReinterpretArray{T}) where {T} = reinterpret(T, unaliascopy(a.parent)) +unaliascopy(a::ReshapedReinterpretArray{T}) where {T} = reinterpret(reshape, T, unaliascopy(a.parent)) function size(a::NonReshapedReinterpretArray{T,N,S} where {N}) where {T,S} psize = size(a.parent) diff --git a/test/reinterpretarray.jl b/test/reinterpretarray.jl index 564aac5993cd7..a8cadd83c3dec 100644 --- a/test/reinterpretarray.jl +++ b/test/reinterpretarray.jl @@ -368,3 +368,11 @@ ars = reinterpret(reshape, Int, a) @test as isa TSlow{NTuple{4,Float64},1} @test size(as) == (4,) end + + +@testset "aliasing" begin + a = reinterpret(NTuple{2,Float64}, rand(Float64, 4, 4)) + @test typeof(Base.unaliascopy(a)) === typeof(a) + a = reinterpret(reshape, NTuple{4,Float64}, rand(Float64, 4, 4)) + @test typeof(Base.unaliascopy(a)) === typeof(a) +end From 815076b392821609815d5d77077e042ef08d2e14 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Tue, 19 Jan 2021 13:19:56 -0600 Subject: [PATCH 139/239] Improve inferability of shape::Dims for cat (#39294) `cat` is often called with Varargs or heterogenous inputs, and inference almost always fails. Even when all the arrays are of the same type, if the number of varargs isn't known inference typically fails. The culprit is probably #36454. This reduces the number of failures considerably, by avoiding creation of vararg length tuples in the shape-inference pipeline. --- base/abstractarray.jl | 8 +++++++- test/abstractarray.jl | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 30072363a34c3..1f1120740e99a 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1580,6 +1580,7 @@ cat_indices(A::AbstractArray, d) = axes(A, d) cat_similar(A, ::Type{T}, shape) where T = Array{T}(undef, shape) cat_similar(A::AbstractArray, ::Type{T}, shape) where T = similar(A, T, shape) +# These are for backwards compatibility (even though internal) cat_shape(dims, shape::Tuple{Vararg{Int}}) = shape function cat_shape(dims, shapes::Tuple) out_shape = () @@ -1588,6 +1589,11 @@ function cat_shape(dims, shapes::Tuple) end return out_shape end +# The new way to compute the shape (more inferrable than combining cat_size & cat_shape, due to Varargs + issue#36454) +cat_size_shape(dims) = ntuple(zero, Val(length(dims))) +@inline cat_size_shape(dims, X, tail...) = _cat_size_shape(dims, _cshp(1, dims, (), cat_size(X)), tail...) +_cat_size_shape(dims, shape) = shape +@inline _cat_size_shape(dims, shape, X, tail...) = _cat_size_shape(dims, _cshp(1, dims, shape, cat_size(X)), tail...) _cshp(ndim::Int, ::Tuple{}, ::Tuple{}, ::Tuple{}) = () _cshp(ndim::Int, ::Tuple{}, ::Tuple{}, nshape) = nshape @@ -1631,7 +1637,7 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) @inline cat_t(::Type{T}, X...; dims) where {T} = _cat_t(dims, T, X...) @inline function _cat_t(dims, ::Type{T}, X...) where {T} catdims = dims2cat(dims) - shape = cat_shape(catdims, map(cat_size, X)) + shape = cat_size_shape(catdims, X...) A = cat_similar(X[1], T, shape) if count(!iszero, catdims)::Int > 1 fill!(A, zero(T)) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index f00f1f80332bb..52af916acbdac 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -692,6 +692,12 @@ function test_cat(::Type{TestAbstractArray}) # 36041 @test_throws MethodError cat(["a"], ["b"], dims=[1, 2]) @test cat([1], [1], dims=[1, 2]) == I(2) + + # inferrability + As = [zeros(2, 2) for _ = 1:2] + @test @inferred(cat(As...; dims=Val(3))) == zeros(2, 2, 2) + cat3v(As) = cat(As...; dims=Val(3)) + @test @inferred(cat3v(As)) == zeros(2, 2, 2) end function test_ind2sub(::Type{TestAbstractArray}) From d6ef75087bf00bd7384e1470226a3eef89a784e2 Mon Sep 17 00:00:00 2001 From: Henrique Becker Date: Tue, 19 Jan 2021 18:28:31 -0300 Subject: [PATCH 140/239] `include` only works on global scope (#39317) Just changed the ending of a phrase: "`include` behaves as if the contents of the source file were evaluated in its place." to "`include` behaves as if the contents of the source file were evaluated in the global scope of the including module." because I have already answered more than one person in Discourse trying to load variable definitions and code pieces from another file to inside a function scope (instead the global scope). --- doc/src/manual/modules.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/modules.md b/doc/src/manual/modules.md index 32090c3dc123a..664210e72cabf 100644 --- a/doc/src/manual/modules.md +++ b/doc/src/manual/modules.md @@ -26,8 +26,8 @@ end Files and file names are mostly unrelated to modules; modules are associated only with module expressions. One can have multiple files per module, and multiple modules per file. `include` -behaves as if the contents of the source file were evaluated in its place. In this chapter, we use -short and simplified examples, so we won't use `include`. +behaves as if the contents of the source file were evaluated in the global scope of the +including module. In this chapter, we use short and simplified examples, so we won't use `include`. The recommended style is not to indent the body of the module, since that would typically lead to whole files being indented. Also, it is common to use `UpperCamelCase` for module names (just like From 68133407404f3e1221385d495b47eb8585b258af Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Tue, 19 Jan 2021 22:37:34 +0100 Subject: [PATCH 141/239] Rebase: Performance regression of scalar randn() between Julia 1.4 and 1.5 (#39319) * definition of randn for scalars reverted to 1.4 * Added comments why this change is done Co-authored-by: Benjamin Lungwitz <52384612+lungben@users.noreply.github.com> --- stdlib/Random/src/normal.jl | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/stdlib/Random/src/normal.jl b/stdlib/Random/src/normal.jl index dc5ac5101e39d..8638d3d62c624 100644 --- a/stdlib/Random/src/normal.jl +++ b/stdlib/Random/src/normal.jl @@ -35,7 +35,26 @@ julia> randn(rng, ComplexF32, (2, 3)) 0.611224+1.56403im 0.355204-0.365563im 0.0905552+1.31012im ``` """ -@inline randn(rng::AbstractRNG=default_rng()) = _randn(rng, rand(rng, UInt52Raw())) +@inline function randn(rng::AbstractRNG=default_rng()) + #= + When defining + `@inline randn(rng::AbstractRNG=default_rng()) = _randn(rng, rand(rng, UInt52Raw()))` + the function call to `_randn` is currently not inlined, resulting in slightly worse + performance for scalar random normal numbers than repeating the code of `_randn` + inside the following function. + =# + @inbounds begin + r = rand(rng, UInt52Raw()) + + # the following code is identical to the one in `_randn(rng::AbstractRNG, r::UInt64)` + r &= 0x000fffffffffffff + rabs = Int64(r>>1) # One bit for the sign + idx = rabs & 0xFF + x = ifelse(r % Bool, -rabs, rabs)*wi[idx+1] + rabs < ki[idx+1] && return x # 99.3% of the time we return here 1st try + return randn_unlikely(rng, idx, rabs, x) + end +end @inline function _randn(rng::AbstractRNG, r::UInt64) @inbounds begin From 78d55e2445e810d34b396920dcdcc30d559c49a9 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 20 Jan 2021 00:46:13 -0600 Subject: [PATCH 142/239] Use lispy tuples in cat (fixes #21673) (#39314) The `cat` pipeline has long had poor inferrability. Together with #39292 and #39294, this should basically put an end to that problem. Together, at least in simple cases these make the performance of `cat` essentially equivalent to the manual version. In other words, the `test1` and `test2` of #21673 benchmark very similarly. --- base/abstractarray.jl | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 1f1120740e99a..383814ff38ddc 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1645,28 +1645,29 @@ _cat(dims, X...) = cat_t(promote_eltypeof(X...), X...; dims=dims) return __cat(A, shape, catdims, X...) end -function __cat(A, shape::NTuple{M}, catdims, X...) where M - N = M::Int - offsets = zeros(Int, N) - inds = Vector{UnitRange{Int}}(undef, N) - concat = copyto!(zeros(Bool, N), catdims) - for x in X - for i = 1:N - if concat[i] - inds[i] = offsets[i] .+ cat_indices(x, i) - offsets[i] += cat_size(x, i) - else - inds[i] = 1:shape[i] - end - end - I::NTuple{N, UnitRange{Int}} = (inds...,) - if x isa AbstractArray - A[I...] = x - else - fill!(view(A, I...), x) - end +# Why isn't this called `__cat!`? +__cat(A, shape, catdims, X...) = __cat_offset!(A, shape, catdims, ntuple(zero, length(shape)), X...) + +function __cat_offset!(A, shape, catdims, offsets, x, X...) + # splitting the "work" on x from X... may reduce latency (fewer costly specializations) + newoffsets = __cat_offset1!(A, shape, catdims, offsets, x) + return __cat_offset!(A, shape, catdims, newoffsets, X...) +end +__cat_offset!(A, shape, catdims, offsets) = A + +function __cat_offset1!(A, shape, catdims, offsets, x) + inds = ntuple(length(offsets)) do i + (i <= length(catdims) && catdims[i]) ? offsets[i] .+ cat_indices(x, i) : 1:shape[i] + end + if x isa AbstractArray + A[inds...] = x + else + fill!(view(A, inds...), x) + end + newoffsets = ntuple(length(offsets)) do i + (i <= length(catdims) && catdims[i]) ? offsets[i] + cat_size(x, i) : offsets[i] end - return A + return newoffsets end """ From caeaceff8af97565334f35309d812566183ec687 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 20 Jan 2021 03:28:09 -0500 Subject: [PATCH 143/239] make `extrema` with dims inferrable (#39321) fixes #39281 --- base/multidimensional.jl | 4 ++-- test/reduce.jl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/base/multidimensional.jl b/base/multidimensional.jl index 0fcd70b2d2a9e..32d66c4c54cda 100644 --- a/base/multidimensional.jl +++ b/base/multidimensional.jl @@ -1698,9 +1698,9 @@ extrema(f, A::AbstractArray; dims=:) = _extrema_dims(f, A, dims) _extrema_dims(f, A::AbstractArray, ::Colon) = _extrema_itr(f, A) function _extrema_dims(f, A::AbstractArray, dims) - sz = [size(A)...] + sz = size(A) for d in dims - sz[d] = 1 + sz = setindex(sz, 1, d) end T = promote_op(f, eltype(A)) B = Array{Tuple{T,T}}(undef, sz...) diff --git a/test/reduce.jl b/test/reduce.jl index 0876b30008f84..f87b2285480f4 100644 --- a/test/reduce.jl +++ b/test/reduce.jl @@ -643,3 +643,6 @@ end # make sure we specialize on mapfoldl(::Type, ...) @test @inferred(mapfoldl(Int, +, [1, 2, 3]; init=0)) === 6 + +# issue #39281 +@test @inferred(extrema(rand(2), dims=1)) isa Vector{Tuple{Float64,Float64}} From 5f10eb9085fd5a622430d020c8bc9141c7acb7c7 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 20 Jan 2021 12:04:43 -0500 Subject: [PATCH 144/239] inference: make Limited tracking part of the type lattice (#39116) This helps refine our knowledge of the `[limited]` flag setting, which previously would always exclude a result from the cache when hitting a cycle. However, we really only need to exclude a result if the result might be dependent on that flag setting. That makes this formally part of the lattice, though can be annoying to work with yet another wrapper, so we try to add/remove it late/early to propagate it when necessary. --- base/compiler/abstractinterpretation.jl | 59 ++++++-- base/compiler/inferencestate.jl | 30 +--- base/compiler/tfuncs.jl | 4 + base/compiler/typeinfer.jl | 176 +++++++++++++++--------- base/compiler/typelattice.jl | 50 ++++++- base/compiler/typelimits.jl | 22 ++- 6 files changed, 235 insertions(+), 106 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 7d07e94ed26fe..3ca8b29cf772f 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -12,9 +12,11 @@ const _REF_NAME = Ref.body.name # logic # ######### -# see if the inference result might affect the final answer -call_result_unused(frame::InferenceState, pc::LineNum=frame.currpc) = - isexpr(frame.src.code[frame.currpc], :call) && isempty(frame.ssavalue_uses[pc]) +# See if the inference result of the current statement's result value might affect +# the final answer for the method (aside from optimization potential and exceptions). +# To do that, we need to check both for slot assignment and SSA usage. +call_result_unused(frame::InferenceState) = + isexpr(frame.src.code[frame.currpc], :call) && isempty(frame.ssavalue_uses[frame.currpc]) # check if this return type is improvable (i.e. whether it's possible that with # more information, we might get a more precise type) @@ -192,6 +194,16 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), end end #print("=> ", rettype, "\n") + if rettype isa LimitedAccuracy + union!(sv.pclimitations, rettype.causes) + rettype = rettype.typ + end + if !isempty(sv.pclimitations) # remove self, if present + delete!(sv.pclimitations, sv) + for caller in sv.callers_in_cycle + delete!(sv.pclimitations, caller) + end + end return CallMeta(rettype, info) end @@ -313,7 +325,6 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, @nosp inf_result = InferenceResult(mi, argtypes) frame = InferenceState(inf_result, #=cache=#false, interp) frame === nothing && return Any # this is probably a bad generated function (unsound), but just ignore it - frame.limited = true frame.parent = sv push!(inf_cache, inf_result) typeinf(interp, frame) || return Any @@ -394,7 +405,7 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp parent = parent::InferenceState parent_method2 = parent.src.method_for_inference_limit_heuristics # limit only if user token match parent_method2 isa Method || (parent_method2 = nothing) # Union{Method, Nothing} - if (parent.cached || parent.limited) && parent.linfo.def === sv.linfo.def && sv_method2 === parent_method2 + if (parent.cached || parent.parent !== nothing) && parent.linfo.def === sv.linfo.def && sv_method2 === parent_method2 topmost = infstate edgecycle = true end @@ -443,7 +454,8 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp # (non-typically, this means that we lose the ability to detect a guaranteed StackOverflow in some cases) return Any, true, nothing end - poison_callstack(sv, topmost::InferenceState, true) + topmost = topmost::InferenceState + poison_callstack(sv, topmost.parent === nothing ? topmost : topmost.parent) sig = newsig sparams = svec() end @@ -1124,7 +1136,12 @@ function abstract_eval_value(interp::AbstractInterpreter, @nospecialize(e), vtyp if isa(e, Expr) return abstract_eval_value_expr(interp, e, vtypes, sv) else - return abstract_eval_special_value(interp, e, vtypes, sv) + typ = abstract_eval_special_value(interp, e, vtypes, sv) + if typ isa LimitedAccuracy + union!(sv.pclimitations, typ.causes) + typ = typ.typ + end + return typ end end @@ -1247,13 +1264,21 @@ function abstract_eval_statement(interp::AbstractInterpreter, @nospecialize(e), end end else - return abstract_eval_value_expr(interp, e, vtypes, sv) + t = abstract_eval_value_expr(interp, e, vtypes, sv) end @assert !isa(t, TypeVar) if isa(t, DataType) && isdefined(t, :instance) # replace singleton types with their equivalent Const object t = Const(t.instance) end + if !isempty(sv.pclimitations) + if t isa Const || t === Union{} + empty!(sv.pclimitations) + else + t = LimitedAccuracy(t, sv.pclimitations) + sv.pclimitations = IdSet{InferenceState}() + end + end return t end @@ -1308,10 +1333,18 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState) elseif isa(stmt, GotoIfNot) condt = abstract_eval_value(interp, stmt.cond, s[pc], frame) if condt === Bottom + empty!(frame.pclimitations) break end condval = maybe_extract_const_bool(condt) l = stmt.dest::Int + if !isempty(frame.pclimitations) + # we can't model the possible effect of control + # dependencies on the return value, so we propagate it + # directly to all the return values (unless we error first) + condval isa Bool || union!(frame.limitations, frame.pclimitations) + empty!(frame.pclimitations) + end # constant conditions if condval === true elseif condval === false @@ -1346,6 +1379,14 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState) # and is valid inter-procedurally rt = widenconst(rt) end + # copy limitations to return value + if !isempty(frame.pclimitations) + union!(frame.limitations, frame.pclimitations) + empty!(frame.pclimitations) + end + if !isempty(frame.limitations) + rt = LimitedAccuracy(rt, copy(frame.limitations)) + end if tchanged(rt, frame.bestguess) # new (wider) return type for frame frame.bestguess = tmerge(frame.bestguess, rt) @@ -1420,6 +1461,8 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState) end end + @assert isempty(frame.pclimitations) "unhandled LimitedAccuracy" + if t === nothing # mark other reached expressions as `Any` to indicate they don't throw frame.src.ssavaluetypes[pc] = Any diff --git a/base/compiler/inferencestate.jl b/base/compiler/inferencestate.jl index 988f2eefa261e..9d66f7d6268a9 100644 --- a/base/compiler/inferencestate.jl +++ b/base/compiler/inferencestate.jl @@ -10,6 +10,8 @@ mutable struct InferenceState slottypes::Vector{Any} mod::Module currpc::LineNum + pclimitations::IdSet{InferenceState} # causes of precision restrictions (LimitedAccuracy) on currpc ssavalue + limitations::IdSet{InferenceState} # causes of precision restrictions (LimitedAccuracy) on return # info on the state of inference and the linfo src::CodeInfo @@ -39,7 +41,6 @@ mutable struct InferenceState # TODO: move these to InferenceResult / Params? cached::Bool - limited::Bool inferred::Bool dont_work_on_me::Bool @@ -105,6 +106,7 @@ mutable struct InferenceState frame = new( InferenceParams(interp), result, linfo, sp, slottypes, inmodule, 0, + IdSet{InferenceState}(), IdSet{InferenceState}(), src, get_world_counter(interp), valid_worlds, nargs, s_types, s_edges, stmt_info, Union{}, W, 1, n, @@ -113,7 +115,7 @@ mutable struct InferenceState Vector{Tuple{InferenceState,LineNum}}(), # cycle_backedges Vector{InferenceState}(), # callers_in_cycle #=parent=#nothing, - cached, false, false, false, + cached, false, false, CachedMethodTable(method_table(interp)), interp) result.result = frame @@ -265,37 +267,13 @@ function add_mt_backedge!(mt::Core.MethodTable, @nospecialize(typ), caller::Infe nothing end -function poison_callstack(infstate::InferenceState, topmost::InferenceState, poison_topmost::Bool) - poison_topmost && (topmost = topmost.parent) - while !(infstate === topmost) - if call_result_unused(infstate) - # If we won't propagate the result any further (since it's typically unused), - # it's OK that we keep and cache the "limited" result in the parents - # (non-typically, this means that we lose the ability to detect a guaranteed StackOverflow in some cases) - # TODO: we might be able to halt progress much more strongly here, - # since now we know we won't be able to keep anything much that we learned. - # We were mainly only here to compute the calling convention return type, - # but in most situations now, we are unlikely to be able to use that information. - break - end - infstate.limited = true - for infstate_cycle in infstate.callers_in_cycle - infstate_cycle.limited = true - end - infstate = infstate.parent - infstate === nothing && return - end -end - function print_callstack(sv::InferenceState) while sv !== nothing print(sv.linfo) - sv.limited && print(" [limited]") !sv.cached && print(" [uncached]") println() for cycle in sv.callers_in_cycle print(' ', cycle.linfo) - cycle.limited && print(" [limited]") println() end sv = sv.parent diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index 80a01c0a54bd4..ef63fa6bb82cf 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1620,10 +1620,14 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s # output was computed to be constant return Const(typeof(rt.val)) else + inaccurate = nothing + rt isa LimitedAccuracy && (inaccurate = rt.causes; rt = rt.typ) rt = widenconst(rt) if hasuniquerep(rt) || rt === Bottom # output type was known for certain return Const(rt) + elseif inaccurate !== nothing + return LimitedAccuracy(Type{<:rt}, inaccurate) elseif (isa(tt, Const) || isconstType(tt)) && (isa(aft, Const) || isconstType(aft)) # input arguments were known for certain diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 07356eed211f0..4e0f44d10822e 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -28,7 +28,6 @@ struct InferenceFrameInfo sptypes::Vector{Any} slottypes::Vector{Any} nargs::Int - limited::Bool end function _typeinf_identifier(frame::Core.Compiler.InferenceState) @@ -38,7 +37,6 @@ function _typeinf_identifier(frame::Core.Compiler.InferenceState) copy(frame.sptypes), copy(frame.slottypes), frame.nargs, - frame.limited, ) return mi_info end @@ -85,7 +83,7 @@ function reset_timings() empty!(_timings) push!(_timings, Timing( # The MethodInstance for ROOT(), and default empty values for other fields. - InferenceFrameInfo(ROOTmi, 0x0, Any[], Any[Core.Const(ROOT)], 1, false), + InferenceFrameInfo(ROOTmi, 0x0, Any[], Any[Core.Const(ROOT)], 1), _time_ns())) return nothing end @@ -234,51 +232,45 @@ function _typeinf(interp::AbstractInterpreter, frame::InferenceState) results = Tuple{InferenceResult, Vector{Any}, Bool}[ ( frames[i].result, frames[i].stmt_edges[1], - frames[i].cached || frames[i].parent !== nothing ) + frames[i].cached ) for i in 1:length(frames) ] empty!(frames) - cached = frame.cached - if cached || frame.parent !== nothing - for (caller, _, doopt) in results + if may_optimize(interp) + for (caller, _, _) in results opt = caller.src if opt isa OptimizationState - run_optimizer = doopt && may_optimize(interp) - if run_optimizer - optimize(interp, opt, OptimizationParams(interp), caller.result) - finish(opt.src, interp) - # finish updating the result struct - validate_code_in_debug_mode(opt.linfo, opt.src, "optimized") - if opt.const_api - if caller.result isa Const - caller.src = caller.result - else - @assert isconstType(caller.result) - caller.src = Const(caller.result.parameters[1]) - end - elseif opt.src.inferred - caller.src = opt.src::CodeInfo # stash a copy of the code (for inlining) + result_type = caller.result + @assert !(result_type isa LimitedAccuracy) + optimize(interp, opt, OptimizationParams(interp), result_type) + finish(opt.src, interp) + # finish updating the result struct + validate_code_in_debug_mode(opt.linfo, opt.src, "optimized") + if opt.const_api + if result_type isa Const + caller.src = result_type else - caller.src = nothing + @assert isconstType(result_type) + caller.src = Const(result_type.parameters[1]) end + elseif opt.src.inferred + caller.src = opt.src::CodeInfo # stash a copy of the code (for inlining) + else + caller.src = nothing end caller.valid_worlds = opt.inlining.et.valid_worlds[] end end end - for (caller, edges, doopt) in results + for (caller, edges, cached) in results valid_worlds = caller.valid_worlds - if last(valid_worlds) == get_world_counter() - valid_worlds = WorldRange(first(valid_worlds), typemax(UInt)) - end - caller.valid_worlds = valid_worlds - if cached - cache_result!(interp, caller) - end - if doopt && last(valid_worlds) == typemax(UInt) + if last(valid_worlds) >= get_world_counter() # if we aren't cached, we don't need this edge # but our caller might, so let's just make it anyways store_backedges(caller, edges) end + if cached + cache_result!(interp, caller) + end end return true end @@ -286,20 +278,22 @@ end function CodeInstance(result::InferenceResult, @nospecialize(inferred_result::Any), valid_worlds::WorldRange) local const_flags::Int32 + result_type = result.result + @assert !(result_type isa LimitedAccuracy) if inferred_result isa Const # use constant calling convention rettype_const = (result.src::Const).val const_flags = 0x3 inferred_result = nothing else - if isa(result.result, Const) - rettype_const = (result.result::Const).val + if isa(result_type, Const) + rettype_const = result_type.val const_flags = 0x2 - elseif isconstType(result.result) - rettype_const = result.result.parameters[1] + elseif isconstType(result_type) + rettype_const = result_type.parameters[1] const_flags = 0x2 - elseif isa(result.result, PartialStruct) - rettype_const = (result.result::PartialStruct).fields + elseif isa(result_type, PartialStruct) + rettype_const = result_type.fields const_flags = 0x2 else rettype_const = nothing @@ -307,7 +301,7 @@ function CodeInstance(result::InferenceResult, @nospecialize(inferred_result::An end end return CodeInstance(result.linfo, - widenconst(result.result), rettype_const, inferred_result, + widenconst(result_type), rettype_const, inferred_result, const_flags, first(valid_worlds), last(valid_worlds)) end @@ -365,6 +359,11 @@ end function cache_result!(interp::AbstractInterpreter, result::InferenceResult) valid_worlds = result.valid_worlds + if last(valid_worlds) == get_world_counter() + # if we've successfully recorded all of the backedges in the global reverse-cache, + # we can now widen our applicability in the global cache too + valid_worlds = WorldRange(first(valid_worlds), typemax(UInt)) + end # check if the existing linfo metadata is also sufficient to describe the current inference result # to decide if it is worth caching this already_inferred = already_inferred_quick_test(interp, result.linfo) @@ -381,6 +380,28 @@ function cache_result!(interp::AbstractInterpreter, result::InferenceResult) nothing end +function cycle_fix_limited(@nospecialize(typ), sv::InferenceState) + if typ isa LimitedAccuracy + if sv.parent === nothing + # when part of a cycle, we might have unintentionally introduced a limit marker + @assert !isempty(sv.callers_in_cycle) + return typ.typ + end + causes = copy(typ.causes) + delete!(causes, sv) + for caller in sv.callers_in_cycle + delete!(causes, caller) + end + if isempty(causes) + return typ.typ + end + if length(causes) != length(typ.causes) + return LimitedAccuracy(typ.typ, causes) + end + end + return typ +end + # inference completed on `me` # update the MethodInstance function finish(me::InferenceState, interp::AbstractInterpreter) @@ -400,16 +421,43 @@ function finish(me::InferenceState, interp::AbstractInterpreter) append!(s_edges, me.src.edges) me.src.edges = nothing end - if me.limited && me.cached && me.parent !== nothing - # a top parent will be cached still, but not this intermediate work + # inspect whether our inference had a limited result accuracy, + # else it may be suitable to cache + me.bestguess = cycle_fix_limited(me.bestguess, me) + limited_ret = me.bestguess isa LimitedAccuracy + limited_src = false + if !limited_ret + gt = me.src.ssavaluetypes + for j = 1:length(gt) + gt[j] = gtj = cycle_fix_limited(gt[j], me) + if gtj isa LimitedAccuracy && me.parent !== nothing + limited_src = true + break + end + end + end + if limited_ret + # a parent may be cached still, but not this intermediate work: # we can throw everything else away now + me.result.src = nothing me.cached = false + me.src.inlineable = false unlock_mi_inference(interp, me.linfo) + elseif limited_src + # a type result will be cached still, but not this intermediate work: + # we can throw everything else away now + me.result.src = nothing me.src.inlineable = false else - # annotate fulltree with type information - type_annotate!(me) - me.result.src = OptimizationState(me, OptimizationParams(interp), interp) + # annotate fulltree with type information, + # either because we are the outermost code, or we might use this later + doopt = (me.cached || me.parent !== nothing) + type_annotate!(me, doopt) + if doopt + me.result.src = OptimizationState(me, OptimizationParams(interp), interp) + else + me.result.src = me.src::CodeInfo # stash a convenience copy of the code (e.g. for reflection) + end end me.result.valid_worlds = me.valid_worlds me.result.result = me.bestguess @@ -497,7 +545,7 @@ end function visit_slot_load!(sl::Slot, vtypes::VarTable, sv::InferenceState, undefs::Array{Bool,1}) id = slot_id(sl) s = vtypes[id] - vt = widenconditional(s.typ) + vt = widenconditional(ignorelimited(s.typ)) if s.undef # find used-undef variables undefs[id] = true @@ -542,10 +590,9 @@ function record_slot_assign!(sv::InferenceState) end # annotate types of all symbols in AST -function type_annotate!(sv::InferenceState) - # delete dead statements only if we're building this IR to cache it - # (otherwise, we'll run the optimization passes later, outside of inference) - run_optimizer = (sv.cached || sv.parent !== nothing) +function type_annotate!(sv::InferenceState, run_optimizer::Bool) + # as an optimization, we delete dead statements immediately if we're going to run the optimizer + # (otherwise, we'll perhaps run the optimization passes later, outside of inference) # remove all unused ssa values gt = sv.src.ssavaluetypes @@ -560,6 +607,7 @@ function type_annotate!(sv::InferenceState) # to hold all of the items assigned into it record_slot_assign!(sv) sv.src.slottypes = sv.slottypes + @assert !(sv.bestguess isa LimitedAccuracy) sv.src.rettype = sv.bestguess # annotate variables load types @@ -655,7 +703,7 @@ function union_caller_cycle!(a::InferenceState, b::InferenceState) return end -function merge_call_chain!(parent::InferenceState, ancestor::InferenceState, child::InferenceState, limited::Bool) +function merge_call_chain!(parent::InferenceState, ancestor::InferenceState, child::InferenceState) # add backedge of parent <- child # then add all backedges of parent <- parent.parent # and merge all of the callers into ancestor.callers_in_cycle @@ -667,17 +715,17 @@ function merge_call_chain!(parent::InferenceState, ancestor::InferenceState, chi parent = child.parent child === ancestor && break end - if limited - for caller in ancestor.callers_in_cycle - caller.limited = true - end - end end function is_same_frame(interp::AbstractInterpreter, linfo::MethodInstance, frame::InferenceState) return linfo === frame.linfo end +function poison_callstack(infstate::InferenceState, topmost::InferenceState) + push!(infstate.pclimitations, topmost) + nothing +end + # Walk through `linfo`'s upstream call chain, starting at `parent`. If a parent # frame matching `linfo` is encountered, then there is a cycle in the call graph # (i.e. `linfo` is a descendant callee of itself). Upon encountering this cycle, @@ -688,28 +736,26 @@ end function resolve_call_cycle!(interp::AbstractInterpreter, linfo::MethodInstance, parent::InferenceState) frame = parent uncached = false - limited = false while isa(frame, InferenceState) uncached |= !frame.cached # ensure we never add an uncached frame to a cycle - limited |= frame.limited if is_same_frame(interp, linfo, frame) if uncached # our attempt to speculate into a constant call lead to an undesired self-cycle # that cannot be converged: poison our call-stack (up to the discovered duplicate frame) # with the limited flag and abort (set return type to Any) now - poison_callstack(parent, frame, false) + poison_callstack(parent, frame) return true end - merge_call_chain!(parent, frame, frame, limited) + merge_call_chain!(parent, frame, frame) return frame end for caller in frame.callers_in_cycle if is_same_frame(interp, linfo, caller) if uncached - poison_callstack(parent, frame, false) + poison_callstack(parent, frame) return true end - merge_call_chain!(parent, frame, caller, limited) + merge_call_chain!(parent, frame, caller) return caller end end @@ -754,7 +800,7 @@ function typeinf_edge(interp::AbstractInterpreter, method::Method, @nospecialize unlock_mi_inference(interp, mi) return Any, nothing end - if caller.cached || caller.limited # don't involve uncached functions in cycle resolution + if caller.cached || caller.parent !== nothing # don't involve uncached functions in cycle resolution frame.parent = caller end typeinf(interp, frame) @@ -782,12 +828,12 @@ function typeinf_code(interp::AbstractInterpreter, method::Method, @nospecialize if typeinf(interp, frame) && run_optimizer opt_params = OptimizationParams(interp) opt = OptimizationState(frame, opt_params, interp) - optimize(interp, opt, opt_params, result.result) + optimize(interp, opt, opt_params, ignorelimited(result.result)) opt.src.inferred = true end ccall(:jl_typeinf_end, Cvoid, ()) frame.inferred || return (nothing, Any) - return (frame.src, widenconst(result.result)) + return (frame.src, widenconst(ignorelimited(result.result))) end # compute (and cache) an inferred AST and return type @@ -868,7 +914,7 @@ function typeinf_type(interp::AbstractInterpreter, method::Method, @nospecialize typeinf(interp, frame, true) ccall(:jl_typeinf_end, Cvoid, ()) frame.result isa InferenceState && return nothing - return widenconst(frame.result) + return widenconst(ignorelimited(frame.result)) end # This is a bridge for the C code calling `jl_typeinf_func()` diff --git a/base/compiler/typelattice.jl b/base/compiler/typelattice.jl index db9fbce7d59fb..71188d28f5d3c 100644 --- a/base/compiler/typelattice.jl +++ b/base/compiler/typelattice.jl @@ -56,6 +56,7 @@ end # Wraps a type and represents that the value may also be undef at this point. # (only used in optimize, not abstractinterpret) +# N.B. in the lattice, this is epsilon bigger than `typ` (even Any) struct MaybeUndef typ MaybeUndef(@nospecialize(typ)) = new(typ) @@ -77,6 +78,16 @@ struct StateUpdate state::VarTable end +# Represent that the type estimate has been approximated, due to "causes" +# (only used in abstractinterpret, doesn't appear in optimize) +# N.B. in the lattice, this is epsilon smaller than `typ` (except Union{}) +struct LimitedAccuracy + typ + causes::IdSet{InferenceState} + LimitedAccuracy(@nospecialize(typ), causes::IdSet{InferenceState}) = + new(typ, causes) +end + struct NotFound end const NOT_FOUND = NotFound() @@ -113,6 +124,16 @@ end maybe_extract_const_bool(@nospecialize c) = nothing function ⊑(@nospecialize(a), @nospecialize(b)) + if isa(b, LimitedAccuracy) + if !isa(a, LimitedAccuracy) + return false + end + if b.causes ⊈ a.causes + return false + end + b = b.typ + end + isa(a, LimitedAccuracy) && (a = a.typ) if isa(a, MaybeUndef) && !isa(b, MaybeUndef) return false end @@ -222,6 +243,7 @@ widenconst(t::PartialStruct) = t.typ widenconst(t::Type) = t widenconst(t::TypeVar) = t widenconst(t::Core.TypeofVararg) = t +widenconst(t::LimitedAccuracy) = error("unhandled LimitedAccuracy") issubstate(a::VarState, b::VarState) = (a.typ ⊑ b.typ && a.undef <= b.undef) @@ -247,6 +269,10 @@ function widenconditional(typ::Conditional) return Bool end end +widenconditional(t::LimitedAccuracy) = error("unhandled LimitedAccuracy") + +ignorelimited(@nospecialize typ) = typ +ignorelimited(typ::LimitedAccuracy) = typ.typ function stupdate!(state::Nothing, changes::StateUpdate) newst = copy(changes.state) @@ -257,9 +283,13 @@ function stupdate!(state::Nothing, changes::StateUpdate) for i = 1:length(newst) newtype = newst[i] if isa(newtype, VarState) - newtypetyp = newtype.typ + newtypetyp = ignorelimited(newtype.typ) if isa(newtypetyp, Conditional) && slot_id(newtypetyp.var) == changeid - newst[i] = VarState(widenconditional(newtypetyp), newtype.undef) + newtypetyp = widenconditional(newtypetyp) + if newtype.typ isa LimitedAccuracy + newtypetyp = LimitedAccuracy(newtypetyp, newtype.typ.causes) + end + newst[i] = VarState(newtypetyp, newtype.undef) end end end @@ -282,9 +312,13 @@ function stupdate!(state::VarTable, changes::StateUpdate) oldtype = state[i] # remove any Conditional for this Slot from the vtable if isa(newtype, VarState) - newtypetyp = newtype.typ + newtypetyp = ignorelimited(newtype.typ) if isa(newtypetyp, Conditional) && slot_id(newtypetyp.var) == changeid - newtype = VarState(widenconditional(newtypetyp), newtype.undef) + newtypetyp = widenconditional(newtypetyp) + if newtype.typ isa LimitedAccuracy + newtypetyp = LimitedAccuracy(newtypetyp, newtype.typ.causes) + end + newtype = VarState(newtypetyp, newtype.undef) end end if schanged(newtype, oldtype) @@ -321,9 +355,13 @@ function stupdate1!(state::VarTable, change::StateUpdate) for i = 1:length(state) oldtype = state[i] if isa(oldtype, VarState) - oldtypetyp = oldtype.typ + oldtypetyp = ignorelimited(oldtype.typ) if isa(oldtypetyp, Conditional) && slot_id(oldtypetyp.var) == changeid - state[i] = VarState(widenconditional(oldtypetyp), oldtype.undef) + oldtypetyp = widenconditional(oldtypetyp) + if oldtype.typ isa LimitedAccuracy + oldtypetyp = LimitedAccuracy(oldtypetyp, oldtype.typ.causes) + end + state[i] = VarState(oldtypetyp, oldtype.undef) end end end diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index ce264b576f6b3..c4193d94fd525 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -276,7 +276,9 @@ union_count_abstract(x::Union) = union_count_abstract(x.a) + union_count_abstrac union_count_abstract(@nospecialize(x)) = !isdispatchelem(x) function issimpleenoughtype(@nospecialize t) - return unionlen(t)+union_count_abstract(t) <= MAX_TYPEUNION_LENGTH && unioncomplexity(t) <= MAX_TYPEUNION_COMPLEXITY + t = ignorelimited(t) + return unionlen(t) + union_count_abstract(t) <= MAX_TYPEUNION_LENGTH && + unioncomplexity(t) <= MAX_TYPEUNION_COMPLEXITY end # pick a wider type that contains both typea and typeb, @@ -292,6 +294,24 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb)) suba && subb && return typea subb && issimpleenoughtype(typea) && return typea + # type-lattice for LimitedAccuracy wrapper + # the merge create a slightly narrower type than needed, but we can't + # represent the precise intersection of causes and don't attempt to + # enumerate some of these cases where we could + if isa(typea, LimitedAccuracy) && isa(typeb, LimitedAccuracy) + if typea.causes ⊆ typeb.causes + causes = typeb.causes + elseif typeb.causes ⊆ typea.causes + causes = typea.causes + else + causes = union!(copy(typea.causes), typeb.causes) + end + return LimitedAccuracy(tmerge(typea.typ, typeb.typ), causes) + elseif isa(typea, LimitedAccuracy) + return LimitedAccuracy(tmerge(typea.typ, typeb), typea.causes) + elseif isa(typeb, LimitedAccuracy) + return LimitedAccuracy(tmerge(typea, typeb.typ), typeb.causes) + end # type-lattice for MaybeUndef wrapper if isa(typea, MaybeUndef) || isa(typeb, MaybeUndef) return MaybeUndef(tmerge( From 43c7d025c9c7ced598e03c36c22052ba6d28fe34 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 20 Jan 2021 12:51:47 -0500 Subject: [PATCH 145/239] fix failing `enable_finalizers` test --- test/misc.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/misc.jl b/test/misc.jl index d3318838f6ce8..76be4e036dd5c 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -149,7 +149,10 @@ for l in (Threads.SpinLock(), ReentrantLock()) @test get_finalizers_inhibited() == 1 GC.enable_finalizers(true) @test get_finalizers_inhibited() == 0 - @test_warn "WARNING: GC finalizers already enabled on this thread." GC.enable_finalizers(true) + if ccall(:jl_is_debugbuild, Cint, ()) != 0 + # Note this warning only exists in debug builds + @test_warn "WARNING: GC finalizers already enabled on this thread." GC.enable_finalizers(true) + end @test lock(l) === nothing @test try unlock(l) finally end === nothing From 0ed0a8192822120008cc779a82b480c011bf06cd Mon Sep 17 00:00:00 2001 From: Denis Barucic Date: Wed, 20 Jan 2021 20:10:12 +0100 Subject: [PATCH 146/239] Docs: add note about `IOBuffer` to `countlines` and `eachline` (#39331) --- base/io.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/io.jl b/base/io.jl index d03cb0bbba1fe..e86130a25f7a6 100644 --- a/base/io.jl +++ b/base/io.jl @@ -988,6 +988,8 @@ retained. When called with a file name, the file is opened once at the beginning iteration and closed at the end. If iteration is interrupted, the file will be closed when the `EachLine` object is garbage collected. +To iterate over each line of a `String`, `eachline(IOBuffer(str))` can be used. + # Examples ```jldoctest julia> open("my_file.txt", "w") do io @@ -1157,6 +1159,8 @@ pass the filename as the first argument. EOL markers other than `'\\n'` are supp passing them as the second argument. The last non-empty line of `io` is counted even if it does not end with the EOL, matching the length returned by [`eachline`](@ref) and [`readlines`](@ref). +To count lines of a `String`, `countlines(IOBuffer(str))` can be used. + # Examples ```jldoctest julia> io = IOBuffer("JuliaLang is a GitHub organization.\\n"); From c19d389a00b4a15058c16ac46a991aa312c6fc40 Mon Sep 17 00:00:00 2001 From: Paul Bayer Date: Wed, 20 Jan 2021 20:14:05 +0100 Subject: [PATCH 147/239] Update threadingconstructs.jl (#39309) I try to make clearer that the task **is scheduled** to run on an available thread. This makes an important difference since between the creation of the task and its allocation to a thread may be a time delay. see: [discussion on Discourse](https://discourse.julialang.org/t/looking-for-code-to-solve-surely-common-embarrassing-parallelism-multithreading-use-case/53527/9) --- base/threadingconstructs.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base/threadingconstructs.jl b/base/threadingconstructs.jl index 27096e1ba8be6..f35cb37da990b 100644 --- a/base/threadingconstructs.jl +++ b/base/threadingconstructs.jl @@ -146,9 +146,10 @@ end """ Threads.@spawn expr -Create and run a [`Task`](@ref) on any available thread. To wait for the task to -finish, call [`wait`](@ref) on the result of this macro, or call [`fetch`](@ref) -to wait and then obtain its return value. +Create a [`Task`](@ref) and [`schedule`](@ref) it to run on any available thread. +The task is allocated to a thread after it becomes available. To wait for the task +to finish, call [`wait`](@ref) on the result of this macro, or call [`fetch`](@ref) to +wait and then obtain its return value. Values can be interpolated into `@spawn` via `\$`, which copies the value directly into the constructed underlying closure. This allows you to insert the _value_ of a variable, From 104598682b4d9ac3f33a99814418e4c44a09bb58 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:29:24 +0100 Subject: [PATCH 148/239] Avoid type widening in range_stop_length (#39283) --- base/range.jl | 4 +++- test/ranges.jl | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 6e5a86f9c863f..cc7c0c86f4739 100644 --- a/base/range.jl +++ b/base/range.jl @@ -145,7 +145,9 @@ _range(start::Any , step::Any , stop::Nothing, len::Any ) = range_start _range(start::Any , step::Any , stop::Any , len::Nothing) = range_start_step_stop(start, step, stop) _range(start::Any , step::Any , stop::Any , len::Any ) = range_error(start, step, stop, len) -range_stop_length(stop, length) = (stop-length+1):stop +range_stop_length(a::Real, len::Integer) = UnitRange{typeof(a)}(oftype(a, a-len+1), a) +range_stop_length(a::AbstractFloat, len::Integer) = range_step_stop_length(oftype(a, 1), a, len) +range_stop_length(a, len::Integer) = range_step_stop_length(oftype(a-a, 1), a, len) range_step_stop_length(step, stop, length) = reverse(range_start_step_length(stop, -step, length)) diff --git a/test/ranges.jl b/test/ranges.jl index b9f77f211193d..899cba13f47b9 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -17,6 +17,10 @@ # the next one uses ==, because it changes the eltype @test r == range(start=first(r), stop=last(r), length=length(r)) @test r === range( stop=last(r), length=length(r)) + + for T = (Int8, Rational{Int16}, UInt32, Float64, Char) + @test typeof(range(start=T(5), length=3)) === typeof(range(stop=T(5), length=3)) + end end end From 814945c34f125e12f66c37605b67eb348d4b9cd2 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:31:00 +0100 Subject: [PATCH 149/239] Simplify range_start_stop_length (#39272) --- base/range.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/base/range.jl b/base/range.jl index cc7c0c86f4739..dacf60212b19c 100644 --- a/base/range.jl +++ b/base/range.jl @@ -515,11 +515,8 @@ function LinRange(start, stop, len::Integer) LinRange{T}(start, stop, len) end -function range_start_stop_length(start::T, stop::S, len::Integer) where {T,S} - a, b = promote(start, stop) - range_start_stop_length(a, b, len) -end -range_start_stop_length(start::T, stop::T, len::Integer) where {T<:Real} = LinRange{T}(start, stop, len) +range_start_stop_length(start, stop, len::Integer) = + range_start_stop_length(promote(start, stop)..., len) range_start_stop_length(start::T, stop::T, len::Integer) where {T} = LinRange{T}(start, stop, len) range_start_stop_length(start::T, stop::T, len::Integer) where {T<:Integer} = _linspace(float(T), start, stop, len) From 985158ff5b138954c87db273ebfed2ca4321a67c Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 20 Jan 2021 18:25:04 -0500 Subject: [PATCH 150/239] OpaqueClosure - Runtime & Codegen only (#39023) This is #37849 modulo inference/optimization support. This is self-contained and the functionality tests pass, though the tests testing for various optimizations of course don't (they're marked as test_broken). --- base/compiler/ssair/ir.jl | 3 +- base/compiler/validation.jl | 3 +- base/experimental.jl | 3 + base/opaque_closure.jl | 27 +++ base/reflection.jl | 17 ++ src/Makefile | 2 +- src/ast.c | 4 + src/builtins.c | 4 + src/clangsa/GCChecker.cpp | 1 + src/codegen.cpp | 236 ++++++++++++++++++++-- src/datatype.c | 3 +- src/dump.c | 10 +- src/gf.c | 5 +- src/interpreter.c | 47 +++++ src/jl_exported_data.inc | 5 +- src/jltypes.c | 20 +- src/julia-syntax.scm | 145 ++++++++----- src/julia.h | 33 ++- src/julia_internal.h | 11 + src/method.c | 37 ++++ src/opaque_closure.c | 91 +++++++++ src/staticdata.c | 6 +- src/toplevel.c | 23 ++- src/utils.scm | 10 + stdlib/Serialization/src/Serialization.jl | 19 +- test/choosetests.jl | 2 +- test/opaque_closure.jl | 152 ++++++++++++++ test/precompile.jl | 13 ++ 28 files changed, 827 insertions(+), 105 deletions(-) create mode 100644 base/opaque_closure.jl create mode 100644 src/opaque_closure.c create mode 100644 test/opaque_closure.jl diff --git a/base/compiler/ssair/ir.jl b/base/compiler/ssair/ir.jl index 87c7a1b30b2f2..7c02f303d99f7 100644 --- a/base/compiler/ssair/ir.jl +++ b/base/compiler/ssair/ir.jl @@ -375,7 +375,8 @@ function is_relevant_expr(e::Expr) :gc_preserve_begin, :gc_preserve_end, :foreigncall, :isdefined, :copyast, :undefcheck, :throw_undef_if_not, - :cfunction, :method, :pop_exception) + :cfunction, :method, :pop_exception, + :new_opaque_closure) end function setindex!(x::UseRef, @nospecialize(v)) diff --git a/base/compiler/validation.jl b/base/compiler/validation.jl index df618d0033f60..d77541fda2063 100644 --- a/base/compiler/validation.jl +++ b/base/compiler/validation.jl @@ -30,7 +30,8 @@ const VALID_EXPR_HEADS = IdDict{Any,Any}( :thunk => 1:1, :throw_undef_if_not => 2:2, :aliasscope => 0:0, - :popaliasscope => 0:0 + :popaliasscope => 0:0, + :new_opaque_closure => 4:typemax(Int) ) # @enum isn't defined yet, otherwise I'd use it for this diff --git a/base/experimental.jl b/base/experimental.jl index 3e5038fb99739..b928b6ba0e1d9 100644 --- a/base/experimental.jl +++ b/base/experimental.jl @@ -252,4 +252,7 @@ function show_error_hints(io, ex, args...) end end +# OpaqueClosure +include("opaque_closure.jl") + end diff --git a/base/opaque_closure.jl b/base/opaque_closure.jl new file mode 100644 index 0000000000000..1df89454d569f --- /dev/null +++ b/base/opaque_closure.jl @@ -0,0 +1,27 @@ +function show(io::IO, oc::Core.OpaqueClosure) + A, R = typeof(oc).parameters + show_tuple_as_call(io, Symbol(""), A; hasfirst=false) + print(io, "::", R) + print(io, "->◌") +end + +function show(io::IO, ::MIME"text/plain", oc::Core.OpaqueClosure{A, R}) where {A, R} + show(io, oc) +end + +""" + @opaque (args...) -> body + +Marks a given closure as "opaque". Opaque closures capture the +world age of their creation (as opposed to their invocation). +This allows for more aggressive optimization of the capture +list, but trades off against the ability to inline opaque +closures at the call site, if their creation is not statically +visible. + +!!! warning + This interface is experimental and subject to change or removal without notice. +""" +macro opaque(ex) + esc(Expr(:opaque_closure, ex)) +end diff --git a/base/reflection.jl b/base/reflection.jl index d13601ff6d16a..5e905a2fd103f 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -1140,6 +1140,9 @@ function code_typed(@nospecialize(f), @nospecialize(types=Tuple); if isa(f, Core.Builtin) throw(ArgumentError("argument is not a generic function")) end + if isa(f, Core.OpaqueClosure) + return code_typed_opaque_closure(f, types; optimize, debuginfo, interp) + end ft = Core.Typeof(f) if isa(types, Type) u = unwrap_unionall(types) @@ -1186,6 +1189,20 @@ function code_typed_by_type(@nospecialize(tt::Type); return asts end +function code_typed_opaque_closure(@nospecialize(closure::Core.OpaqueClosure), @nospecialize(types=Tuple); + optimize=true, + debuginfo::Symbol=:default, + interp = Core.Compiler.NativeInterpreter(closure.world)) + ccall(:jl_is_in_pure_context, Bool, ()) && error("code reflection cannot be used from generated functions") + if isa(closure.source, Method) + code = _uncompressed_ir(closure.source, closure.source.source) + debuginfo === :none && remove_linenums!(code) + return Any[Pair{CodeInfo,Any}(code, code.rettype)] + else + error("encountered invalid Core.OpaqueClosure object") + end +end + function return_types(@nospecialize(f), @nospecialize(types=Tuple), interp=Core.Compiler.NativeInterpreter()) ccall(:jl_is_in_pure_context, Bool, ()) && error("code reflection cannot be used from generated functions") if isa(f, Core.Builtin) diff --git a/src/Makefile b/src/Makefile index 0de23588bcfab..ab2b21dc1d21b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -45,7 +45,7 @@ RUNTIME_SRCS := \ simplevector runtime_intrinsics precompile \ threading partr stackwalk gc gc-debug gc-pages gc-stacks method \ jlapi signal-handling safepoint timing subtype \ - crc32c APInt-C processor ircode + crc32c APInt-C processor ircode opaque_closure SRCS := jloptions runtime_ccall rtutils LLVMLINK := diff --git a/src/ast.c b/src/ast.c index 90a953098223d..1206db9f7bb8f 100644 --- a/src/ast.c +++ b/src/ast.c @@ -43,6 +43,8 @@ jl_sym_t *pop_exception_sym; jl_sym_t *exc_sym; jl_sym_t *error_sym; jl_sym_t *new_sym; jl_sym_t *using_sym; jl_sym_t *splatnew_sym; +jl_sym_t *new_opaque_closure_sym; +jl_sym_t *opaque_closure_method_sym; jl_sym_t *const_sym; jl_sym_t *thunk_sym; jl_sym_t *foreigncall_sym; jl_sym_t *as_sym; jl_sym_t *global_sym; jl_sym_t *list_sym; @@ -359,6 +361,8 @@ void jl_init_common_symbols(void) pop_exception_sym = jl_symbol("pop_exception"); new_sym = jl_symbol("new"); splatnew_sym = jl_symbol("splatnew"); + new_opaque_closure_sym = jl_symbol("new_opaque_closure"); + opaque_closure_method_sym = jl_symbol("opaque_closure_method"); const_sym = jl_symbol("const"); global_sym = jl_symbol("global"); thunk_sym = jl_symbol("thunk"); diff --git a/src/builtins.c b/src/builtins.c index 076e1c4fc44f2..9844545c8a24d 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -1503,6 +1503,9 @@ void jl_init_intrinsic_functions(void) JL_GC_DISABLED inm->parent = jl_core_module; jl_set_const(jl_core_module, jl_symbol("Intrinsics"), (jl_value_t*)inm); jl_mk_builtin_func(jl_intrinsic_type, "IntrinsicFunction", jl_f_intrinsic_call); + jl_mk_builtin_func( + (jl_datatype_t*)jl_unwrap_unionall((jl_value_t*)jl_opaque_closure_type), + "OpaqueClosure", jl_f_opaque_closure_call); #define ADD_I(name, nargs) add_intrinsic(inm, #name, name); #define ADD_HIDDEN(name, nargs) @@ -1618,6 +1621,7 @@ void jl_init_primitives(void) JL_GC_DISABLED add_builtin("Ptr", (jl_value_t*)jl_pointer_type); add_builtin("LLVMPtr", (jl_value_t*)jl_llvmpointer_type); add_builtin("Task", (jl_value_t*)jl_task_type); + add_builtin("OpaqueClosure", (jl_value_t*)jl_opaque_closure_type); add_builtin("AbstractArray", (jl_value_t*)jl_abstractarray_type); add_builtin("DenseArray", (jl_value_t*)jl_densearray_type); diff --git a/src/clangsa/GCChecker.cpp b/src/clangsa/GCChecker.cpp index e6af4e6647fdc..51b457b7acb88 100644 --- a/src/clangsa/GCChecker.cpp +++ b/src/clangsa/GCChecker.cpp @@ -753,6 +753,7 @@ bool GCChecker::isGCTrackedType(QualType QT) { Name.endswith_lower("jl_uniontype_t") || Name.endswith_lower("jl_method_match_t") || Name.endswith_lower("jl_vararg_t") || + Name.endswith_lower("jl_opaque_closure_t") || // Probably not technically true for these, but let's allow // it Name.endswith_lower("typemap_intersection_env") || diff --git a/src/codegen.cpp b/src/codegen.cpp index a4ffb0a760e5e..18f456d3b8fe6 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -324,6 +324,7 @@ struct JuliaFunction { } Function *realize(jl_codectx_t &ctx); }; + template static inline void add_named_global(JuliaFunction *name, T *addr) { @@ -862,6 +863,8 @@ static const std::map builtin_func_map = { { &jl_f_apply_type, new JuliaFunction{"jl_f_apply_type", get_func_sig, get_func_attrs} }, }; +static const auto jl_new_opaque_closure_jlcall_func = new JuliaFunction{"jl_new_opaque_closure_jlcall", get_func_sig, get_func_attrs}; + static int globalUnique = 0; // --- code generation --- @@ -1064,6 +1067,7 @@ class jl_codectx_t { std::vector SAvalues; std::vector> PhiNodes; std::vector ssavalue_assigned; + std::vector> oc_modules; jl_module_t *module = NULL; jl_method_instance_t *linfo = NULL; jl_value_t *rettype = NULL; @@ -1083,6 +1087,7 @@ class jl_codectx_t { int nReqArgs = 0; int nargs = 0; int nvargs = -1; + bool is_opaque_closure = false; CallInst *ptlsStates = NULL; Value *signalPage = NULL; @@ -2635,6 +2640,14 @@ static Value *emit_f_is(jl_codectx_t &ctx, const jl_cgval_t &arg1, const jl_cgva return emit_box_compare(ctx, arg1, arg2, nullcheck1, nullcheck2); } +static std::pair, jl_llvm_functions_t> + emit_function( + jl_method_instance_t *lam, + jl_code_info_t *src, + jl_value_t *jlrettype, + jl_codegen_params_t ¶ms, + bool vaOverride = false); + static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, const jl_cgval_t *argv, size_t nargs, jl_value_t *rt, jl_expr_t *ex) @@ -3239,6 +3252,7 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } return true; } + return false; } @@ -4249,7 +4263,7 @@ static void emit_stmtpos(jl_codectx_t &ctx, jl_value_t *expr, int ssaval_result) return; } else { - if (!jl_is_method(ctx.linfo->def.method)) { + if (!jl_is_method(ctx.linfo->def.method) && !ctx.is_opaque_closure) { // TODO: inference is invalid if this has any effect (which it often does) Value *world = ctx.builder.CreateAlignedLoad(prepare_global_in(jl_Module, jlgetworld_global), Align(sizeof(size_t))); // TODO: world->setOrdering(AtomicOrdering::Monotonic); @@ -4488,6 +4502,144 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaval) // it to the inferred type. return mark_julia_type(ctx, val, true, (jl_value_t*)jl_any_type); } + else if (head == new_opaque_closure_sym) { + size_t nargs = jl_array_len(ex->args); + assert(nargs >= 5 && "Not enough arguments in new_opaque_closure"); + SmallVector argv(nargs); + for (size_t i = 0; i < nargs; ++i) { + argv[i] = emit_expr(ctx, args[i]); + } + const jl_cgval_t &argt = argv[0]; + const jl_cgval_t &isva = argv[1]; + const jl_cgval_t &lb = argv[2]; + const jl_cgval_t &ub = argv[3]; + const jl_cgval_t &source = argv[4]; + if (source.constant == NULL) { + // For now, we require non-constant source to be handled by using + // eval. This should probably be a verifier error and an abort here. + emit_error(ctx, "(internal error) invalid IR: opaque closure source be constant"); + return jl_cgval_t(); + } + bool can_optimize = argt.constant != NULL && lb.constant != NULL && ub.constant != NULL && + isva.constant != NULL && + jl_is_tuple_type(argt.constant) && jl_is_bool(isva.constant) && + jl_is_type(lb.constant) && jl_is_type(ub.constant) && jl_is_method(source.constant); + + if (can_optimize) { + can_optimize &= ((jl_method_t*)source.constant)->nargs > 0 || !jl_unbox_bool(isva.constant); + } + + if (can_optimize) { + // TODO: Emit this inline and outline it late using LLVM's coroutine + // support. + jl_method_t *closure_method = (jl_method_t *)source.constant; + jl_code_info_t *closure_src = jl_uncompress_ir(closure_method, NULL, + (jl_array_t*)closure_method->source); + + std::unique_ptr closure_m; + jl_llvm_functions_t closure_decls; + + jl_method_instance_t *li; + jl_value_t *closure_t; + jl_tupletype_t *env_t; + jl_svec_t *sig_args; + JL_GC_PUSH5(&li, &closure_src, &closure_t, &env_t, &sig_args); + + li = jl_new_method_instance_uninit(); + li->def.method = closure_method; + jl_tupletype_t *argt_typ = (jl_tupletype_t *)argt.constant; + + closure_t = jl_apply_type2((jl_value_t*)jl_opaque_closure_type, (jl_value_t*)argt_typ, ub.constant); + + size_t nsig = 1 + jl_svec_len(argt_typ->parameters); + sig_args = jl_alloc_svec_uninit(nsig); + jl_svecset(sig_args, 0, closure_t); + for (size_t i = 0; i < jl_svec_len(argt_typ->parameters); ++i) { + jl_svecset(sig_args, 1+i, jl_svecref(argt_typ->parameters, i)); + } + li->specTypes = (jl_value_t*)jl_apply_tuple_type_v(jl_svec_data(sig_args), nsig); + jl_gc_wb(li, li->specTypes); + + std::tie(closure_m, closure_decls) = emit_function(li, closure_src, + ub.constant, ctx.emission_context, jl_unbox_bool(isva.constant)); + + jl_value_t **env_component_ts = (jl_value_t**)alloca(sizeof(jl_value_t*) * (nargs-5)); + for (size_t i = 0; i < nargs - 5; ++i) { + env_component_ts[i] = argv[5+i].typ; + } + + env_t = jl_apply_tuple_type_v(env_component_ts, nargs-5); + jl_cgval_t env; + // TODO: Inline the env at the end of the opaque closure and generate a descriptor for GC + if (jl_is_concrete_type((jl_value_t*)env_t)) { + env = emit_new_struct(ctx, (jl_value_t*)env_t, nargs-5, &argv.data()[5]); + } + else { + Value *env_val = emit_jlcall(ctx, jltuple_func, V_rnull, + &argv[5], nargs-5, JLCALL_F_CC); + env = mark_julia_type(ctx, env_val, true, env_t); + } + + Function *specptr = closure_m->getFunction(closure_decls.specFunctionObject); + jl_cgval_t fptr; + if (specptr) { + jl_returninfo_t returninfo = get_specsig_function(ctx, jl_Module, + closure_decls.specFunctionObject, li->specTypes, ub.constant); + fptr = mark_julia_type(ctx, returninfo.decl, false, jl_voidpointer_type); + } + else { + fptr = mark_julia_type(ctx, + (llvm::Value*)Constant::getNullValue(T_size), + false, jl_voidpointer_type); + } + + jl_cgval_t jlcall_ptr; + assert(closure_decls.functionObject != "jl_fptr_sparam"); + if (closure_decls.functionObject == "jl_fptr_args") { + jlcall_ptr = fptr; + } + else { + Function *F = NULL; + if (GlobalValue *V = jl_Module->getNamedValue(closure_decls.functionObject)) { + F = cast(V); + } + else { + F = Function::Create(get_func_sig(jl_LLVMContext), + Function::ExternalLinkage, + closure_decls.functionObject, jl_Module); + F->setAttributes(get_func_attrs(jl_LLVMContext)); + } + jlcall_ptr = mark_julia_type(ctx, + F, false, jl_voidpointer_type); + } + + jl_cgval_t world_age = mark_julia_type(ctx, + tbaa_decorate(tbaa_gcframe, + ctx.builder.CreateAlignedLoad(ctx.world_age_field, Align(sizeof(size_t)))), + false, + jl_long_type); + + jl_cgval_t closure_fields[6] = { + env, + isva, + world_age, + source, + jlcall_ptr, + fptr + }; + + jl_cgval_t ret = emit_new_struct(ctx, closure_t, 6, closure_fields); + + ctx.oc_modules.push_back(std::move(closure_m)); + + JL_GC_POP(); + return ret; + } + + return mark_julia_type(ctx, + emit_jlcall(ctx, jl_new_opaque_closure_jlcall_func, V_rnull, argv.data(), nargs, JLCALL_F_CC), + true, jl_any_type); + } else if (head == exc_sym) { return mark_julia_type(ctx, ctx.builder.CreateCall(prepare_call(jl_current_exception_func)), @@ -5744,7 +5896,8 @@ static std::pair, jl_llvm_functions_t> jl_method_instance_t *lam, jl_code_info_t *src, jl_value_t *jlrettype, - jl_codegen_params_t ¶ms) + jl_codegen_params_t ¶ms, + bool vaOverride) { // step 1. unpack AST and allocate codegen context for this function jl_llvm_functions_t declarations; @@ -5753,15 +5906,36 @@ static std::pair, jl_llvm_functions_t> ctx.code = src->code; std::map labels; + bool toplevel = false; ctx.module = jl_is_method(lam->def.method) ? lam->def.method->module : lam->def.module; ctx.linfo = lam; + ctx.name = name_from_method_instance(lam); + size_t nreq = 0; + int va = 0; + if (jl_is_method(lam->def.method)) { + ctx.nargs = nreq = lam->def.method->nargs; + ctx.is_opaque_closure = lam->def.method->is_for_opaque_closure; + if (vaOverride || + (nreq > 0 && jl_is_method(lam->def.value) && lam->def.method->isva)) { + assert(nreq > 0 && (ctx.is_opaque_closure || !vaOverride)); + nreq--; + va = 1; + } + } + else { + ctx.nargs = 0; + } + ctx.nReqArgs = nreq; + if (va) { + jl_sym_t *vn = (jl_sym_t*)jl_array_ptr_ref(src->slotnames, ctx.nargs - 1); + if (vn != unused_sym) + ctx.vaSlot = ctx.nargs - 1; + } + toplevel = !jl_is_method(lam->def.method); ctx.rettype = jlrettype; ctx.source = src; - ctx.name = name_from_method_instance(lam); ctx.funcName = ctx.name; ctx.spvals_ptr = NULL; - ctx.nargs = jl_is_method(lam->def.method) ? lam->def.method->nargs : 0; - bool toplevel = !jl_is_method(lam->def.method); jl_array_t *stmts = ctx.code; size_t stmtslen = jl_array_dim0(stmts); @@ -5775,7 +5949,7 @@ static std::pair, jl_llvm_functions_t> StringRef dbgFuncName = ctx.name; int toplineno = -1; - if (jl_is_method(lam->def.method)) { + if (lam && jl_is_method(lam->def.method)) { toplineno = lam->def.method->line; ctx.file = jl_symbol_name(lam->def.method->file); } @@ -5799,19 +5973,8 @@ static std::pair, jl_llvm_functions_t> int n_ssavalues = jl_is_long(src->ssavaluetypes) ? jl_unbox_long(src->ssavaluetypes) : jl_array_len(src->ssavaluetypes); size_t vinfoslen = jl_array_dim0(src->slotflags); ctx.slots.resize(vinfoslen); - size_t nreq = ctx.nargs; - int va = 0; - assert(lam->specTypes); // the specTypes field should always be assigned - if (nreq > 0 && lam->def.method->isva) { - nreq--; - va = 1; - jl_sym_t *vn = (jl_sym_t*)jl_array_ptr_ref(src->slotnames, ctx.nargs - 1); - if (vn != unused_sym) - ctx.vaSlot = ctx.nargs - 1; - } - ctx.nReqArgs = nreq; // create SAvalue locations for SSAValue objects ctx.ssavalue_assigned.assign(n_ssavalues, false); @@ -5831,6 +5994,15 @@ static std::pair, jl_llvm_functions_t> if (argname == unused_sym) continue; jl_value_t *ty = jl_nth_slot_type(lam->specTypes, i); + // OpaqueClosure implicitly loads the env + if (i == 0 && ctx.is_opaque_closure) { + if (jl_is_array(src->slottypes)) { + ty = jl_arrayref((jl_array_t*)src->slottypes, i); + } + else { + ty = (jl_value_t*)jl_any_type; + } + } varinfo.value = mark_julia_type(ctx, (Value*)NULL, false, ty); } if (va && ctx.vaSlot != -1) { @@ -6113,8 +6285,8 @@ static std::pair, jl_llvm_functions_t> // step 7. set up GC frame allocate_gc_frame(ctx, b0); Value *last_age = NULL; - if (toplevel) { - emit_last_age_field(ctx); + emit_last_age_field(ctx); + if (toplevel || ctx.is_opaque_closure) { last_age = tbaa_decorate(tbaa_gcframe, ctx.builder.CreateAlignedLoad(ctx.world_age_field, Align(sizeof(size_t)))); } @@ -6291,7 +6463,8 @@ static std::pair, jl_llvm_functions_t> else { if (i == 0) { // first (function) arg is separate in jlcall - theArg = mark_julia_type(ctx, fArg, true, vi.value.typ); + theArg = mark_julia_type(ctx, fArg, true, ctx.is_opaque_closure ? + argType : vi.value.typ); } else { Value *argPtr = ctx.builder.CreateInBoundsGEP(T_prjlvalue, argArray, ConstantInt::get(T_size, i-1)); @@ -6313,6 +6486,16 @@ static std::pair, jl_llvm_functions_t> } } + // If this is an opaque closure, implicitly load the env and switch + // the world age. + if (i == 0 && ctx.is_opaque_closure) { + jl_cgval_t closure_world = emit_getfield_knownidx(ctx, theArg, 2, (jl_datatype_t*)argType); + emit_unbox(ctx, T_size, closure_world, (jl_value_t*)jl_long_type, ctx.world_age_field, tbaa_gcframe); + theArg = convert_julia_type(ctx, + emit_getfield_knownidx(ctx, theArg, 0, (jl_datatype_t*)argType), + vi.value.typ); + } + if (vi.boxroot == NULL) { assert(vi.value.V == NULL && "unexpected variable slot created for argument"); // keep track of original (possibly boxed) value to avoid re-boxing or moving @@ -6764,7 +6947,7 @@ static std::pair, jl_llvm_functions_t> } mallocVisitStmt(debuginfoloc, sync_bytes); - if (toplevel) + if (toplevel || ctx.is_opaque_closure) ctx.builder.CreateStore(last_age, ctx.world_age_field); assert(type_is_ghost(retty) || returninfo.cc == jl_returninfo_t::SRet || retval->getType() == ctx.f->getReturnType()); @@ -7156,6 +7339,17 @@ static std::pair, jl_llvm_functions_t> jl_Module->getFunction(FN)->setLinkage(GlobalVariable::PrivateLinkage); } + // link in opaque closure modules + for (auto &Mod : ctx.oc_modules) { + SmallVector Exports; + for (const auto &F: Mod->functions()) + if (!F.isDeclaration()) + Exports.push_back(F.getName().str()); + jl_merge_module(jl_Module, std::move(Mod)); + for (auto FN: Exports) + jl_Module->getFunction(FN)->setLinkage(GlobalVariable::PrivateLinkage); + } + JL_GC_POP(); return std::make_pair(std::unique_ptr(M), declarations); } diff --git a/src/datatype.c b/src/datatype.c index 3069ec17b0bb4..86ad3170a701e 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -940,8 +940,9 @@ static void init_struct_tail(jl_datatype_t *type, jl_value_t *jv, size_t na) JL_ JL_DLLEXPORT jl_value_t *jl_new_structv(jl_datatype_t *type, jl_value_t **args, uint32_t na) { jl_ptls_t ptls = jl_get_ptls_states(); - if (!jl_is_datatype(type) || type->layout == NULL) + if (!jl_is_datatype(type) || type->layout == NULL) { jl_type_error("new", (jl_value_t*)jl_datatype_type, (jl_value_t*)type); + } if (type->ninitialized > na || na > jl_datatype_nfields(type)) jl_error("invalid struct allocation"); for (size_t i = 0; i < na; i++) { diff --git a/src/dump.c b/src/dump.c index 9ad756c5dcfa6..3cecd0befa002 100644 --- a/src/dump.c +++ b/src/dump.c @@ -570,7 +570,7 @@ static void jl_serialize_value_(jl_serializer_state *s, jl_value_t *v, int as_li write_uint8(s->s, TAG_METHOD); jl_method_t *m = (jl_method_t*)v; int internal = 1; - internal = module_in_worklist(m->module); + internal = m->is_for_opaque_closure || module_in_worklist(m->module); if (!internal) { // flag this in the backref table as special uintptr_t *bp = (uintptr_t*)ptrhash_bp(&backref_table, v); @@ -593,6 +593,7 @@ static void jl_serialize_value_(jl_serializer_state *s, jl_value_t *v, int as_li write_int32(s->s, m->nkw); write_int8(s->s, m->isva); write_int8(s->s, m->pure); + write_int8(s->s, m->is_for_opaque_closure); jl_serialize_value(s, (jl_value_t*)m->slot_syms); jl_serialize_value(s, (jl_value_t*)m->roots); jl_serialize_value(s, (jl_value_t*)m->ccallable); @@ -676,6 +677,9 @@ static void jl_serialize_value_(jl_serializer_state *s, jl_value_t *v, int as_li else if (jl_typeis(v, jl_task_type)) { jl_error("Task cannot be serialized"); } + else if (jl_typeis(v, jl_opaque_closure_type)) { + jl_error("Live opaque closures cannot be serialized"); + } else if (jl_typeis(v, jl_string_type)) { write_uint8(s->s, TAG_STRING); write_int32(s->s, jl_string_len(v)); @@ -1437,6 +1441,7 @@ static jl_value_t *jl_deserialize_value_method(jl_serializer_state *s, jl_value_ m->nkw = read_int32(s->s); m->isva = read_int8(s->s); m->pure = read_int8(s->s); + m->is_for_opaque_closure = read_int8(s->s); m->slot_syms = jl_deserialize_value(s, (jl_value_t**)&m->slot_syms); jl_gc_wb(m, m->slot_syms); m->roots = (jl_array_t*)jl_deserialize_value(s, (jl_value_t**)&m->roots); @@ -1845,6 +1850,7 @@ static void jl_insert_methods(jl_array_t *list) size_t i, l = jl_array_len(list); for (i = 0; i < l; i += 2) { jl_method_t *meth = (jl_method_t*)jl_array_ptr_ref(list, i); + assert(!meth->is_for_opaque_closure); jl_tupletype_t *simpletype = (jl_tupletype_t*)jl_array_ptr_ref(list, i + 1); assert(jl_is_method(meth)); jl_methtable_t *mt = jl_method_table_for((jl_value_t*)meth->sig); @@ -2635,7 +2641,6 @@ void jl_init_serializer(void) jl_box_int64(12), jl_box_int64(13), jl_box_int64(14), jl_box_int64(15), jl_box_int64(16), jl_box_int64(17), jl_box_int64(18), jl_box_int64(19), jl_box_int64(20), - jl_box_int64(21), jl_bool_type, jl_linenumbernode_type, jl_pinode_type, jl_upsilonnode_type, jl_type_type, jl_bottom_type, jl_ref_type, @@ -2652,6 +2657,7 @@ void jl_init_serializer(void) jl_namedtuple_type, jl_array_int32_type, jl_typedslot_type, jl_uint32_type, jl_uint64_type, jl_type_type_mt, jl_nonfunction_mt, + jl_opaque_closure_type, ptls->root_task, diff --git a/src/gf.c b/src/gf.c index 343d36fffa1a2..7c278691f4cfa 100644 --- a/src/gf.c +++ b/src/gf.c @@ -201,7 +201,6 @@ JL_DLLEXPORT jl_value_t *jl_methtable_lookup(jl_methtable_t *mt, jl_value_t *typ // ----- MethodInstance specialization instantiation ----- // -JL_DLLEXPORT jl_method_t *jl_new_method_uninit(jl_module_t*); JL_DLLEXPORT jl_code_instance_t* jl_new_codeinst( jl_method_instance_t *mi, jl_value_t *rettype, jl_value_t *inferred_const, jl_value_t *inferred, @@ -2449,8 +2448,6 @@ JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup_worlds(jl_value_t *types, size_t wo return (jl_value_t*)matc->method; } -static jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t *gf, jl_value_t **args, size_t nargs); - // invoke() // this does method dispatch with a set of types to match other than the // types of the actual arguments. this means it sometimes does NOT call the @@ -2480,7 +2477,7 @@ jl_value_t *jl_gf_invoke(jl_value_t *types0, jl_value_t *gf, jl_value_t **args, return jl_gf_invoke_by_method(method, gf, args, nargs); } -static jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t *gf, jl_value_t **args, size_t nargs) +jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t *gf, jl_value_t **args, size_t nargs) { jl_method_instance_t *mfunc = NULL; jl_typemap_entry_t *tm = NULL; diff --git a/src/interpreter.c b/src/interpreter.c index 76f20d0e4c92e..eafa0c19ca6a1 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -270,6 +270,17 @@ static jl_value_t *eval_value(jl_value_t *e, interpreter_state *s) JL_GC_POP(); return v; } + else if (head == new_opaque_closure_sym) { + jl_value_t **argv; + JL_GC_PUSHARGS(argv, nargs); + for (size_t i = 0; i < nargs; i++) + argv[i] = eval_value(args[i], s); + JL_NARGSV(new_opaque_closure, 5); + jl_value_t *ret = (jl_value_t*)jl_new_opaque_closure((jl_tupletype_t*)argv[0], argv[1], argv[2], + argv[3], (jl_method_t*)argv[4], argv+5, nargs-5); + JL_GC_POP(); + return ret; + } else if (head == static_parameter_sym) { ssize_t n = jl_unbox_long(args[0]); assert(n > 0); @@ -653,6 +664,42 @@ jl_value_t *NOINLINE jl_fptr_interpret_call(jl_value_t *f, jl_value_t **args, ui return r; } +jl_value_t *jl_interpret_opaque_closure(jl_opaque_closure_t *oc, jl_value_t **args, size_t nargs) +{ + jl_method_t *source = oc->source; + jl_code_info_t *code = jl_uncompress_ir(source, NULL, (jl_array_t*)source->source); + interpreter_state *s; + unsigned nroots = jl_source_nslots(code) + jl_source_nssavalues(code) + 2; + jl_value_t **locals = NULL; + JL_GC_PUSHFRAME(s, locals, nroots); + locals[0] = (jl_value_t*)oc; + // The analyzer has some trouble with this + locals[1] = (jl_value_t*)code; + JL_GC_PROMISE_ROOTED(code); + locals[2] = (jl_value_t*)oc->captures; + s->locals = locals + 2; + s->src = code; + s->module = source->module; + s->sparam_vals = NULL; + s->preevaluation = 0; + s->continue_at = 0; + s->mi = NULL; + + size_t defargs = source->nargs; + int isva = !!oc->isva; + assert(isva ? nargs + 2 >= defargs : nargs + 1 == defargs); + for (size_t i = 1; i < defargs - isva; i++) + s->locals[i] = args[i - 1]; + if (isva) { + assert(defargs >= 2); + s->locals[defargs - 1] = jl_f_tuple(NULL, &args[defargs - 2], nargs + 2 - defargs); + } + JL_GC_ENABLEFRAME(s); + jl_value_t *r = eval_body(code->code, s, 0, 0); + JL_GC_POP(); + return r; +} + jl_value_t *NOINLINE jl_interpret_toplevel_thunk(jl_module_t *m, jl_code_info_t *src) { interpreter_state *s; diff --git a/src/jl_exported_data.inc b/src/jl_exported_data.inc index 76e0984798522..0b495568ff5c7 100644 --- a/src/jl_exported_data.inc +++ b/src/jl_exported_data.inc @@ -115,8 +115,9 @@ XX(jl_vecelement_typename) \ XX(jl_void_type) \ XX(jl_voidpointer_type) \ - XX(jl_weakref_type) - + XX(jl_weakref_type) \ + XX(jl_opaque_closure_type) \ + XX(jl_opaque_closure_typename) // Data symbols that are defined inside the public libjulia #define JL_EXPORTED_DATA_SYMBOLS(XX) \ diff --git a/src/jltypes.c b/src/jltypes.c index 6da3211dbd374..4a5efa845f465 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -2193,7 +2193,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_method_type = jl_new_datatype(jl_symbol("Method"), core, jl_any_type, jl_emptysvec, - jl_perm_symsvec(22, + jl_perm_symsvec(23, "name", "module", "file", @@ -2215,8 +2215,9 @@ void jl_init_types(void) JL_GC_DISABLED "nospecialize", "nkw", "isva", - "pure"), - jl_svec(22, + "pure", + "is_for_opaque_closure"), + jl_svec(23, jl_symbol_type, jl_module_type, jl_symbol_type, @@ -2238,6 +2239,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_int32_type, jl_int32_type, jl_bool_type, + jl_bool_type, jl_bool_type), 0, 1, 10); @@ -2306,7 +2308,6 @@ void jl_init_types(void) JL_GC_DISABLED jl_perm_symsvec(4, "spec_types", "sparams", "method", "fully_covers"), jl_svec(4, jl_type_type, jl_simplevector_type, jl_method_type, jl_bool_type), 0, 0, 4); - // all Kinds share the Type method table (not the nonfunction one) jl_unionall_type->name->mt = jl_uniontype_type->name->mt = jl_datatype_type->name->mt = jl_type_type_mt; @@ -2381,8 +2382,17 @@ void jl_init_types(void) JL_GC_DISABLED jl_value_t *listt = jl_new_struct(jl_uniontype_type, jl_task_type, jl_nothing_type); jl_svecset(jl_task_type->types, 0, listt); - // complete builtin type metadata jl_value_t *pointer_void = jl_apply_type1((jl_value_t*)jl_pointer_type, (jl_value_t*)jl_nothing_type); + + tv = jl_svec2(tvar("A"), tvar("R")); + jl_opaque_closure_type = (jl_unionall_t*)jl_new_datatype(jl_symbol("OpaqueClosure"), core, jl_function_type, tv, + jl_perm_symsvec(6, "captures", "isva", "world", "source", "invoke", "specptr"), + jl_svec(6, jl_any_type, jl_bool_type, jl_long_type, jl_any_type, pointer_void, pointer_void), 0, 0, 6)->name->wrapper; + jl_opaque_closure_typename = ((jl_datatype_t*)jl_unwrap_unionall((jl_value_t*)jl_opaque_closure_type))->name; + jl_compute_field_offsets((jl_datatype_t*)jl_unwrap_unionall((jl_value_t*)jl_opaque_closure_type)); + + + // complete builtin type metadata jl_voidpointer_type = (jl_datatype_t*)pointer_void; jl_uint8pointer_type = (jl_datatype_t*)jl_apply_type1((jl_value_t*)jl_pointer_type, (jl_value_t*)jl_uint8_type); jl_svecset(jl_datatype_type->types, 6, jl_voidpointer_type); diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 8571815889e4a..0cf133f09fcfb 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1984,6 +1984,29 @@ ,@(if (length= e 3) '(()) '()) ,@(map expand-forms (cddr e)))) + 'opaque_closure + (lambda (e) + (let* ((meth (caddr (caddr (expand-forms (cadr e))))) ;; `method` expr + (lam (cadddr meth)) + (sig-block (caddr meth)) + (sig-block (if (and (pair? sig-block) (eq? (car sig-block) 'block)) + sig-block + `(block ,sig-block))) + (stmts (cdr (butlast sig-block))) + (sig-svec (last sig-block)) + (typ-svec (caddr sig-svec)) + (tvars (cddr (cadddr sig-svec))) + (argtypes (cdddr typ-svec)) + (functionloc (cadr (caddddr sig-svec)))) + (if (length= argtypes 0) + `(_opaque_closure ,(expand-forms `(curly (core Tuple))) (false) 0 ,functionloc ,lam) + (let* ((vssa (make-ssavalue)) + (vval (expand-forms (last argtypes))) + (argtypes (append (butlast argtypes) (list `(block (= ,vssa ,vval))))) + (argtype (foldl (lambda (var ex) `(call (core UnionAll) ,var ,ex)) + (expand-forms `(curly (core Tuple) ,@argtypes)) + (reverse tvars)))) + `(_opaque_closure ,argtype (call (core isa) ,vssa (core TypeofVararg)) ,(length argtypes) ,functionloc ,lam))))) 'block (lambda (e) (cond ((null? (cdr e)) '(null)) @@ -3100,9 +3123,9 @@ f(x) = yt(x) (define (clear-capture-bits vinfos) (map vinfo:not-capt vinfos)) -(define (convert-lambda lam fname interp capt-sp) +(define (convert-lambda lam fname interp capt-sp opaq) (let ((body (add-box-inits-to-body - lam (cl-convert (cadddr lam) fname lam (table) (table) #f interp)))) + lam (cl-convert (cadddr lam) fname lam (table) (table) #f interp opaq)))) `(lambda ,(lam:args lam) (,(clear-capture-bits (car (lam:vinfo lam))) () @@ -3142,12 +3165,17 @@ f(x) = yt(x) `(block (= ,temp ,(renumber-assigned-ssavalues t)) ,ex) ex)))) +(define (capt-var-access var fname opaq) + (if opaq + `(call (core getfield) ,fname ,(get opaq var)) + `(call (core getfield) ,fname (inert ,var)))) + ;; convert assignment to a closed variable to a setfield! call. ;; while we're at it, generate `convert` calls for variables with ;; declared types. ;; when doing this, the original value needs to be preserved, to ;; ensure the expression `a=b` always returns exactly `b`. -(define (convert-assignment var rhs0 fname lam interp) +(define (convert-assignment var rhs0 fname lam interp opaq) (cond ((symbol? var) (let* ((vi (assq var (car (lam:vinfo lam)))) @@ -3165,11 +3193,11 @@ f(x) = yt(x) (make-ssavalue))) (rhs (if (equal? vt '(core Any)) rhs1 - (convert-for-type-decl rhs1 (cl-convert vt fname lam #f #f #f interp)))) + (convert-for-type-decl rhs1 (cl-convert vt fname lam #f #f #f interp opaq)))) (ex (cond (closed `(call (core setfield!) ,(if interp `($ ,var) - `(call (core getfield) ,fname (inert ,var))) + (capt-var-access var fname opaq)) (inert contents) ,rhs)) (capt `(call (core setfield!) ,var (inert contents) ,rhs)) @@ -3361,7 +3389,7 @@ f(x) = yt(x) #f) ((eq? (car e) 'scope-block) (visit (cadr e))) - ((memq (car e) '(block call new splatnew)) + ((memq (car e) '(block call new splatnew new_opaque_closure)) (eager-any visit (cdr e))) ((eq? (car e) 'break-block) (visit (caddr e))) @@ -3442,23 +3470,30 @@ f(x) = yt(x) (define (toplevel-preserving? e) (and (pair? e) (memq (car e) '(if elseif block trycatch tryfinally)))) -(define (map-cl-convert exprs fname lam namemap defined toplevel interp) +(define (map-cl-convert exprs fname lam namemap defined toplevel interp opaq) (if toplevel (map (lambda (x) (let ((tl (lift-toplevel (cl-convert x fname lam namemap defined (and toplevel (toplevel-preserving? x)) - interp)))) + interp opaq)))) (if (null? (cdr tl)) (car tl) `(block ,@(cdr tl) ,(car tl))))) exprs) - (map (lambda (x) (cl-convert x fname lam namemap defined #f interp)) exprs))) + (map (lambda (x) (cl-convert x fname lam namemap defined #f interp opaq)) exprs))) -(define (cl-convert e fname lam namemap defined toplevel interp) +(define (prepare-lambda! lam) + ;; mark all non-arguments as assigned, since locals that are never assigned + ;; need to be handled the same as those that are (i.e., boxed). + (for-each (lambda (vi) (vinfo:set-asgn! vi #t)) + (list-tail (car (lam:vinfo lam)) (length (lam:args lam)))) + (lambda-optimize-vars! lam)) + +(define (cl-convert e fname lam namemap defined toplevel interp opaq) (if (and (not lam) - (not (and (pair? e) (memq (car e) '(lambda method macro))))) + (not (and (pair? e) (memq (car e) '(lambda method macro opaque_closure))))) (if (atom? e) e - (cons (car e) (map-cl-convert (cdr e) fname lam namemap defined toplevel interp))) + (cons (car e) (map-cl-convert (cdr e) fname lam namemap defined toplevel interp opaq))) (cond ((symbol? e) (define (new-undef-var name) @@ -3477,7 +3512,7 @@ f(x) = yt(x) (val (if (equal? typ '(core Any)) val `(call (core typeassert) ,val - ,(cl-convert typ fname lam namemap defined toplevel interp))))) + ,(cl-convert typ fname lam namemap defined toplevel interp opaq))))) `(block ,@(if (eq? box access) '() `((= ,access ,box))) ,undefcheck @@ -3489,7 +3524,7 @@ f(x) = yt(x) (cv (let ((access (if interp `($ (call (core QuoteNode) ,e)) - `(call (core getfield) ,fname (inert ,e))))) + (capt-var-access e fname opaq)))) (if (and (vinfo:asgn cv) (vinfo:capt cv)) (get-box-contents access (vinfo:type cv)) access))) @@ -3509,8 +3544,8 @@ f(x) = yt(x) e) ((=) (let ((var (cadr e)) - (rhs (cl-convert (caddr e) fname lam namemap defined toplevel interp))) - (convert-assignment var rhs fname lam interp))) + (rhs (cl-convert (caddr e) fname lam namemap defined toplevel interp opaq))) + (convert-assignment var rhs fname lam interp opaq))) ((local-def) ;; make new Box for local declaration of defined variable (let ((vi (assq (cadr e) (car (lam:vinfo lam))))) (if (and vi (vinfo:asgn vi) (vinfo:capt vi)) @@ -3538,7 +3573,7 @@ f(x) = yt(x) (if (and (vinfo:asgn cv) (vinfo:capt cv)) (let ((access (if interp `($ (call (core QuoteNode) ,sym)) - `(call (core getfield) ,fname (inert ,sym))))) + (capt-var-access sym fname opaq)))) `(call (core isdefined) ,access (inert contents))) '(true))) (vi @@ -3546,6 +3581,23 @@ f(x) = yt(x) `(call (core isdefined) ,sym (inert contents)) e)) (else e)))) + ((_opaque_closure) + (let* ((isva (caddr e)) + (nargs (cadddr e)) + (functionloc (caddddr e)) + (lam2 (last e)) + (vis (lam:vinfo lam2)) + (cvs (map car (cadr vis)))) + (prepare-lambda! lam2) + (let ((var-exprs (map (lambda (v) + (let ((cv (assq v (cadr (lam:vinfo lam))))) + (if cv + (capt-var-access v fname opaq) + v))) + cvs))) + `(new_opaque_closure ,(cadr e) ,isva (call (core apply_type) Union) (core Any) + (opaque_closure_method ,nargs ,functionloc ,(convert-lambda lam2 (car (lam:args lam2)) #f '() (symbol-to-idx-map cvs))) + ,@var-exprs)))) ((method) (let* ((name (method-expr-name e)) (short (length= e 2)) ;; function f end @@ -3558,7 +3610,7 @@ f(x) = yt(x) (sp-inits (if (or short (not (eq? (car sig) 'block))) '() (map-cl-convert (butlast (cdr sig)) - fname lam namemap defined toplevel interp))) + fname lam namemap defined toplevel interp opaq))) (sig (and sig (if (eq? (car sig) 'block) (last sig) sig)))) @@ -3567,13 +3619,7 @@ f(x) = yt(x) (error (string "cannot add method to function argument " name))) (if (eqv? (string.char (string name) 0) #\@) (error "macro definition not allowed inside a local scope")))) - (if lam2 - (begin - ;; mark all non-arguments as assigned, since locals that are never assigned - ;; need to be handled the same as those that are (i.e., boxed). - (for-each (lambda (vi) (vinfo:set-asgn! vi #t)) - (list-tail (car (lam:vinfo lam2)) (length (lam:args lam2)))) - (lambda-optimize-vars! lam2))) + (if lam2 (prepare-lambda! lam2)) (if (not local) ;; not a local function; will not be closure converted to a new type (cond (short (if (has? defined (cadr e)) e @@ -3591,21 +3637,21 @@ f(x) = yt(x) ;; anonymous functions with keyword args generate global ;; functions that refer to the type of a local function (rename-sig-types sig namemap) - fname lam namemap defined toplevel interp) + fname lam namemap defined toplevel interp opaq) ,(let ((body (add-box-inits-to-body lam2 - (cl-convert (cadddr lam2) 'anon lam2 (table) (table) #f interp)))) + (cl-convert (cadddr lam2) 'anon lam2 (table) (table) #f interp opaq)))) `(lambda ,(cadr lam2) (,(clear-capture-bits (car vis)) ,@(cdr vis)) ,body))))) (else - (let* ((exprs (lift-toplevel (convert-lambda lam2 '|#anon| #t '()))) + (let* ((exprs (lift-toplevel (convert-lambda lam2 '|#anon| #t '() #f))) (top-stmts (cdr exprs)) (newlam (compact-and-renumber (linearize (car exprs)) 'none 0))) `(toplevel-butfirst (block ,@sp-inits - (method ,name ,(cl-convert sig fname lam namemap defined toplevel interp) + (method ,name ,(cl-convert sig fname lam namemap defined toplevel interp opaq) ,(julia-bq-macro newlam))) ,@top-stmts)))) @@ -3708,19 +3754,19 @@ f(x) = yt(x) (append (map (lambda (gs tvar) (make-assignment gs `(call (core TypeVar) ',tvar (core Any)))) closure-param-syms closure-param-names) - `((method #f ,(cl-convert arg-defs fname lam namemap defined toplevel interp) + `((method #f ,(cl-convert arg-defs fname lam namemap defined toplevel interp opaq) ,(convert-lambda lam2 (if iskw (caddr (lam:args lam2)) (car (lam:args lam2))) - #f closure-param-names))))))) + #f closure-param-names #f))))))) (mk-closure ;; expression to make the closure (let* ((var-exprs (map (lambda (v) (let ((cv (assq v (cadr (lam:vinfo lam))))) (if cv (if interp `($ (call (core QuoteNode) ,v)) - `(call (core getfield) ,fname (inert ,v))) + (capt-var-access v fname opaq)) v))) capt-vars)) (P (append @@ -3747,7 +3793,7 @@ f(x) = yt(x) (begin (put! defined name #t) `(toplevel-butfirst - ,(convert-assignment name mk-closure fname lam interp) + ,(convert-assignment name mk-closure fname lam interp opaq) ,@typedef ,@(map (lambda (v) `(moved-local ,v)) moved-vars) ,@sp-inits @@ -3760,14 +3806,14 @@ f(x) = yt(x) (table) (table) (null? (cadr e)) ;; only toplevel thunks have 0 args - interp))) + interp opaq))) `(lambda ,(cadr e) (,(clear-capture-bits (car (lam:vinfo e))) () ,@(cddr (lam:vinfo e))) (block ,@body)))) ;; remaining `::` expressions are type assertions ((|::|) - (cl-convert `(call (core typeassert) ,@(cdr e)) fname lam namemap defined toplevel interp)) + (cl-convert `(call (core typeassert) ,@(cdr e)) fname lam namemap defined toplevel interp opaq)) ;; remaining `decl` expressions are only type assertions if the ;; argument is global or a non-symbol. ((decl) @@ -3777,15 +3823,15 @@ f(x) = yt(x) (else (if (or (symbol? (cadr e)) (and (pair? (cadr e)) (eq? (caadr e) 'outerref))) (error "type declarations on global variables are not yet supported")) - (cl-convert `(call (core typeassert) ,@(cdr e)) fname lam namemap defined toplevel interp)))) + (cl-convert `(call (core typeassert) ,@(cdr e)) fname lam namemap defined toplevel interp opaq)))) ;; `with-static-parameters` expressions can be removed now; used only by analyze-vars ((with-static-parameters) - (cl-convert (cadr e) fname lam namemap defined toplevel interp)) + (cl-convert (cadr e) fname lam namemap defined toplevel interp opaq)) (else (cons (car e) - (map-cl-convert (cdr e) fname lam namemap defined toplevel interp)))))))) + (map-cl-convert (cdr e) fname lam namemap defined toplevel interp opaq)))))))) -(define (closure-convert e) (cl-convert e #f #f #f #f #f #f)) +(define (closure-convert e) (cl-convert e #f #f #f #f #f #f #f)) ;; pass 5: convert to linear IR @@ -3808,7 +3854,7 @@ f(x) = yt(x) (or (ssavalue? lhs) (valid-ir-argument? e) (and (symbol? lhs) (pair? e) - (memq (car e) '(new splatnew the_exception isdefined call invoke foreigncall cfunction gc_preserve_begin copyast))))) + (memq (car e) '(new splatnew the_exception isdefined call invoke foreigncall cfunction gc_preserve_begin copyast new_opaque_closure))))) (define (valid-ir-return? e) ;; returning lambda directly is needed for @generated @@ -4006,7 +4052,7 @@ f(x) = yt(x) ((and (pair? e1) (eq? (car e1) 'globalref)) (emit e1) #f) ;; keep globals for undefined-var checking (else #f))) (case (car e) - ((call new splatnew foreigncall cfunction) + ((call new splatnew foreigncall cfunction new_opaque_closure) (let* ((args (cond ((eq? (car e) 'foreigncall) ;; NOTE: 2nd to 5th arguments of ccall must be left in place @@ -4023,6 +4069,15 @@ f(x) = yt(x) ((eq? (car e) 'cfunction) (let ((fptr (car (compile-args (list (caddr e)) break-labels)))) (cons (cadr e) (cons fptr (cdddr e))))) + ;; Leave a literal lambda in place for later global expansion + ((eq? (car e) 'new_opaque_closure) + (let* ((oc_method (car (list-tail (cdr e) 4))) + (lambda (cadddr oc_method)) + (lambda (linearize lambda))) + (append + (compile-args (list-head (cdr e) 4) break-labels) + (list (append (butlast oc_method) (list lambda))) + (compile-args (list-tail (cdr e) 5) break-labels)))) ;; TODO: evaluate first argument to cglobal some other way ((and (length> e 2) (or (eq? (cadr e) 'cglobal) @@ -4530,14 +4585,6 @@ f(x) = yt(x) (loop (cdr stmts))))) (vector (reverse code) (reverse locs) (reverse linetable) ssavtable labltable))) -(define (symbol-to-idx-map lst) - (let ((tbl (table))) - (let loop ((xs lst) (i 1)) - (if (pair? xs) - (begin (put! tbl (car xs) i) - (loop (cdr xs) (+ i 1))))) - tbl)) - (define (renumber-lambda lam file line) (let* ((stuff (compact-ir (lam:body lam) (if (null? (cadr lam)) '|top-level scope| 'none) diff --git a/src/julia.h b/src/julia.h index 8acaade3cc296..6191ec92e6d0d 100644 --- a/src/julia.h +++ b/src/julia.h @@ -327,6 +327,7 @@ typedef struct _jl_method_t { // of another method. uint8_t isva; uint8_t pure; + uint8_t is_for_opaque_closure; // hidden fields: // lock for modifications to the method @@ -352,6 +353,17 @@ struct _jl_method_instance_t { uint8_t inInference; // flags to tell if inference is running on this object }; +// OpaqueClosure +typedef struct jl_opaque_closure_t { + JL_DATA_TYPE + jl_value_t *captures; + uint8_t isva; + size_t world; + jl_method_t *source; + jl_fptr_args_t invoke; + void *specptr; +} jl_opaque_closure_t; + // This type represents an executable operation typedef struct _jl_code_instance_t { JL_DATA_TYPE @@ -630,6 +642,8 @@ extern JL_DLLIMPORT jl_unionall_t *jl_anytuple_type_type JL_GLOBALLY_ROOTED; extern JL_DLLIMPORT jl_datatype_t *jl_vararg_type JL_GLOBALLY_ROOTED; extern JL_DLLIMPORT jl_datatype_t *jl_function_type JL_GLOBALLY_ROOTED; extern JL_DLLIMPORT jl_datatype_t *jl_builtin_type JL_GLOBALLY_ROOTED; +extern JL_DLLIMPORT jl_unionall_t *jl_opaque_closure_type JL_GLOBALLY_ROOTED; +extern JL_DLLIMPORT jl_typename_t *jl_opaque_closure_typename JL_GLOBALLY_ROOTED; extern JL_DLLIMPORT jl_value_t *jl_bottom_type JL_GLOBALLY_ROOTED; extern JL_DLLIMPORT jl_datatype_t *jl_method_instance_type JL_GLOBALLY_ROOTED; @@ -1213,6 +1227,19 @@ STATIC_INLINE int jl_is_array(void *v) JL_NOTSAFEPOINT return jl_is_array_type(t); } + +STATIC_INLINE int jl_is_opaque_closure_type(void *t) JL_NOTSAFEPOINT +{ + return (jl_is_datatype(t) && + ((jl_datatype_t*)(t))->name == jl_opaque_closure_typename); +} + +STATIC_INLINE int jl_is_opaque_closure(void *v) JL_NOTSAFEPOINT +{ + jl_value_t *t = jl_typeof(v); + return jl_is_opaque_closure_type(t); +} + STATIC_INLINE int jl_is_cpointer_type(jl_value_t *t) JL_NOTSAFEPOINT { return (jl_is_datatype(t) && @@ -1568,9 +1595,9 @@ JL_DLLEXPORT void jl_exception_clear(void) JL_NOTSAFEPOINT; #define JL_NARGSV(fname, min) \ if (nargs < min) jl_too_few_args(#fname, min); -#define JL_TYPECHK(fname, type, v) \ - if (!jl_is_##type(v)) { \ - jl_type_error(#fname, (jl_value_t*)jl_##type##_type, (v)); \ +#define JL_TYPECHK(fname, type, v) \ + if (!jl_is_##type(v)) { \ + jl_type_error(#fname, (jl_value_t*)jl_##type##_type, (v)); \ } #define JL_TYPECHKS(fname, type, v) \ if (!jl_is_##type(v)) { \ diff --git a/src/julia_internal.h b/src/julia_internal.h index 03a1274ace7f8..19dc2bd47bb87 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -440,6 +440,7 @@ JL_DLLEXPORT void jl_typeassert(jl_value_t *x, jl_value_t *t); JL_CALLABLE(jl_f_tuple); JL_CALLABLE(jl_f_intrinsic_call); +JL_CALLABLE(jl_f_opaque_closure_call); void jl_install_default_signal_handlers(void); void restore_signals(void); void jl_install_thread_signal_handler(jl_ptls_t ptls); @@ -504,6 +505,7 @@ jl_array_t *jl_get_loaded_modules(void); jl_value_t *jl_toplevel_eval_flex(jl_module_t *m, jl_value_t *e, int fast, int expanded); jl_value_t *jl_eval_global_var(jl_module_t *m JL_PROPAGATES_ROOT, jl_sym_t *e); +jl_value_t *jl_interpret_opaque_closure(jl_opaque_closure_t *clos, jl_value_t **args, size_t nargs); jl_value_t *jl_interpret_toplevel_thunk(jl_module_t *m, jl_code_info_t *src); jl_value_t *jl_interpret_toplevel_expr_in(jl_module_t *m, jl_value_t *e, jl_code_info_t *src, @@ -512,6 +514,8 @@ int jl_is_toplevel_only_expr(jl_value_t *e) JL_NOTSAFEPOINT; jl_value_t *jl_call_scm_on_ast(const char *funcname, jl_value_t *expr, jl_module_t *inmodule); jl_method_instance_t *jl_method_lookup(jl_value_t **args, size_t nargs, size_t world); + +jl_value_t *jl_gf_invoke_by_method(jl_method_t *method, jl_value_t *gf, jl_value_t **args, size_t nargs); jl_value_t *jl_gf_invoke(jl_value_t *types, jl_value_t *f, jl_value_t **args, size_t nargs); JL_DLLEXPORT jl_value_t *jl_matching_methods(jl_tupletype_t *types, int lim, int include_ambiguous, size_t world, size_t *min_valid, size_t *max_valid, int *ambig); @@ -534,6 +538,9 @@ extern jl_array_t *jl_module_init_order JL_GLOBALLY_ROOTED; extern htable_t jl_current_modules JL_GLOBALLY_ROOTED; int jl_compile_extern_c(void *llvmmod, void *params, void *sysimg, jl_value_t *declrt, jl_value_t *sigt); +jl_opaque_closure_t *jl_new_opaque_closure(jl_tupletype_t *argt, jl_value_t *isva, jl_value_t *rt_lb, + jl_value_t *rt_ub, jl_value_t *source, jl_value_t **env, size_t nenv); + // Each tuple can exist in one of 4 Vararg states: // NONE: no vararg Tuple{Int,Float32} // INT: vararg with integer length Tuple{Int,Vararg{Float32,2}} @@ -726,6 +733,8 @@ void jl_get_function_id(void *native_code, jl_code_instance_t *ncode, JL_DLLEXPORT jl_array_t *jl_idtable_rehash(jl_array_t *a, size_t newsz); jl_value_t **jl_table_peek_bp(jl_array_t *a, jl_value_t *key) JL_NOTSAFEPOINT; +JL_DLLEXPORT jl_method_t *jl_new_method_uninit(jl_module_t*); + JL_DLLEXPORT jl_methtable_t *jl_new_method_table(jl_sym_t *name, jl_module_t *module); jl_method_instance_t *jl_get_specialization1(jl_tupletype_t *types, size_t world, size_t *min_valid, size_t *max_valid, int mt_cache); jl_method_instance_t *jl_get_specialized(jl_method_t *m, jl_value_t *types, jl_svec_t *sp); @@ -1263,6 +1272,8 @@ extern jl_sym_t *enter_sym; extern jl_sym_t *leave_sym; extern jl_sym_t *exc_sym; extern jl_sym_t *error_sym; extern jl_sym_t *new_sym; extern jl_sym_t *using_sym; extern jl_sym_t *splatnew_sym; +extern jl_sym_t *new_opaque_closure_sym; +extern jl_sym_t *opaque_closure_method_sym; extern jl_sym_t *pop_exception_sym; extern jl_sym_t *const_sym; extern jl_sym_t *thunk_sym; extern jl_sym_t *foreigncall_sym; extern jl_sym_t *as_sym; diff --git a/src/method.c b/src/method.c index 6df9a9afdce7c..c4a686eb26e9d 100644 --- a/src/method.c +++ b/src/method.c @@ -18,6 +18,9 @@ extern "C" { extern jl_value_t *jl_builtin_getfield; extern jl_value_t *jl_builtin_tuple; +jl_method_t *jl_make_opaque_closure_method(jl_module_t *module, + jl_value_t *nargs, jl_value_t *functionloc, jl_code_info_t *ci); + // Resolve references to non-locally-defined variables to become references to global // variables in `module` (unless the rvalue is one of the type parameters in `sparam_vals`). static jl_value_t *resolve_globals(jl_value_t *expr, jl_module_t *module, jl_svec_t *sparam_vals, @@ -63,6 +66,18 @@ static jl_value_t *resolve_globals(jl_value_t *expr, jl_module_t *module, jl_sve } else { size_t i = 0, nargs = jl_array_len(e->args); + if (e->head == opaque_closure_method_sym) { + if (nargs != 3) { + jl_error("opaque_closure_method: invalid syntax"); + } + jl_value_t *nargs = jl_exprarg(e, 0); + jl_value_t *functionloc = jl_exprarg(e, 1); + jl_value_t *ci = jl_exprarg(e, 2); + if (!jl_is_code_info(ci)) { + jl_error("opaque_closure_method: lambda should be a CodeInfo"); + } + return (jl_value_t*)jl_make_opaque_closure_method(module, nargs, functionloc, (jl_code_info_t*)ci); + } if (e->head == cfunction_sym) { JL_NARGS(cfunction method definition, 5, 5); // (type, func, rt, at, cc) jl_value_t *typ = jl_exprarg(e, 0); @@ -625,12 +640,34 @@ JL_DLLEXPORT jl_method_t *jl_new_method_uninit(jl_module_t *module) m->nargs = 0; m->primary_world = 1; m->deleted_world = ~(size_t)0; + m->is_for_opaque_closure = 0; JL_MUTEX_INIT(&m->writelock); return m; } // method definition ---------------------------------------------------------- +jl_method_t *jl_make_opaque_closure_method(jl_module_t *module, + jl_value_t *nargs, jl_value_t *functionloc, jl_code_info_t *ci) +{ + jl_method_t *m = jl_new_method_uninit(module); + JL_GC_PUSH1(&m); + // TODO: Maybe have a signature of (parent method, stmt#)? + m->sig = (jl_value_t*)jl_anytuple_type; + // Unused for opaque closures. va-ness is determined on construction + m->isva = 0; + m->is_for_opaque_closure = 1; + m->name = jl_symbol("opaque closure"); + m->nargs = jl_unbox_long(nargs) + 1; + assert(jl_is_linenode(functionloc)); + jl_value_t *file = jl_linenode_file(functionloc); + m->file = jl_is_symbol(file) ? (jl_sym_t*)file : empty_sym; + m->line = jl_linenode_line(functionloc); + jl_method_set_source(m, ci); + JL_GC_POP(); + return m; +} + // empty generic function def JL_DLLEXPORT jl_value_t *jl_generic_function_def(jl_sym_t *name, jl_module_t *module, diff --git a/src/opaque_closure.c b/src/opaque_closure.c new file mode 100644 index 0000000000000..a7298e3805218 --- /dev/null +++ b/src/opaque_closure.c @@ -0,0 +1,91 @@ +#include "julia.h" +#include "julia_internal.h" + +JL_DLLEXPORT jl_value_t *jl_invoke_opaque_closure(jl_opaque_closure_t *oc, jl_value_t **args, size_t nargs) +{ + jl_value_t *ret = NULL; + JL_GC_PUSH1(&ret); + jl_ptls_t ptls = jl_get_ptls_states(); + size_t last_age = ptls->world_age; + ptls->world_age = oc->world; + ret = jl_interpret_opaque_closure(oc, args, nargs); + jl_typeassert(ret, jl_tparam1(jl_typeof(oc))); + ptls->world_age = last_age; + JL_GC_POP(); + return ret; +} + +jl_opaque_closure_t *jl_new_opaque_closure(jl_tupletype_t *argt, jl_value_t *isva, + jl_value_t *rt_lb, jl_value_t *rt_ub, jl_value_t *source, jl_value_t **env, size_t nenv) +{ + if (!jl_is_tuple_type((jl_value_t*)argt)) { + jl_error("OpaqueClosure argument tuple must be a tuple type"); + } + JL_TYPECHK(new_opaque_closure, bool, isva); + JL_TYPECHK(new_opaque_closure, type, rt_lb); + JL_TYPECHK(new_opaque_closure, type, rt_ub); + JL_TYPECHK(new_opaque_closure, method, source); + jl_ptls_t ptls = jl_get_ptls_states(); + jl_value_t *oc_type JL_ALWAYS_LEAFTYPE; + oc_type = jl_apply_type2((jl_value_t*)jl_opaque_closure_type, (jl_value_t*)argt, rt_ub); + JL_GC_PROMISE_ROOTED(oc_type); + jl_value_t *captures = NULL; + JL_GC_PUSH1(&captures); + captures = jl_f_tuple(NULL, env, nenv); + jl_opaque_closure_t *oc = (jl_opaque_closure_t*)jl_gc_alloc(ptls, sizeof(jl_opaque_closure_t), oc_type); + JL_GC_POP(); + oc->source = (jl_method_t*)source; + oc->isva = jl_unbox_bool(isva); + oc->invoke = (jl_fptr_args_t)jl_invoke_opaque_closure; + oc->specptr = NULL; + oc->captures = captures; + oc->world = jl_world_counter; + return oc; +} + +JL_CALLABLE(jl_new_opaque_closure_jlcall) +{ + if (nargs < 5) + jl_error("new_opaque_closure: Not enough arguments"); + return (jl_value_t*)jl_new_opaque_closure((jl_tupletype_t*)args[0], + args[1], args[2], args[3], args[4], &args[5], nargs-5); +} + + +// check whether the specified number of arguments is compatible with the +// specified number of paramters of the tuple type +STATIC_INLINE int jl_tupletype_length_compat(jl_value_t *v, size_t nargs) JL_NOTSAFEPOINT +{ + v = jl_unwrap_unionall(v); + assert(jl_is_tuple_type(v)); + size_t nparams = jl_nparams(v); + if (nparams == 0) + return nargs == 0; + jl_value_t *va = jl_tparam(v,nparams-1); + if (jl_is_vararg(va)) { + jl_value_t *len = jl_unwrap_vararg_num(va); + if (len &&jl_is_long(len)) + return nargs == nparams - 1 + jl_unbox_long(len); + return nargs >= nparams - 1; + } + return nparams == nargs; +} + +JL_CALLABLE(jl_f_opaque_closure_call) +{ + jl_opaque_closure_t* oc = (jl_opaque_closure_t*)F; + jl_value_t *argt = jl_tparam0(jl_typeof(oc)); + if (!jl_tupletype_length_compat(argt, nargs)) + jl_error("Incorrect argument count for OpaqueClosure"); + argt = jl_unwrap_unionall(argt); + assert(jl_is_datatype(argt)); + jl_svec_t *types = jl_get_fieldtypes((jl_datatype_t*)argt); + size_t ntypes = jl_svec_len(types); + for (int i = 0; i < nargs; ++i) { + jl_value_t *typ = i >= ntypes ? jl_svecref(types, ntypes-1) : jl_svecref(types, i); + if (jl_is_vararg(typ)) + typ = jl_unwrap_vararg(typ); + jl_typeassert(args[i], typ); + } + return oc->invoke(F, args, nargs); +} diff --git a/src/staticdata.c b/src/staticdata.c index 5a67ebd7eb313..847a0484c9403 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -30,7 +30,7 @@ extern "C" { // TODO: put WeakRefs on the weak_refs list during deserialization // TODO: handle finalizers -#define NUM_TAGS 144 +#define NUM_TAGS 146 // An array of references that need to be restored from the sysimg // This is a manually constructed dual of the gvars array, which would be produced by codegen for Julia code, for C. @@ -88,6 +88,7 @@ jl_value_t **const*const get_tags(void) { INSERT_TAG(jl_typename_type); INSERT_TAG(jl_builtin_type); INSERT_TAG(jl_code_info_type); + INSERT_TAG(jl_opaque_closure_type); INSERT_TAG(jl_task_type); INSERT_TAG(jl_uniontype_type); INSERT_TAG(jl_abstractstring_type); @@ -133,6 +134,7 @@ jl_value_t **const*const get_tags(void) { INSERT_TAG(jl_type_typename); INSERT_TAG(jl_namedtuple_typename); INSERT_TAG(jl_vecelement_typename); + INSERT_TAG(jl_opaque_closure_typename); // special exceptions INSERT_TAG(jl_errorexception_type); @@ -241,7 +243,7 @@ static const jl_fptr_args_t id_to_fptrs[] = { &jl_f_arrayref, &jl_f_const_arrayref, &jl_f_arrayset, &jl_f_arraysize, &jl_f_apply_type, &jl_f_applicable, &jl_f_invoke, &jl_f_sizeof, &jl_f__expr, &jl_f__typevar, &jl_f_ifelse, &jl_f__structtype, &jl_f__abstracttype, &jl_f__primitivetype, - &jl_f__typebody, &jl_f__setsuper, &jl_f__equiv_typedef, + &jl_f__typebody, &jl_f__setsuper, &jl_f__equiv_typedef, &jl_f_opaque_closure_call, NULL }; typedef struct { diff --git a/src/toplevel.c b/src/toplevel.c index 56523f2d09b54..88ace36d193a8 100644 --- a/src/toplevel.c +++ b/src/toplevel.c @@ -303,7 +303,7 @@ JL_DLLEXPORT jl_module_t *jl_base_relative_to(jl_module_t *m) return jl_top_module; } -static void expr_attributes(jl_value_t *v, int *has_intrinsics, int *has_defs) +static void expr_attributes(jl_value_t *v, int *has_intrinsics, int *has_defs, int *has_opaque) { if (!jl_is_expr(v)) return; @@ -334,6 +334,10 @@ static void expr_attributes(jl_value_t *v, int *has_intrinsics, int *has_defs) *has_intrinsics = 1; return; } + else if (head == new_opaque_closure_sym) { + *has_opaque = 1; + return; + } else if (head == call_sym && jl_expr_nargs(e) > 0) { jl_value_t *called = NULL; jl_value_t *f = jl_exprarg(e, 0); @@ -363,7 +367,7 @@ static void expr_attributes(jl_value_t *v, int *has_intrinsics, int *has_defs) for (i = 0; i < jl_array_len(e->args); i++) { jl_value_t *a = jl_exprarg(e, i); if (jl_is_expr(a)) - expr_attributes(a, has_intrinsics, has_defs); + expr_attributes(a, has_intrinsics, has_defs, has_opaque); } } @@ -372,17 +376,17 @@ int jl_code_requires_compiler(jl_code_info_t *src) jl_array_t *body = src->code; assert(jl_typeis(body, jl_array_any_type)); size_t i; - int has_intrinsics = 0, has_defs = 0; + int has_intrinsics = 0, has_defs = 0, has_opaque = 0; for(i=0; i < jl_array_len(body); i++) { jl_value_t *stmt = jl_array_ptr_ref(body,i); - expr_attributes(stmt, &has_intrinsics, &has_defs); + expr_attributes(stmt, &has_intrinsics, &has_defs, &has_opaque); if (has_intrinsics) return 1; } return 0; } -static void body_attributes(jl_array_t *body, int *has_intrinsics, int *has_defs, int *has_loops) +static void body_attributes(jl_array_t *body, int *has_intrinsics, int *has_defs, int *has_loops, int *has_opaque) { size_t i; *has_loops = 0; @@ -398,7 +402,7 @@ static void body_attributes(jl_array_t *body, int *has_intrinsics, int *has_defs *has_loops = 1; } } - expr_attributes(stmt, has_intrinsics, has_defs); + expr_attributes(stmt, has_intrinsics, has_defs, has_opaque); } } @@ -843,12 +847,12 @@ jl_value_t *jl_toplevel_eval_flex(jl_module_t *JL_NONNULL m, jl_value_t *e, int return (jl_value_t*)ex; } - int has_intrinsics = 0, has_defs = 0, has_loops = 0; + int has_intrinsics = 0, has_defs = 0, has_loops = 0, has_opaque = 0; assert(head == thunk_sym); thk = (jl_code_info_t*)jl_exprarg(ex, 0); assert(jl_is_code_info(thk)); assert(jl_typeis(thk->code, jl_array_any_type)); - body_attributes((jl_array_t*)thk->code, &has_intrinsics, &has_defs, &has_loops); + body_attributes((jl_array_t*)thk->code, &has_intrinsics, &has_defs, &has_loops, &has_opaque); jl_value_t *result; if (has_intrinsics || (!has_defs && fast && has_loops && @@ -874,6 +878,9 @@ jl_value_t *jl_toplevel_eval_flex(jl_module_t *JL_NONNULL m, jl_value_t *e, int else { // use interpreter assert(thk); + if (has_opaque) { + jl_resolve_globals_in_ir((jl_array_t*)thk->code, m, NULL, 0); + } result = jl_interpret_toplevel_thunk(m, thk); } diff --git a/src/utils.scm b/src/utils.scm index 43c3214cf5ebb..c1a893102053c 100644 --- a/src/utils.scm +++ b/src/utils.scm @@ -78,6 +78,7 @@ (else '()))) (define (caddddr x) (car (cdr (cdr (cdr (cdr x)))))) +(define (cdddddr x) (cdr (cdr (cdr (cdr (cdr x)))))) (define (table.clone t) (let ((nt (table))) @@ -93,3 +94,12 @@ any (loop (cdr lst) (or (pred (car lst)) any))))) + +;; construct a table mapping each element of `lst` to its index (1-indexed) +(define (symbol-to-idx-map lst) + (let ((tbl (table))) + (let loop ((xs lst) (i 1)) + (if (pair? xs) + (begin (put! tbl (car xs) i) + (loop (cdr xs) (+ i 1))))) + tbl)) diff --git a/stdlib/Serialization/src/Serialization.jl b/stdlib/Serialization/src/Serialization.jl index 10cd67c582c8b..cf425566b54c6 100644 --- a/stdlib/Serialization/src/Serialization.jl +++ b/stdlib/Serialization/src/Serialization.jl @@ -413,6 +413,7 @@ function serialize(s::AbstractSerializer, meth::Method) serialize(s, meth.slot_syms) serialize(s, meth.nargs) serialize(s, meth.isva) + serialize(s, meth.is_for_opaque_closure) if isdefined(meth, :source) serialize(s, Base._uncompressed_ast(meth, meth.source)) else @@ -986,7 +987,14 @@ function deserialize(s::AbstractSerializer, ::Type{Method}) end nargs = deserialize(s)::Int32 isva = deserialize(s)::Bool - template = deserialize(s) + is_for_opaque_closure = false + template_or_is_opaque = deserialize(s) + if isa(template_or_is_opaque, Bool) + is_for_opaque_closure = template_or_is_opaque + template = deserialize(s) + else + template = template_or_is_opaque + end generator = deserialize(s) if makenew meth.module = mod @@ -996,6 +1004,7 @@ function deserialize(s::AbstractSerializer, ::Type{Method}) meth.sig = sig meth.nargs = nargs meth.isva = isva + meth.is_for_opaque_closure = is_for_opaque_closure if template !== nothing # TODO: compress template meth.source = template::CodeInfo @@ -1012,9 +1021,11 @@ function deserialize(s::AbstractSerializer, ::Type{Method}) linfo.def = meth meth.generator = linfo end - mt = ccall(:jl_method_table_for, Any, (Any,), sig) - if mt !== nothing && nothing === ccall(:jl_methtable_lookup, Any, (Any, Any, UInt), mt, sig, typemax(UInt)) - ccall(:jl_method_table_insert, Cvoid, (Any, Any, Ptr{Cvoid}), mt, meth, C_NULL) + if !is_for_opaque_closure + mt = ccall(:jl_method_table_for, Any, (Any,), sig) + if mt !== nothing && nothing === ccall(:jl_methtable_lookup, Any, (Any, Any, UInt), mt, sig, typemax(UInt)) + ccall(:jl_method_table_insert, Cvoid, (Any, Any, Ptr{Cvoid}), mt, meth, C_NULL) + end end remember_object(s, meth, lnumber) end diff --git a/test/choosetests.jl b/test/choosetests.jl index 460b8121bb9f5..8f7e920b6b1ce 100644 --- a/test/choosetests.jl +++ b/test/choosetests.jl @@ -55,7 +55,7 @@ function choosetests(choices = []) "boundscheck", "error", "ambiguous", "cartesian", "osutils", "channels", "iostream", "secretbuffer", "specificity", "reinterpretarray", "syntax", "corelogging", "missing", "asyncmap", - "smallarrayshrink" + "smallarrayshrink", "opaque_closure" ] tests = [] diff --git a/test/opaque_closure.jl b/test/opaque_closure.jl new file mode 100644 index 0000000000000..492b1db47e618 --- /dev/null +++ b/test/opaque_closure.jl @@ -0,0 +1,152 @@ +using Test +using InteractiveUtils + +const_int() = 1 + +const lno = LineNumberNode(1, :none) + +let ci = @code_lowered const_int() + @eval function oc_trivial() + $(Expr(:new_opaque_closure, Tuple{}, false, Any, Any, + Expr(:opaque_closure_method, 0, lno, ci))) + end +end +@test isa(oc_trivial(), Core.OpaqueClosure{Tuple{}, Any}) +@test oc_trivial()() == 1 + +let ci = @code_lowered const_int() + @eval function oc_simple_inf() + $(Expr(:new_opaque_closure, Tuple{}, false, Union{}, Any, + Expr(:opaque_closure_method, 0, lno, ci))) + end +end +@test_broken isa(oc_simple_inf(), Core.OpaqueClosure{Tuple{}, Int}) +@test oc_simple_inf()() == 1 + +struct OcClos2Int + a::Int + b::Int +end +(a::OcClos2Int)() = getfield(a, 1) + getfield(a, 2) +let ci = @code_lowered OcClos2Int(1, 2)(); + @eval function oc_trivial_clos() + $(Expr(:new_opaque_closure, Tuple{}, false, Int, Int, + Expr(:opaque_closure_method, 0, lno, ci), + 1, 2)) + end +end +@test oc_trivial_clos()() == 3 + +let ci = @code_lowered OcClos2Int(1, 2)(); + @eval function oc_self_call_clos() + $(Expr(:new_opaque_closure, Tuple{}, false, Int, Int, + Expr(:opaque_closure_method, 0, lno, ci), + 1, 2))() + end +end +@test oc_self_call_clos() == 3 +let opt = @code_typed oc_self_call_clos() + @test_broken length(opt[1].code) == 1 + @test_broken isa(opt[1].code[1], Core.ReturnNode) +end + +struct OcClos1Any + a +end +(a::OcClos1Any)() = getfield(a, 1) +let ci = @code_lowered OcClos1Any(1)() + @eval function oc_pass_clos(x) + $(Expr(:new_opaque_closure, Tuple{}, false, Any, Any, + Expr(:opaque_closure_method, 0, lno, ci), + :x)) + end +end +@test oc_pass_clos(1)() == 1 +@test oc_pass_clos("a")() == "a" + +let ci = @code_lowered OcClos1Any(1)() + @eval function oc_infer_pass_clos(x) + $(Expr(:new_opaque_closure, Tuple{}, false, Union{}, Any, + Expr(:opaque_closure_method, 0, lno, ci), + :x)) + end +end +@test_broken isa(oc_infer_pass_clos(1), Core.OpaqueClosure{Tuple{}, typeof(1)}) +@test_broken isa(oc_infer_pass_clos("a"), Core.OpaqueClosure{Tuple{}, typeof("a")}) +@test oc_infer_pass_clos(1)() == 1 +@test oc_infer_pass_clos("a")() == "a" + +let ci = @code_lowered identity(1) + @eval function oc_infer_pass_id() + $(Expr(:new_opaque_closure, Tuple{Any}, false, Any, Any, + Expr(:opaque_closure_method, 1, lno, ci))) + end +end +function complicated_identity(x) + oc_infer_pass_id()(x) +end +@test_broken @inferred(complicated_identity(1)) == 1 +@test_broken @inferred(complicated_identity("a")) == "a" +let ci = (@code_typed complicated_identity(1))[1] + @test_broken length(ci.code) == 1 + @test_broken isa(ci.code[1], Core.ReturnNode) +end + +struct OcOpt + A +end + +(A::OcOpt)() = ndims(getfield(A, 1)) + +let ci = @code_lowered OcOpt([1 2])() + @eval function oc_opt_ndims(A) + $(Expr(:new_opaque_closure, Tuple{}, false, Union{}, Any, + Expr(:opaque_closure_method, 0, lno, ci), + :A)) + end +end +oc_opt_ndims([1 2]) + +let A = [1 2] + let Oc = oc_opt_ndims(A) + @test_broken sizeof(Oc.env) == 0 + @test Oc() == 2 + end +end + +using Base.Experimental: @opaque + +@test @opaque(x->2x)(8) == 16 +let f = @opaque (x::Int, y::Float64)->(2x, 3y) + @test_throws TypeError f(1, 1) + @test f(2, 3.0) === (4, 9.0) +end +function uses_frontend_opaque(x) + @opaque y->x+y +end +@test uses_frontend_opaque(10)(8) == 18 + +# World age mechanism +function test_oc_world_age end +mk_oc_world_age() = @opaque ()->test_oc_world_age() +g_world_age = @opaque ()->test_oc_world_age() +h_world_age = mk_oc_world_age() +test_oc_world_age() = 1 +@test_throws MethodError g_world_age() +@test_throws MethodError h_world_age() +@test mk_oc_world_age()() == 1 +g_world_age = @opaque ()->test_oc_world_age() +@test g_world_age() == 1 + +# Evil, dynamic Vararg stuff (don't do this - made to work for consistency) +function maybe_opaque(isva::Bool) + T = isva ? Vararg{Int, 1} : Int + @opaque (x::T)->x +end +@test maybe_opaque(false)(1) == 1 +@test maybe_opaque(true)(1) == (1,) + +# Vargarg in complied mode +mk_va_opaque() = @opaque (x...)->x +@test mk_va_opaque()(1) == (1,) +@test mk_va_opaque()(1,2) == (1,2) diff --git a/test/precompile.jl b/test/precompile.jl index 3358fda58f0e3..0b65c2e137619 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -846,3 +846,16 @@ precompile_test_harness("Issue #38312") do load_path pointer_from_objref(eval(Meta.parse(TheType))) === pointer_from_objref((@eval (using Bar38312; Bar38312)).TheType) end + +precompile_test_harness("Opaque Closure") do load_path + write(joinpath(load_path, "OCPrecompile.jl"), + """ + module OCPrecompile + using Base.Experimental: @opaque + f(x) = @opaque y->x+y + end + """) + Base.compilecache(Base.PkgId("OCPrecompile")) + f = (@eval (using OCPrecompile; OCPrecompile)).f + @test Base.invokelatest(f, 1)(2) == 3 +end From a4cd68cceb78636fd9968e8464a7e12cd333bec4 Mon Sep 17 00:00:00 2001 From: kimikage Date: Thu, 21 Jan 2021 15:46:01 +0900 Subject: [PATCH 151/239] Fix performance regression in broadcasting with CartesianIndices (#39333) * Fix performance regression in broadcasting with CartesianIndices This avoids the boundary check due to a change in the implementation of iteration using `CartecianIndices` in PR #37829. This is a workaround on the caller side and does not change the iteration mechanism itself. Co-authored-by: Matt Bauman Co-authored-by: thofma --- base/broadcast.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index 6cfd4dbb8bf89..d7f9e0cdff6e1 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -977,8 +977,10 @@ preprocess_args(dest, args::Tuple{}) = () end end bc′ = preprocess(dest, bc) - @simd for I in eachindex(bc′) - @inbounds dest[I] = bc′[I] + # Performance may vary depending on whether `@inbounds` is placed outside the + # for loop or not. (cf. https://github.com/JuliaLang/julia/issues/38086) + @inbounds @simd for I in eachindex(bc′) + dest[I] = bc′[I] end return dest end From cf12e49d599d35ba5d7e67f0d981b31637ae46b0 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 21 Jan 2021 10:19:23 -0500 Subject: [PATCH 152/239] Fix OC code emission (#39346) Fixes issue currently seen on CI - master's configuration changed since the OC PR ran, so it wasn't caught before merging. --- src/codegen.cpp | 54 +++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 18f456d3b8fe6..8f18159a09eb5 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4580,37 +4580,39 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaval) env = mark_julia_type(ctx, env_val, true, env_t); } - Function *specptr = closure_m->getFunction(closure_decls.specFunctionObject); - jl_cgval_t fptr; - if (specptr) { - jl_returninfo_t returninfo = get_specsig_function(ctx, jl_Module, - closure_decls.specFunctionObject, li->specTypes, ub.constant); - fptr = mark_julia_type(ctx, returninfo.decl, false, jl_voidpointer_type); + assert(closure_decls.functionObject != "jl_fptr_sparam"); + bool isspecsig = closure_decls.functionObject != "jl_fptr_args"; + + Function *F = NULL; + std::string fname = isspecsig ? + closure_decls.functionObject : + closure_decls.specFunctionObject; + if (GlobalValue *V = jl_Module->getNamedValue(fname)) { + F = cast(V); } else { - fptr = mark_julia_type(ctx, - (llvm::Value*)Constant::getNullValue(T_size), - false, jl_voidpointer_type); + F = Function::Create(get_func_sig(jl_LLVMContext), + Function::ExternalLinkage, + fname, jl_Module); + F->setAttributes(get_func_attrs(jl_LLVMContext)); } + jl_cgval_t jlcall_ptr = mark_julia_type(ctx, + F, false, jl_voidpointer_type); - jl_cgval_t jlcall_ptr; - assert(closure_decls.functionObject != "jl_fptr_sparam"); - if (closure_decls.functionObject == "jl_fptr_args") { - jlcall_ptr = fptr; - } - else { - Function *F = NULL; - if (GlobalValue *V = jl_Module->getNamedValue(closure_decls.functionObject)) { - F = cast(V); - } - else { - F = Function::Create(get_func_sig(jl_LLVMContext), - Function::ExternalLinkage, - closure_decls.functionObject, jl_Module); - F->setAttributes(get_func_attrs(jl_LLVMContext)); + jl_cgval_t fptr; + if (!isspecsig) { + fptr = jlcall_ptr; + } else { + Function *specptr = closure_m->getFunction(closure_decls.specFunctionObject); + if (specptr) { + jl_returninfo_t returninfo = get_specsig_function(ctx, jl_Module, + closure_decls.specFunctionObject, li->specTypes, ub.constant); + fptr = mark_julia_type(ctx, returninfo.decl, false, jl_voidpointer_type); + } else { + fptr = mark_julia_type(ctx, + (llvm::Value*)Constant::getNullValue(T_size), + false, jl_voidpointer_type); } - jlcall_ptr = mark_julia_type(ctx, - F, false, jl_voidpointer_type); } jl_cgval_t world_age = mark_julia_type(ctx, From 2b132342ffd22ee9dabee9e2819584dd085e38f7 Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Thu, 21 Jan 2021 11:09:34 -0500 Subject: [PATCH 153/239] LibGit2: patch to pass hostkey & port to host verify callback (#39324) It seems that no one actually verifies SSH host identity with libgit2 because the callback doesn't give enough information do so correctly: - It doesn't give the actual host key fingerprint, but rather three different hashes thereof. This means we cannot distinguish a known hosts entry that has a different type (`ssh-rsa`, `ssh-dsa`, etc.) from an entry with a matching type and a fingerprint mismatch: the former should be treated as an unknown host whereas the latter is a host key mismatch; they cannot be distinguished without this patch. - If the user connects on a non-default port (i.e. not 22), this is not passed to the callback in any way. Since there can be different known host entries for different ports and they should be treated as distinct, this also means the current API cannot be used to verify hosts serving SSH on non-standard ports. This patch passes the port. I will try to upstream some version of this patch to libgit2. The same patch has already been applied to the LibGit2 JLL. Fixes #38777. Might fix https://github.com/JuliaLang/Pkg.jl/issues/2334. --- deps/Versions.make | 2 +- .../md5 | 1 + .../sha512 | 1 + deps/libgit2.mk | 8 +- deps/patches/libgit2-hostkey.patch | 61 ++++++++ stdlib/LibGit2/src/callbacks.jl | 143 +++++++----------- stdlib/LibGit2/src/consts.jl | 10 +- stdlib/LibGit2/test/libgit2.jl | 83 ++++------ 8 files changed, 158 insertions(+), 151 deletions(-) create mode 100644 deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/md5 create mode 100644 deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/sha512 create mode 100644 deps/patches/libgit2-hostkey.patch diff --git a/deps/Versions.make b/deps/Versions.make index 9fd9608fc1fa6..22a6c4d744135 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -33,7 +33,7 @@ CURL_JLL_NAME := LibCURL LAPACK_VER := 3.9.0 # LibGit2 -LIBGIT2_VER := 1.1.0 +LIBGIT2_JLL_VER := 1.2.1+0 LIBGIT2_JLL_NAME := LibGit2 # LibSSH2 diff --git a/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/md5 b/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/md5 new file mode 100644 index 0000000000000..3e66eb33f76f3 --- /dev/null +++ b/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/md5 @@ -0,0 +1 @@ +48b3eb5811566f1cc70a9581b8f702f4 diff --git a/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/sha512 b/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/sha512 new file mode 100644 index 0000000000000..d9a0fef30537c --- /dev/null +++ b/deps/checksums/LibGit2.v1.2.1+0.x86_64-apple-darwin.tar.gz/sha512 @@ -0,0 +1 @@ +46af2fbe9c96a18a97531aefc79e710abd8e12eca64ddcb2a0ddc8bc675dbaed0723ddbd4401d870eddcae04d99c4306cc6bdaa54b063de36d7fc0981ba86587 diff --git a/deps/libgit2.mk b/deps/libgit2.mk index 301e73b454c5e..82e9817134454 100644 --- a/deps/libgit2.mk +++ b/deps/libgit2.mk @@ -46,9 +46,15 @@ $(LIBGIT2_SRC_PATH)/libgit2-mbedtls-incdir.patch-applied: $(LIBGIT2_SRC_PATH)/li patch -p1 -f < $(SRCDIR)/patches/libgit2-mbedtls-incdir.patch echo 1 > $@ +$(LIBGIT2_SRC_PATH)/libgit2-hostkey.patch-applied: $(LIBGIT2_SRC_PATH)/libgit2-mbedtls-incdir.patch-applied + cd $(LIBGIT2_SRC_PATH) && \ + patch -p1 -f < $(SRCDIR)/patches/libgit2-hostkey.patch + echo 1 > $@ + $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: \ $(LIBGIT2_SRC_PATH)/libgit2-agent-nonfatal.patch-applied \ - $(LIBGIT2_SRC_PATH)/libgit2-mbedtls-incdir.patch-applied + $(LIBGIT2_SRC_PATH)/libgit2-mbedtls-incdir.patch-applied \ + $(LIBGIT2_SRC_PATH)/libgit2-hostkey.patch-applied $(BUILDDIR)/$(LIBGIT2_SRC_DIR)/build-configured: $(LIBGIT2_SRC_PATH)/source-extracted mkdir -p $(dir $@) diff --git a/deps/patches/libgit2-hostkey.patch b/deps/patches/libgit2-hostkey.patch new file mode 100644 index 0000000000000..16c0f3b13f621 --- /dev/null +++ b/deps/patches/libgit2-hostkey.patch @@ -0,0 +1,61 @@ +diff --git a/include/git2/cert.h b/include/git2/cert.h +index e8cd2d180..54293cd31 100644 +--- a/include/git2/cert.h ++++ b/include/git2/cert.h +@@ -111,6 +111,14 @@ typedef struct { + * have the SHA-256 hash of the hostkey. + */ + unsigned char hash_sha256[32]; ++ ++ /** ++ * Hostkey itself. ++ */ ++ int hostkey_type; ++ size_t hostkey_len; ++ unsigned char hostkey[1024]; ++ + } git_cert_hostkey; + + /** +diff --git a/src/transports/ssh.c b/src/transports/ssh.c +index f4ed05bb1..049697796 100644 +--- a/src/transports/ssh.c ++++ b/src/transports/ssh.c +@@ -523,6 +523,7 @@ static int _git_ssh_setup_conn( + git_credential *cred = NULL; + LIBSSH2_SESSION* session=NULL; + LIBSSH2_CHANNEL* channel=NULL; ++ char *host_and_port; + + t->current_stream = NULL; + +@@ -566,6 +567,12 @@ post_extract: + + cert.parent.cert_type = GIT_CERT_HOSTKEY_LIBSSH2; + ++ key = libssh2_session_hostkey(session, &cert.hostkey_len, &cert.hostkey_type); ++ bzero(&cert.hostkey, sizeof(cert.hostkey)); ++ if (cert.hostkey_len > sizeof(cert.hostkey)) ++ cert.hostkey_len = sizeof(cert.hostkey); ++ memcpy(&cert.hostkey, key, cert.hostkey_len); ++ + #ifdef LIBSSH2_HOSTKEY_HASH_SHA256 + key = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA256); + if (key != NULL) { +@@ -597,7 +604,15 @@ post_extract: + + cert_ptr = &cert; + +- error = t->owner->certificate_check_cb((git_cert *) cert_ptr, 0, urldata.host, t->owner->message_cb_payload); ++ if (git_net_url_is_default_port(&urldata)) { ++ host_and_port = urldata.host; ++ } else { ++ size_t n = strlen(urldata.host) + strlen(urldata.port) + 2; ++ host_and_port = alloca(n); ++ sprintf(host_and_port, "%s:%s", urldata.host, urldata.port); ++ } ++ ++ error = t->owner->certificate_check_cb((git_cert *) cert_ptr, 0, host_and_port, t->owner->message_cb_payload); + + if (error < 0 && error != GIT_PASSTHROUGH) { + if (!git_error_last()) diff --git a/stdlib/LibGit2/src/callbacks.jl b/stdlib/LibGit2/src/callbacks.jl index 604014bbea7b2..8eddb8c864644 100644 --- a/stdlib/LibGit2/src/callbacks.jl +++ b/stdlib/LibGit2/src/callbacks.jl @@ -360,24 +360,14 @@ function fetchhead_foreach_callback(ref_name::Cstring, remote_url::Cstring, end struct CertHostKey - parent :: Cint - mask :: Cint - md5 :: NTuple{16,UInt8} - sha1 :: NTuple{20,UInt8} - sha256 :: NTuple{32,UInt8} -end - -struct KeyHashes - sha1 :: Union{NTuple{20,UInt8}, Nothing} - sha256 :: Union{NTuple{32,UInt8}, Nothing} -end - -function KeyHashes(cert_p::Ptr{CertHostKey}) - cert = unsafe_load(cert_p) - return KeyHashes( - cert.mask & Consts.CERT_SSH_SHA1 != 0 ? cert.sha1 : nothing, - cert.mask & Consts.CERT_SSH_SHA256 != 0 ? cert.sha256 : nothing, - ) + parent :: Cint + mask :: Cint + md5 :: NTuple{16,UInt8} + sha1 :: NTuple{20,UInt8} + sha256 :: NTuple{32,UInt8} + type :: Cint + len :: Csize_t + data :: NTuple{1024,UInt8} end function verify_host_error(message::AbstractString) @@ -406,22 +396,21 @@ function certificate_callback( return Consts.CERT_REJECT elseif transport == "SSH" # SSH verification has to be done here - files = [joinpath(homedir(), ".ssh", "known_hosts")] - check = ssh_knownhost_check(files, host, KeyHashes(cert_p)) + files = NetworkOptions.ssh_known_hosts_files() + cert = unsafe_load(cert_p) + check = ssh_knownhost_check(files, host, cert) valid = false - if check == Consts.SSH_HOST_KNOWN + if check == Consts.LIBSSH2_KNOWNHOST_CHECK_MATCH valid = true - elseif check == Consts.SSH_HOST_UNKNOWN + elseif check == Consts.LIBSSH2_KNOWNHOST_CHECK_NOTFOUND if Sys.which("ssh-keyscan") !== nothing msg = "Please run `ssh-keyscan $host >> $(files[1])` in order to add the server to your known hosts file and then try again." else msg = "Please connect once using `ssh $host` in order to add the server to your known hosts file and then try again. You may not be allowed to log in (wrong user and/or no login allowed), but ssh will prompt you to add a host key for the server which will allow libgit2 to verify the server." end verify_host_error("SSH host verification: the server `$host` is not a known host. $msg") - elseif check == Consts.SSH_HOST_MISMATCH + elseif check == Consts.LIBSSH2_KNOWNHOST_CHECK_MISMATCH verify_host_error("SSH host verification: the identity of the server `$host` does not match its known hosts record. Someone could be trying to man-in-the-middle your connection. It is also possible that the server has changed its key, in which case you should check with the server administrator and if they confirm that the key has been changed, update your known hosts file.") - elseif check == Consts.SSH_HOST_BAD_HASH - verify_host_error("SSH host verification: no secure certificate hash available for `$host`, cannot verify server identity.") else @error("unexpected SSH known host check result", check) end @@ -431,31 +420,6 @@ function certificate_callback( return Consts.CERT_REJECT end -## SSH known host checking -# -# We can't use libssh2_knownhost_check because libgit2, for no good reason, -# doesn't give us a host fingerprint that we can use for that and instead gives -# us multiple hashes of that fingerprint instead. Moreover, since a host can -# have multiple fingerprints in the known hosts file with different encryption -# types (gitlab.com does this, for example), we need to iterate through all the -# known hosts entries and manually check if any of them is a match. -# -# The fact that libgit2 won't give us a fingerprint also means that we cannot, -# even if we wanted to, prompt the user for whether to add the fingerprint to -# the known hosts file, since we don't have the fingerprint that should be -# added. The only option is to instruct the user how to add it themselves. -# -# Check logic: if a host appears in a known hosts file at all then one of the -# keys in that file must match or we declare a mismatch; if the host name -# doesn't appear in the file at all, however, we will continue searching files. -# -# This allows adding a host to the system known hosts file to fully override -# that host appearing in a bundled known hosts file. It is necessary to allow -# any of multiple entries in a single file to match, however, to allow for the -# possiblity that the file contains multiple fingerprints for the same host. If -# libgit2 gave us the fucking fingerprint then we could search for only an entry -# with the correct type, but we can't do that without the actual fingerprint. - struct KnownHost magic :: Cuint node :: Ptr{Cvoid} @@ -465,12 +429,27 @@ struct KnownHost end function ssh_knownhost_check( - files :: AbstractVector{<:AbstractString}, - host :: AbstractString, - hashes :: KeyHashes, + files :: AbstractVector{<:AbstractString}, + host :: AbstractString, + cert :: CertHostKey, +) + key = collect(cert.data)[1:cert.len] + return ssh_knownhost_check(files, host, key) +end + +function ssh_knownhost_check( + files :: AbstractVector{<:AbstractString}, + host :: AbstractString, + key :: String, ) - hashes.sha1 === hashes.sha256 === nothing && - return Consts.SSH_HOST_BAD_HASH + if (m = match(r"^(.+):(\d+)$", host)) !== nothing + host = m.captures[1] + port = parse(Int, m.captures[2]) + else + port = 22 # default SSH port + end + mask = Consts.LIBSSH2_KNOWNHOST_TYPE_PLAIN | + Consts.LIBSSH2_KNOWNHOST_KEYENC_RAW session = @ccall "libssh2".libssh2_session_init_ex( C_NULL :: Ptr{Cvoid}, C_NULL :: Ptr{Cvoid}, @@ -492,46 +471,32 @@ function ssh_knownhost_check( @ccall "libssh2".libssh2_knownhost_free(hosts::Ptr{Cvoid})::Cvoid continue end - name_match = false - prev = Ptr{KnownHost}(0) - store = Ref{Ptr{KnownHost}}() - while true - get = @ccall "libssh2".libssh2_knownhost_get( - hosts :: Ptr{Cvoid}, - store :: Ptr{Ptr{KnownHost}}, - prev :: Ptr{KnownHost}, - ) :: Cint - get < 0 && @warn("Error searching SSH known hosts file `$file`") - get == 0 || break # end of file or error - # got a known hosts record for host, now check its key hash - prev = store[] - known_host = unsafe_load(prev) - known_host.name == C_NULL && continue - host == unsafe_string(known_host.name) || continue - name_match = true # we've found some entry in this file - key_match = true # all available hashes must match - key = base64decode(unsafe_string(known_host.key)) - if hashes.sha1 !== nothing - key_match &= sha1(key) == collect(hashes.sha1) - end - if hashes.sha256 !== nothing - key_match &= sha256(key) == collect(hashes.sha256) - end - key_match || continue - # name and key match found + size = ncodeunits(key) + check = @ccall "libssh2".libssh2_knownhost_checkp( + hosts :: Ptr{Cvoid}, + host :: Cstring, + port :: Cint, + key :: Ptr{UInt8}, + size :: Csize_t, + mask :: Cint, + C_NULL :: Ptr{Ptr{KnownHost}}, + ) :: Cint + if check == Consts.LIBSSH2_KNOWNHOST_CHECK_MATCH || + check == Consts.LIBSSH2_KNOWNHOST_CHECK_MISMATCH @ccall "libssh2".libssh2_knownhost_free(hosts::Ptr{Cvoid})::Cvoid @assert 0 == @ccall "libssh2".libssh2_session_free(session::Ptr{Cvoid})::Cint - return Consts.SSH_HOST_KNOWN + return check + else + @ccall "libssh2".libssh2_knownhost_free(hosts::Ptr{Cvoid})::Cvoid + if check == Consts.LIBSSH2_KNOWNHOST_CHECK_FAILURE + @warn("Error searching SSH known hosts file `$file`") + end + continue end - @ccall "libssh2".libssh2_knownhost_free(hosts::Ptr{Cvoid})::Cvoid - name_match || continue # no name match, search more files - # name match but no key match => host mismatch - @assert 0 == @ccall "libssh2".libssh2_session_free(session::Ptr{Cvoid})::Cint - return Consts.SSH_HOST_MISMATCH end # name not found in any known hosts files @assert 0 == @ccall "libssh2".libssh2_session_free(session::Ptr{Cvoid})::Cint - return Consts.SSH_HOST_UNKNOWN + return Consts.LIBSSH2_KNOWNHOST_CHECK_NOTFOUND end "C function pointer for `mirror_callback`" diff --git a/stdlib/LibGit2/src/consts.jl b/stdlib/LibGit2/src/consts.jl index 7658b2d47d779..2bc9edaf8950b 100644 --- a/stdlib/LibGit2/src/consts.jl +++ b/stdlib/LibGit2/src/consts.jl @@ -330,11 +330,11 @@ const LIBSSH2_KNOWNHOST_TYPE_CUSTOM = 3 const LIBSSH2_KNOWNHOST_KEYENC_RAW = 1 << 16 const LIBSSH2_KNOWNHOST_KEYENC_BASE64 = 2 << 16 -# internal constants for SSH host verification outcomes -const SSH_HOST_KNOWN = 0 -const SSH_HOST_UNKNOWN = 1 -const SSH_HOST_MISMATCH = 2 -const SSH_HOST_BAD_HASH = 3 +# libssh2 host check return values +const LIBSSH2_KNOWNHOST_CHECK_MATCH = 0 +const LIBSSH2_KNOWNHOST_CHECK_MISMATCH = 1 +const LIBSSH2_KNOWNHOST_CHECK_NOTFOUND = 2 +const LIBSSH2_KNOWNHOST_CHECK_FAILURE = 3 @enum(GIT_SUBMODULE_IGNORE, SUBMODULE_IGNORE_UNSPECIFIED = -1, # use the submodule's configuration SUBMODULE_IGNORE_NONE = 1, # any change or untracked == dirty diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 736d1459293c9..2479deeb31b6c 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -2406,35 +2406,17 @@ mktempdir() do dir end @testset "SSH known host checking" begin - key_hashes(sha1::String, sha256::String) = LibGit2.KeyHashes( - Tuple(hex2bytes(sha1)), - Tuple(hex2bytes(sha256)), - ) + CHECK_MATCH = LibGit2.Consts.LIBSSH2_KNOWNHOST_CHECK_MATCH + CHECK_MISMATCH = LibGit2.Consts.LIBSSH2_KNOWNHOST_CHECK_MISMATCH + CHECK_NOTFOUND = LibGit2.Consts.LIBSSH2_KNOWNHOST_CHECK_NOTFOUND + CHECK_FAILURE = LibGit2.Consts.LIBSSH2_KNOWNHOST_CHECK_FAILURE + # randomly generated hashes matching no hosts - random_key_hashes = key_hashes( - "a9971372d02a67bdfea82e2b4808b4cf478b49c0", - "45aac5c20d5c7f8b998fee12fa9b75086c0d3ed6e33063f7ce940409ff4efbbc" - ) + random_key = "\0\0\0\assh-rsa\0\0\0\x01#\0\0\0\x81\0¿\x95\xbe9\xfc9g\n:\xcf&\x06YA\xb5`\x97\xc13A\xbf;T+C\xc9Ut J>\xc5ҍ\xc4_S\x8a \xc1S\xeb\x15FH\xd2a\x04.D\xeeb\xac\x8f\xdb\xcc\xef\xc4l G\x9bR\xafp\x17s<=\x12\xab\x04ڳif\\A\x9ba0\xde%\xdei\x04\xc3\r\xb3\x81w\x88\xec\xc0f\x15A;AÝ\xc0r\xa1\u5fe\xd3\xf6)8\x8e\xa3\xcbc\xee\xdd\$\x04\x0f\xc1\xb4\x1f\xcc\xecK\xe0\x99" # hashes of the unique github.com fingerprint - github_key_hashes = key_hashes( - "bf6b6825d2977c511a475bbefb88aad54a92ac73", - "9d385b83a9175292561a5ec4d4818e0aca51a264f17420112ef88ac3a139498f" - ) + github_key = "\0\0\0\assh-rsa\0\0\0\x01#\0\0\x01\x01\0\xab`;\x85\x11\xa6vy\xbd\xb5@\xdb;\xd2\x03K\0J\xe96\xd0k\xe3\xd7`\xf0\x8f˪\xdbN\xb4\xedóǑ\xc7\n\xae\x9at\xc9Xi\xe4wD!«\xea\x92\xe5T0_8\xb5\xfdAK2\b\xe5t\xc37\xe3 \x93e\x18F,vRɋ1\xe1n}\xa6R;\xd2\0t*dD\xd8?\xcd^\x172\xd06sǷ\x81\x15UH{U\xf0\xc4IO8)\xec\xe6\x0f\x94%Z\x95˚\xf57\xd7\xfc\x8c\x7f\xe4\x9e\xf3\x18GN\xf2\x92\t\x92\x05\"e\xb0\xa0n\xa6mJ\x16\x7f\xd9\xf3\xa4\x8a\x1aJ0~\xc1\xea\xaaQI\xa9i\xa6\xac]V\xa5\xefb~Q}\x81\xfbdO[t\\OG\x8e\xcd\b*\x94\x92\xf7D\xaa\xd3&\xf7l\x8cM\xc9\x10\vƫyF\x1d&W\xcbo\x06\xde\xc9.kd\xa6V/\xf0\xe3 \x84\xea\x06\xce\x0e\xa9\xd3ZX;\xfb\0\xbaӌ\x9d\x19p github_hashes, - "gitlab.com" => gitlab_hashes, - ], hash in hashes + for (host, key) in [ + "github.com" => github_key, + "gitlab.com" => gitlab_key, + ] for files in [[no_file], [empty_file]] - check = LibGit2.ssh_knownhost_check(files, host, hash) - @test check == LibGit2.Consts.SSH_HOST_UNKNOWN + check = LibGit2.ssh_knownhost_check(files, host, key) + @test check == CHECK_NOTFOUND end for files in [ [known_hosts], - [empty_file; known_hosts], - [known_hosts; empty_file], - [known_hosts; wrong_hosts], + [empty_file, known_hosts], + [known_hosts, empty_file], + [known_hosts, wrong_hosts], ] - check = LibGit2.ssh_knownhost_check(files, host, hash) - @test check == LibGit2.Consts.SSH_HOST_KNOWN + check = LibGit2.ssh_knownhost_check(files, host, key) + @test check == CHECK_MATCH end for files in [ [wrong_hosts], - [empty_file; wrong_hosts], - [wrong_hosts; empty_file], - [wrong_hosts; known_hosts], + [empty_file, wrong_hosts], + [wrong_hosts, empty_file], + [wrong_hosts, known_hosts], ] - check = LibGit2.ssh_knownhost_check(files, host, hash) - @test check == LibGit2.Consts.SSH_HOST_MISMATCH + check = LibGit2.ssh_knownhost_check(files, host, key) + @test check == CHECK_MISMATCH end end end From 380abc808ad8fbd72a7a57f6ac0f811b7903046d Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Thu, 21 Jan 2021 17:10:25 +0000 Subject: [PATCH 154/239] define keys on RegexMatch (#37299) --- NEWS.md | 1 + base/regex.jl | 17 +++++++++++------ test/regex.jl | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index 61f3eb4fb8867..d994c3d2f17fc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -46,6 +46,7 @@ Standard library changes * `escape_string` can now receive a collection of characters in the keyword `keep` that are to be kept as they are. ([#38597]). * `getindex` can now be used on `NamedTuple`s with multiple values ([#38878]) +* `keys(::RegexMatch)` is now defined to return the capture's keys, by name if named, or by index if not ([#37299]). #### Package Manager diff --git a/base/regex.jl b/base/regex.jl index 3b954c53fd7ab..ff07b61bdec0d 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -149,16 +149,21 @@ struct RegexMatch <: AbstractMatch regex::Regex end +function keys(m::RegexMatch) + idx_to_capture_name = PCRE.capture_names(m.regex.regex) + return map(eachindex(m.captures)) do i + # If the capture group is named, return it's name, else return it's index + get(idx_to_capture_name, i, i) + end +end + function show(io::IO, m::RegexMatch) print(io, "RegexMatch(") show(io, m.match) - idx_to_capture_name = PCRE.capture_names(m.regex.regex) - if !isempty(m.captures) + capture_keys = keys(m) + if !isempty(capture_keys) print(io, ", ") - for i = 1:length(m.captures) - # If the capture group is named, show the name. - # Otherwise show its index. - capture_name = get(idx_to_capture_name, i, i) + for (i, capture_name) in enumerate(capture_keys) print(io, capture_name, "=") show(io, m.captures[i]) if i < length(m.captures) diff --git a/test/regex.jl b/test/regex.jl index 77a7545eaecef..f5080bd3e6600 100644 --- a/test/regex.jl +++ b/test/regex.jl @@ -98,6 +98,7 @@ @test !haskey(m, "foo") @test (m[:a], m[2], m["b"]) == ("x", "y", "z") @test sprint(show, m) == "RegexMatch(\"xyz\", a=\"x\", 2=\"y\", b=\"z\")" + @test keys(m) == ["a", 2, "b"] end # Backcapture reference in substitution string From a40335766e984e1509cc414b6a5f14137d13b05c Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Thu, 21 Jan 2021 20:37:29 +0100 Subject: [PATCH 155/239] Correct typo in module docs (#39337) --- doc/src/manual/modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/manual/modules.md b/doc/src/manual/modules.md index 664210e72cabf..3e93ed7d7be02 100644 --- a/doc/src/manual/modules.md +++ b/doc/src/manual/modules.md @@ -415,7 +415,7 @@ into account the set of dependencies already loaded into the current process and modules, even if their files change or disappear, in order to avoid creating incompatibilities between the running system and the precompile cache. -If you know that a module is *not* safe to precompile your module +If you know that a module is *not* safe to precompile (for example, for one of the reasons described below), you should put `__precompile__(false)` in the module file (typically placed at the top). This will cause `Base.compilecache` to throw an error, and will cause `using` / `import` to load it From c242166ab0c093907434c145e1f3522f7af9469e Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Thu, 21 Jan 2021 20:37:55 +0100 Subject: [PATCH 156/239] Docs: typo in Base.open (#39339) --- base/io.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/io.jl b/base/io.jl index e86130a25f7a6..98d78e115d44f 100644 --- a/base/io.jl +++ b/base/io.jl @@ -307,7 +307,7 @@ function open_flags(; end """ - open(f::Function, args...; kwargs....) + open(f::Function, args...; kwargs...) Apply the function `f` to the result of `open(args...; kwargs...)` and close the resulting file descriptor upon completion. From 1e775d705c53a4316530338da79eb4682d011274 Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Fri, 22 Jan 2021 05:38:24 +0100 Subject: [PATCH 157/239] add a test that error can be inferred to bottom (#35806) --- test/compiler/inference.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 5a2d806b237ae..062d8c81cf776 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3008,3 +3008,6 @@ f38888() = S38888(Base.inferencebarrier(3)) @test f38888() isa S38888 g38888() = S38888(Base.inferencebarrier(3), nothing) @test g38888() isa S38888 + +f_inf_error_bottom(x::Vector) = isempty(x) ? error(x[1]) : x +@test Core.Compiler.return_type(f_inf_error_bottom, Tuple{Vector{Any}}) == Vector{Any} From 770d0d5757c3192a82cd0f37579becd013a867af Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Fri, 22 Jan 2021 04:41:24 +0000 Subject: [PATCH 158/239] Make RegexMatch iterable (#34355) add iterate, length, and eltype to RegexMatch Co-authored-by: Curtis Vogt --- NEWS.md | 1 + base/regex.jl | 6 +++++- test/regex.jl | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d994c3d2f17fc..73b180bba1d76 100644 --- a/NEWS.md +++ b/NEWS.md @@ -47,6 +47,7 @@ Standard library changes `keep` that are to be kept as they are. ([#38597]). * `getindex` can now be used on `NamedTuple`s with multiple values ([#38878]) * `keys(::RegexMatch)` is now defined to return the capture's keys, by name if named, or by index if not ([#37299]). +* `RegexMatch` now iterate to give their captures. ([#34355]). #### Package Manager diff --git a/base/regex.jl b/base/regex.jl index ff07b61bdec0d..9d5b9e169b66d 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -166,7 +166,7 @@ function show(io::IO, m::RegexMatch) for (i, capture_name) in enumerate(capture_keys) print(io, capture_name, "=") show(io, m.captures[i]) - if i < length(m.captures) + if i < length(m) print(io, ", ") end end @@ -190,6 +190,10 @@ function haskey(m::RegexMatch, name::Symbol) end haskey(m::RegexMatch, name::AbstractString) = haskey(m, Symbol(name)) +iterate(m::RegexMatch, args...) = iterate(m.captures, args...) +length(m::RegexMatch) = length(m.captures) +eltype(m::RegexMatch) = eltype(m.captures) + function occursin(r::Regex, s::AbstractString; offset::Integer=0) compile(r) return PCRE.exec_r(r.regex, String(s), offset, r.match_options) diff --git a/test/regex.jl b/test/regex.jl index f5080bd3e6600..f18f03fd08114 100644 --- a/test/regex.jl +++ b/test/regex.jl @@ -167,6 +167,24 @@ @test r"this|that"^2 == r"(?:this|that){2}" end + @testset "iterate" begin + m = match(r"(.) test (.+)", "a test 123") + @test first(m) == "a" + @test collect(m) == ["a", "123"] + for (i, capture) in enumerate(m) + i == 1 && @test capture == "a" + i == 2 && @test capture == "123" + end + end + + @testset "Destructuring dispatch" begin + handle(::Nothing) = "not found" + handle((capture,)::RegexMatch) = "found $capture" + + @test handle(match(r"a (\d)", "xyz")) == "not found" + @test handle(match(r"a (\d)", "a 1")) == "found 1" + end + # Test that PCRE throws the correct kind of error # TODO: Uncomment this once the corresponding change has propagated to CI #@test_throws ErrorException Base.PCRE.info(C_NULL, Base.PCRE.INFO_NAMECOUNT, UInt32) From 2684eac97f8cfe443f306db180f5e209ab8c1edc Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 22 Jan 2021 18:40:59 -0500 Subject: [PATCH 159/239] show: in v1.7, Vararg is no longer a Type [NFCI] --- base/show.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/show.jl b/base/show.jl index 650a697316b9d..25085b044af16 100644 --- a/base/show.jl +++ b/base/show.jl @@ -554,7 +554,7 @@ function make_typealias(@nospecialize(x::Type)) for name in names(mod) if isdefined(mod, name) && !isdeprecated(mod, name) && isconst(mod, name) alias = getfield(mod, name) - if alias isa Type && !has_free_typevars(alias) && !isvarargtype(alias) && !print_without_params(alias) && x <: alias + if alias isa Type && !has_free_typevars(alias) && !print_without_params(alias) && x <: alias if alias isa UnionAll (ti, env) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), x, alias)::SimpleVector # ti === Union{} && continue # impossible, since we already checked that x <: alias @@ -661,7 +661,7 @@ function make_typealiases(@nospecialize(x::Type)) for name in names(mod) if isdefined(mod, name) && !isdeprecated(mod, name) && isconst(mod, name) alias = getfield(mod, name) - if alias isa Type && !has_free_typevars(alias) && !isvarargtype(alias) && !print_without_params(alias) && !(alias <: Tuple) + if alias isa Type && !has_free_typevars(alias) && !print_without_params(alias) && !(alias <: Tuple) (ti, env) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), x, alias)::SimpleVector ti === Union{} && continue mod in modulesof!(Set{Module}(), alias) || continue # make sure this alias wasn't from an unrelated part of the Union From 48ad01d89508f878ce27d76800c77dba6ac501e4 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 22 Jan 2021 16:10:12 -0500 Subject: [PATCH 160/239] show: fix duplicate typealias printing bug If you had 2 aliases that both matched, we might print ```S{T} where T (alias for S{T} where T)``` which is clearly unnecessary. --- base/show.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/show.jl b/base/show.jl index 25085b044af16..a1f57dc13f8ce 100644 --- a/base/show.jl +++ b/base/show.jl @@ -751,7 +751,7 @@ function show(io::IO, ::MIME"text/plain", @nospecialize(x::Type)) show(io, x) if !print_without_params(x) && get(io, :compact, true) properx = makeproper(io, x) - if make_typealias(properx) !== nothing || x <: make_typealiases(properx)[2] + if make_typealias(properx) !== nothing || (unwrap_unionall(x) isa Union && x <: make_typealiases(properx)[2]) print(io, " (alias for ") show(IOContext(io, :compact => false), x) print(io, ")") From b6df6c260f01ae23b5bdbff49b2693c6d6433510 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 22 Jan 2021 15:39:19 -0500 Subject: [PATCH 161/239] show: fix some bugs in typealias printing --- base/show.jl | 85 ++++++++++++++++++++++++++++++++++++++-------------- test/show.jl | 6 ++++ 2 files changed, 69 insertions(+), 22 deletions(-) diff --git a/base/show.jl b/base/show.jl index a1f57dc13f8ce..5d11b42dca2b3 100644 --- a/base/show.jl +++ b/base/show.jl @@ -532,8 +532,9 @@ function makeproper(io::IO, x::Type) push!(y, typ) end end - normal || (x = Union{y...}) - properx = rewrap_unionall(x, properx) + if !normal + properx = rewrap_unionall(Union{y...}, properx) + end end has_free_typevars(properx) && return Any return properx @@ -580,8 +581,8 @@ function make_typealias(@nospecialize(x::Type)) applied = rewrap_unionall(applied, p) end has_free_typevars(applied) && continue - applied == x || continue # it couldn't figure out the parameter matching - elseif alias <: x + applied === x || continue # it couldn't figure out the parameter matching + elseif alias === x env = Core.svec() else continue # not a complete match @@ -596,7 +597,7 @@ function make_typealias(@nospecialize(x::Type)) end end -function show_typealias(io::IO, name::GlobalRef, x::Type, env::SimpleVector) +function show_typealias(io::IO, name::GlobalRef, x::Type, env::SimpleVector, wheres::Vector) if !(get(io, :compact, false)::Bool) # Print module prefix unless alias is visible from module passed to # IOContext. If :module is not set, default to Main. nothing can be used @@ -612,34 +613,70 @@ function show_typealias(io::IO, name::GlobalRef, x::Type, env::SimpleVector) n == 0 && return print(io, "{") - let io = IOContext(io) - for i = n:-1:1 - p = env[i] - if p isa TypeVar - io = IOContext(io, :unionall_env => p) + param_io = IOContext(io) + for i = 1:length(wheres) + p = wheres[i]::TypeVar + param_io = IOContext(param_io, :unionall_env => p) + end + for i = 1:n + p = env[i] + show(param_io, p) + i < n && print(io, ", ") + end + print(io, "}") +end + +function make_wheres(io::IO, env::SimpleVector, @nospecialize(x::Type)) + seen = IdSet() + wheres = [] + # record things printed by the context + if io isa IOContext + for (key, val) in io.dict + if key === :unionall_env && val isa TypeVar && has_typevar(x, val) + push!(seen, val) end end - for i = 1:n - p = env[i] - show(io, p) - i < n && print(io, ", ") + end + # record things in x to print outermost + while x isa UnionAll + if !(x.var in seen) + push!(seen, x.var) + push!(wheres, x.var) end + x = x.body end - print(io, "}") - for i = n:-1:1 + # record remaining things in env to print innermost + for i = length(env):-1:1 p = env[i] - if p isa TypeVar && !io_has_tvar_name(io, p.name, x) - print(io, " where ") - show(io, p) + if p isa TypeVar && !(p in seen) + push!(seen, p) + pushfirst!(wheres, p) end end + return wheres +end + +function show_wheres(io::IO, env::Vector) + isempty(env) && return + io = IOContext(io) + n = length(env) + for i = 1:n + p = env[i]::TypeVar + print(io, n == 1 ? " where " : i == 1 ? " where {" : ", ") + show(io, p) + io = IOContext(io, :unionall_env => p) + end + n > 1 && print(io, "}") + nothing end function show_typealias(io::IO, x::Type) properx = makeproper(io, x) alias = make_typealias(properx) alias === nothing && return false - show_typealias(io, alias[1], x, alias[2]) + wheres = make_wheres(io, alias[2], x) + show_typealias(io, alias[1], x, alias[2], wheres) + show_wheres(io, wheres) return true end @@ -735,13 +772,17 @@ function show_unionaliases(io::IO, x::Union) end if first && length(aliases) == 1 alias = aliases[1] - show_typealias(io, alias[1], x, alias[2]) + wheres = make_wheres(io, alias[2], x) + show_typealias(io, alias[1], x, alias[2], wheres) + show_wheres(io, wheres) else for alias in aliases print(io, first ? "Union{" : ", ") first = false env = alias[2] - show_typealias(io, alias[1], x, alias[2]) + wheres = make_wheres(io, alias[2], x) + show_typealias(io, alias[1], x, alias[2], wheres) + show_wheres(io, wheres) end print(io, "}") end diff --git a/test/show.jl b/test/show.jl index 3b918c064fcb0..5884cee48dc5c 100644 --- a/test/show.jl +++ b/test/show.jl @@ -2070,15 +2070,21 @@ end end module M37012 +export AValue, B2 struct AnInteger{S<:Integer} end struct AStruct{N} end const AValue{S} = Union{AStruct{S}, AnInteger{S}} +struct BStruct{T,S} end +const B2{S,T} = BStruct{T,S} end @test Base.make_typealias(M37012.AStruct{1}) === nothing @test isempty(Base.make_typealiases(M37012.AStruct{1})[1]) @test string(M37012.AStruct{1}) == "$(curmod_prefix)M37012.AStruct{1}" @test string(Union{Nothing, Number, Vector}) == "Union{Nothing, Number, Vector{T} where T}" @test string(Union{Nothing, AbstractVecOrMat}) == "Union{Nothing, AbstractVecOrMat{T} where T}" +@test string(M37012.BStruct{T, T} where T) == "$(curmod_prefix)M37012.B2{T, T} where T" +@test string(M37012.BStruct{T, S} where {T<:Unsigned, S<:Signed}) == "$(curmod_prefix)M37012.B2{S, T} where {T<:Unsigned, S<:Signed}" +@test string(M37012.BStruct{T, S} where {T<:Signed, S<:T}) == "$(curmod_prefix)M37012.B2{S, T} where {T<:Signed, S<:T}" @test sprint(show, :(./)) == ":((./))" @test sprint(show, :((.|).(.&, b))) == ":((.|).((.&), b))" From ee816ef4f27c7e1eb531083fcb57933d1e5af1e5 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 22 Jan 2021 16:07:39 -0500 Subject: [PATCH 162/239] show: consolidate wheres with {} in printing Always a bit more compact in this form, and somewhat easier to implement too (thus keeping this consistent with the corrected typealias printing). --- base/show.jl | 36 ++++++++++++++++++++++-------------- test/show.jl | 6 +++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/base/show.jl b/base/show.jl index 5d11b42dca2b3..93026fa7e2fe7 100644 --- a/base/show.jl +++ b/base/show.jl @@ -628,7 +628,7 @@ end function make_wheres(io::IO, env::SimpleVector, @nospecialize(x::Type)) seen = IdSet() - wheres = [] + wheres = TypeVar[] # record things printed by the context if io isa IOContext for (key, val) in io.dict @@ -827,22 +827,30 @@ function show(io::IO, @nospecialize(x::Type)) end x = x::UnionAll - if x.var.name === :_ || io_has_tvar_name(io, x.var.name, x) - counter = 1 - while true - newname = Symbol(x.var.name, counter) - if !io_has_tvar_name(io, newname, x) - newtv = TypeVar(newname, x.var.lb, x.var.ub) - x = UnionAll(newtv, x{newtv}) - break + wheres = TypeVar[] + let io = IOContext(io) + while x isa UnionAll + var = x.var + if var.name === :_ || io_has_tvar_name(io, var.name, x) + counter = 1 + while true + newname = Symbol(var.name, counter) + if !io_has_tvar_name(io, newname, x) + var = TypeVar(newname, var.lb, var.ub) + x = x{var} + break + end + counter += 1 + end + else + x = x.body end - counter += 1 + push!(wheres, var) + io = IOContext(io, :unionall_env => var) end + show(io, x) end - - show(IOContext(io, :unionall_env => x.var), x.body) - print(io, " where ") - show(io, x.var) + show_wheres(io, wheres) end # Check whether 'sym' (defined in module 'parent') is visible from module 'from' diff --git a/test/show.jl b/test/show.jl index 5884cee48dc5c..65fd558cf9280 100644 --- a/test/show.jl +++ b/test/show.jl @@ -634,7 +634,7 @@ end # `where` syntax @test_repr "A where T<:B" @test_repr "A where T<:(Array{T} where T<:Real)" -@test_repr "Array{T} where T<:Array{S} where S<:Real" +@test_repr "Array{T} where {S<:Real, T<:Array{S}}" @test_repr "x::Array{T} where T" @test_repr "(a::b) where T" @test_repr "a::b where T" @@ -1568,12 +1568,12 @@ end end let x = TypeVar(:_), y = TypeVar(:_) - @test repr(UnionAll(x, UnionAll(y, Pair{x,y}))) == "Pair{_1, _2} where _2 where _1" + @test repr(UnionAll(x, UnionAll(y, Pair{x,y}))) == "Pair{_1, _2} where {_1, _2}" @test repr(UnionAll(x, UnionAll(y, Pair{UnionAll(x,Ref{x}),y}))) == "Pair{Ref{_1} where _1, _1} where _1" x = TypeVar(:a) y = TypeVar(:a) z = TypeVar(:a) - @test repr(UnionAll(z, UnionAll(x, UnionAll(y, Tuple{x,y,z})))) == "Tuple{a1, a2, a} where a2 where a1 where a" + @test repr(UnionAll(z, UnionAll(x, UnionAll(y, Tuple{x,y,z})))) == "Tuple{a1, a2, a} where {a, a1, a2}" end @testset "showarg" begin From d9e26327949d0ccc938b0e88c5c8a6adb36ddec5 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Sat, 23 Jan 2021 10:55:00 +0100 Subject: [PATCH 163/239] implement property destructuring (#39285) * implement property destructuring This currently only allows the form `(; a, b) = x` and lowers this to calls to `getproperty`. We could think about whether we want to allow specifying default values for properties as well, or even some kind of property renaming in the lhs. We could even allow slurping unused properties, but all of that sounds more difficult to work out in detail and potentially controversial, so I left this as an error for now. fixes #28579 * add NEWS entry --- NEWS.md | 3 + src/julia-syntax.scm | 135 ++++++++++++++++++++++++------------------- test/syntax.jl | 29 ++++++++++ 3 files changed, 108 insertions(+), 59 deletions(-) diff --git a/NEWS.md b/NEWS.md index 73b180bba1d76..60e9a07271559 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,9 @@ Julia v1.7 Release Notes New language features --------------------- +* `(; a, b) = x` can now be used to destructure properties `a` and `b` of `x`. This syntax is equivalent to `a = getproperty(x, :a)` + and similarly for `b`. ([#39285]) + Language changes ---------------- diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 0cf133f09fcfb..ac798109ed1d5 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1950,6 +1950,66 @@ ,@(map expand-forms (cddr e)))) (cons (car e) (map expand-forms (cdr e)))))) +(define (expand-tuple-destruct lhss x) + (define (sides-match? l r) + ;; l and r either have equal lengths, or r has a trailing ... + (cond ((null? l) (null? r)) + ((vararg? (car l)) #t) + ((null? r) #f) + ((vararg? (car r)) (null? (cdr r))) + (else (sides-match? (cdr l) (cdr r))))) + (if (and (pair? x) (pair? lhss) (eq? (car x) 'tuple) (not (any assignment? (cdr x))) + (not (has-parameters? (cdr x))) + (sides-match? lhss (cdr x))) + ;; (a, b, ...) = (x, y, ...) + (expand-forms + (tuple-to-assignments lhss x)) + ;; (a, b, ...) = other + (begin + ;; like memq, but if last element of lhss is (... sym), + ;; check against sym instead + (define (in-lhs? x lhss) + (if (null? lhss) + #f + (let ((l (car lhss))) + (cond ((and (pair? l) (eq? (car l) '|...|)) + (if (null? (cdr lhss)) + (eq? (cadr l) x) + (error (string "invalid \"...\" on non-final assignment location \"" + (cadr l) "\"")))) + ((eq? l x) #t) + (else (in-lhs? x (cdr lhss))))))) + ;; in-lhs? also checks for invalid syntax, so always call it first + (let* ((xx (if (or (and (not (in-lhs? x lhss)) (symbol? x)) + (ssavalue? x)) + x (make-ssavalue))) + (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x))))) + (n (length lhss)) + ;; skip last assignment if it is an all-underscore vararg + (n (if (> n 0) + (let ((l (last lhss))) + (if (and (vararg? l) (underscore-symbol? (cadr l))) + (- n 1) + n)) + n)) + (st (gensy))) + `(block + ,@(if (> n 0) `((local ,st)) '()) + ,@ini + ,@(map (lambda (i lhs) + (expand-forms + (if (vararg? lhs) + `(= ,(cadr lhs) (call (top rest) ,xx ,@(if (eq? i 0) '() `(,st)))) + (lower-tuple-assignment + (if (= i (- n 1)) + (list lhs) + (list lhs st)) + `(call (top indexed_iterate) + ,xx ,(+ i 1) ,@(if (eq? i 0) '() `(,st))))))) + (iota n) + lhss) + (unnecessary ,xx)))))) + ;; move an assignment into the last statement of a block to keep more statements at top level (define (sink-assignment lhs rhs) (if (and (pair? rhs) (eq? (car rhs) 'block)) @@ -2102,67 +2162,24 @@ (call (top setproperty!) ,aa ,bb ,rr) (unnecessary ,rr))))) ((tuple) - ;; multiple assignment (let ((lhss (cdr lhs)) (x (caddr e))) - (define (sides-match? l r) - ;; l and r either have equal lengths, or r has a trailing ... - (cond ((null? l) (null? r)) - ((vararg? (car l)) #t) - ((null? r) #f) - ((vararg? (car r)) (null? (cdr r))) - (else (sides-match? (cdr l) (cdr r))))) - (if (and (pair? x) (pair? lhss) (eq? (car x) 'tuple) (not (any assignment? (cdr x))) - (not (has-parameters? (cdr x))) - (sides-match? lhss (cdr x))) - ;; (a, b, ...) = (x, y, ...) - (expand-forms - (tuple-to-assignments lhss x)) - ;; (a, b, ...) = other - (begin - ;; like memq, but if last element of lhss is (... sym), - ;; check against sym instead - (define (in-lhs? x lhss) - (if (null? lhss) - #f - (let ((l (car lhss))) - (cond ((and (pair? l) (eq? (car l) '|...|)) - (if (null? (cdr lhss)) - (eq? (cadr l) x) - (error (string "invalid \"...\" on non-final assignment location \"" - (cadr l) "\"")))) - ((eq? l x) #t) - (else (in-lhs? x (cdr lhss))))))) - ;; in-lhs? also checks for invalid syntax, so always call it first - (let* ((xx (if (or (and (not (in-lhs? x lhss)) (symbol? x)) - (ssavalue? x)) - x (make-ssavalue))) - (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x))))) - (n (length lhss)) - ;; skip last assignment if it is an all-underscore vararg - (n (if (> n 0) - (let ((l (last lhss))) - (if (and (vararg? l) (underscore-symbol? (cadr l))) - (- n 1) - n)) - n)) - (st (gensy))) - `(block - ,@(if (> n 0) `((local ,st)) '()) - ,@ini - ,@(map (lambda (i lhs) - (expand-forms - (if (vararg? lhs) - `(= ,(cadr lhs) (call (top rest) ,xx ,@(if (eq? i 0) '() `(,st)))) - (lower-tuple-assignment - (if (= i (- n 1)) - (list lhs) - (list lhs st)) - `(call (top indexed_iterate) - ,xx ,(+ i 1) ,@(if (eq? i 0) '() `(,st))))))) - (iota n) - lhss) - (unnecessary ,xx))))))) + (if (has-parameters? lhss) + ;; property destructuring + (if (length= lhss 1) + (let* ((xx (if (symbol-like? x) x (make-ssavalue))) + (ini (if (eq? x xx) '() (list (sink-assignment xx (expand-forms x)))))) + `(block + ,@ini + ,@(map (lambda (field) + (if (not (symbol? field)) + (error (string "invalid assignment location \"" (deparse lhs) "\""))) + (expand-forms `(= ,field (call (top getproperty) ,xx (quote ,field))))) + (cdar lhss)) + (unnecessary ,xx))) + (error (string "invalid assignment location \"" (deparse lhs) "\""))) + ;; multiple assignment + (expand-tuple-destruct lhss x)))) ((typed_hcat) (error "invalid spacing in left side of indexed assignment")) ((typed_vcat) diff --git a/test/syntax.jl b/test/syntax.jl index 085794b72d859..ac4ccef86660b 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -2649,3 +2649,32 @@ end # issue #38501 @test :"a $b $("str") c" == Expr(:string, "a ", :b, " ", Expr(:string, "str"), " c") + +@testset "property destructuring" begin + res = begin (; num, den) = 1 // 2 end + @test res == 1 // 2 + @test num == 1 + @test den == 2 + + res = begin (; b, a) = (a=1, b=2, c=3) end + @test res == (a=1, b=2, c=3) + @test b == 2 + @test a == 1 + + # could make this an error instead, but I think this is reasonable + res = begin (; a, b, a) = (a=5, b=6) end + @test res == (a=5, b=6) + @test a == 5 + @test b == 6 + + @test_throws ErrorException (; a, b) = (x=1,) + + @test Meta.isexpr(Meta.@lower(begin (a, b; c) = x end), :error) + @test Meta.isexpr(Meta.@lower(begin (a, b; c) = x, y end), :error) + @test Meta.isexpr(Meta.@lower(begin (; c, a.b) = x end), :error) + + f((; a, b)) = a, b + @test f((b=3, a=4)) == (4, 3) + @test f((b=3, c=2, a=4)) == (4, 3) + @test_throws ErrorException f((;)) +end From dbaca8ba16d406004c53cb211b9eaf8028f6b6be Mon Sep 17 00:00:00 2001 From: Stefan Karpinski Date: Sun, 24 Jan 2021 21:28:36 -0500 Subject: [PATCH 164/239] libgit2: fix for broken SSH host callback (#39364) --- deps/Versions.make | 2 +- .../LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/md5 | 1 + .../LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/sha512 | 1 + deps/patches/libgit2-hostkey.patch | 4 ++-- stdlib/LibGit2/src/callbacks.jl | 6 +++--- stdlib/LibGit2/test/libgit2.jl | 6 +++--- 6 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/md5 create mode 100644 deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/sha512 diff --git a/deps/Versions.make b/deps/Versions.make index 22a6c4d744135..b0b2e72f63f2e 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -33,7 +33,7 @@ CURL_JLL_NAME := LibCURL LAPACK_VER := 3.9.0 # LibGit2 -LIBGIT2_JLL_VER := 1.2.1+0 +LIBGIT2_JLL_VER := 1.2.2+0 LIBGIT2_JLL_NAME := LibGit2 # LibSSH2 diff --git a/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/md5 b/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/md5 new file mode 100644 index 0000000000000..fc98d12c46b63 --- /dev/null +++ b/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/md5 @@ -0,0 +1 @@ +693080c66702c9ff106b0935f01d1f96 diff --git a/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/sha512 b/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/sha512 new file mode 100644 index 0000000000000..bf56d1c06d292 --- /dev/null +++ b/deps/checksums/LibGit2.v1.2.2+0.x86_64-apple-darwin.tar.gz/sha512 @@ -0,0 +1 @@ +f21d5846b443188a0c604255dce77603ea861db8d4c6fc55cebd5db6da07e94ae40f0a165221c95e13db9df8777fddb05f55c865f554f45e56cd442332a95336 diff --git a/deps/patches/libgit2-hostkey.patch b/deps/patches/libgit2-hostkey.patch index 16c0f3b13f621..f07d4d1e0a116 100644 --- a/deps/patches/libgit2-hostkey.patch +++ b/deps/patches/libgit2-hostkey.patch @@ -18,7 +18,7 @@ index e8cd2d180..54293cd31 100644 /** diff --git a/src/transports/ssh.c b/src/transports/ssh.c -index f4ed05bb1..049697796 100644 +index f4ed05bb1..ec6366a5f 100644 --- a/src/transports/ssh.c +++ b/src/transports/ssh.c @@ -523,6 +523,7 @@ static int _git_ssh_setup_conn( @@ -47,7 +47,7 @@ index f4ed05bb1..049697796 100644 cert_ptr = &cert; - error = t->owner->certificate_check_cb((git_cert *) cert_ptr, 0, urldata.host, t->owner->message_cb_payload); -+ if (git_net_url_is_default_port(&urldata)) { ++ if (atoi(urldata.port) == SSH_DEFAULT_PORT) { + host_and_port = urldata.host; + } else { + size_t n = strlen(urldata.host) + strlen(urldata.port) + 2; diff --git a/stdlib/LibGit2/src/callbacks.jl b/stdlib/LibGit2/src/callbacks.jl index 8eddb8c864644..18de45a994420 100644 --- a/stdlib/LibGit2/src/callbacks.jl +++ b/stdlib/LibGit2/src/callbacks.jl @@ -440,7 +440,7 @@ end function ssh_knownhost_check( files :: AbstractVector{<:AbstractString}, host :: AbstractString, - key :: String, + key :: Vector{UInt8}, ) if (m = match(r"^(.+):(\d+)$", host)) !== nothing host = m.captures[1] @@ -448,6 +448,7 @@ function ssh_knownhost_check( else port = 22 # default SSH port end + len = length(key) mask = Consts.LIBSSH2_KNOWNHOST_TYPE_PLAIN | Consts.LIBSSH2_KNOWNHOST_KEYENC_RAW session = @ccall "libssh2".libssh2_session_init_ex( @@ -471,13 +472,12 @@ function ssh_knownhost_check( @ccall "libssh2".libssh2_knownhost_free(hosts::Ptr{Cvoid})::Cvoid continue end - size = ncodeunits(key) check = @ccall "libssh2".libssh2_knownhost_checkp( hosts :: Ptr{Cvoid}, host :: Cstring, port :: Cint, key :: Ptr{UInt8}, - size :: Csize_t, + len :: Csize_t, mask :: Cint, C_NULL :: Ptr{Ptr{KnownHost}}, ) :: Cint diff --git a/stdlib/LibGit2/test/libgit2.jl b/stdlib/LibGit2/test/libgit2.jl index 2479deeb31b6c..93e530aee5d8e 100644 --- a/stdlib/LibGit2/test/libgit2.jl +++ b/stdlib/LibGit2/test/libgit2.jl @@ -2412,11 +2412,11 @@ mktempdir() do dir CHECK_FAILURE = LibGit2.Consts.LIBSSH2_KNOWNHOST_CHECK_FAILURE # randomly generated hashes matching no hosts - random_key = "\0\0\0\assh-rsa\0\0\0\x01#\0\0\0\x81\0¿\x95\xbe9\xfc9g\n:\xcf&\x06YA\xb5`\x97\xc13A\xbf;T+C\xc9Ut J>\xc5ҍ\xc4_S\x8a \xc1S\xeb\x15FH\xd2a\x04.D\xeeb\xac\x8f\xdb\xcc\xef\xc4l G\x9bR\xafp\x17s<=\x12\xab\x04ڳif\\A\x9ba0\xde%\xdei\x04\xc3\r\xb3\x81w\x88\xec\xc0f\x15A;AÝ\xc0r\xa1\u5fe\xd3\xf6)8\x8e\xa3\xcbc\xee\xdd\$\x04\x0f\xc1\xb4\x1f\xcc\xecK\xe0\x99" + random_key = "\0\0\0\assh-rsa\0\0\0\x01#\0\0\0\x81\0¿\x95\xbe9\xfc9g\n:\xcf&\x06YA\xb5`\x97\xc13A\xbf;T+C\xc9Ut J>\xc5ҍ\xc4_S\x8a \xc1S\xeb\x15FH\xd2a\x04.D\xeeb\xac\x8f\xdb\xcc\xef\xc4l G\x9bR\xafp\x17s<=\x12\xab\x04ڳif\\A\x9ba0\xde%\xdei\x04\xc3\r\xb3\x81w\x88\xec\xc0f\x15A;AÝ\xc0r\xa1\u5fe\xd3\xf6)8\x8e\xa3\xcbc\xee\xdd\$\x04\x0f\xc1\xb4\x1f\xcc\xecK\xe0\x99" |> codeunits |> collect # hashes of the unique github.com fingerprint - github_key = "\0\0\0\assh-rsa\0\0\0\x01#\0\0\x01\x01\0\xab`;\x85\x11\xa6vy\xbd\xb5@\xdb;\xd2\x03K\0J\xe96\xd0k\xe3\xd7`\xf0\x8f˪\xdbN\xb4\xedóǑ\xc7\n\xae\x9at\xc9Xi\xe4wD!«\xea\x92\xe5T0_8\xb5\xfdAK2\b\xe5t\xc37\xe3 \x93e\x18F,vRɋ1\xe1n}\xa6R;\xd2\0t*dD\xd8?\xcd^\x172\xd06sǷ\x81\x15UH{U\xf0\xc4IO8)\xec\xe6\x0f\x94%Z\x95˚\xf57\xd7\xfc\x8c\x7f\xe4\x9e\xf3\x18GN\xf2\x92\t\x92\x05\"e\xb0\xa0n\xa6mJ\x16\x7f\xd9\xf3\xa4\x8a\x1aJ0~\xc1\xea\xaaQI\xa9i\xa6\xac]V\xa5\xefb~Q}\x81\xfbdO[t\\OG\x8e\xcd\b*\x94\x92\xf7D\xaa\xd3&\xf7l\x8cM\xc9\x10\vƫyF\x1d&W\xcbo\x06\xde\xc9.kd\xa6V/\xf0\xe3 \x84\xea\x06\xce\x0e\xa9\xd3ZX;\xfb\0\xbaӌ\x9d\x19p codeunits |> collect # hashes of the middle github.com fingerprint - gitlab_key = "\0\0\0\vssh-ed25519\0\0\0 \a\xee\br\x95N:\xae\xc6\xfbz\bέtn\x12.\x9dA\xb6\x7f\xe79\xe1\xc7\x13\x95\x0e\xcd\x17_" + gitlab_key = "\0\0\0\vssh-ed25519\0\0\0 \a\xee\br\x95N:\xae\xc6\xfbz\bέtn\x12.\x9dA\xb6\x7f\xe79\xe1\xc7\x13\x95\x0e\xcd\x17_" |> codeunits |> collect # various known hosts files no_file = tempname() From df2a1c5fb307c0d2d4d9493c1831a38cf8a24843 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 25 Jan 2021 12:03:58 +0100 Subject: [PATCH 165/239] Don't touch gvars when compiling for an external back-end. --- src/aotcompile.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index c95d6430e04dd..5f2d159db2cc0 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -279,7 +279,7 @@ static void jl_ci_cache_lookup(const jl_cgparams_t &cgparams, jl_method_instance // takes the running content that has collected in the shadow module and dump it to disk // this builds the object file portion of the sysimage files for fast startup, and can // also be used be extern consumers like GPUCompiler.jl to obtain a module containing -// all reachable & inferrrable functions. The `policy` flag switches between the defaul +// all reachable & inferrrable functions. The `policy` flag switches between the default // mode `0` and the extern mode `1`. extern "C" JL_DLLEXPORT void *jl_create_native(jl_array_t *methods, const jl_cgparams_t cgparams, int _policy) @@ -404,16 +404,18 @@ void *jl_create_native(jl_array_t *methods, const jl_cgparams_t cgparams, int _p // move everything inside, now that we've merged everything // (before adding the exported headers) - for (GlobalObject &G : clone->global_objects()) { - if (!G.isDeclaration()) { - G.setLinkage(Function::InternalLinkage); - makeSafeName(G); - addComdat(&G); + if (policy != CompilationPolicy::Extern) { + for (GlobalObject &G : clone->global_objects()) { + if (!G.isDeclaration()) { + G.setLinkage(Function::InternalLinkage); + makeSafeName(G); + addComdat(&G); #if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_) - // Add unwind exception personalities to functions to handle async exceptions - if (Function *F = dyn_cast(&G)) - F->setPersonalityFn(juliapersonality_func); + // Add unwind exception personalities to functions to handle async exceptions + if (Function *F = dyn_cast(&G)) + F->setPersonalityFn(juliapersonality_func); #endif + } } } From c3b10fda1f26407a84f7d72270f49148ff046ca6 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Mon, 25 Jan 2021 05:20:57 -0600 Subject: [PATCH 166/239] minor speedup and accuracy improvement for atanh (#39267) When `x` is not small, the numeric stability given by `log1p` and the rest of the complicated stuff actually just increases error and reduces speed. Also the small x and infinity case are just extra branches that already fall out of the remaining branches. The `<.5` branch is still both slower and has a higher max error (1.4 ULP vs .8 for the other branch), so if anyone can think of anything to improve it, I'm all ears. This PR is only a 20% speed improvement, but it's also a simplification so I think it's worthwhile. --- base/special/hyperbolic.jl | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/base/special/hyperbolic.jl b/base/special/hyperbolic.jl index 917c5459fae58..1e6d4e8a9e87a 100644 --- a/base/special/hyperbolic.jl +++ b/base/special/hyperbolic.jl @@ -243,14 +243,10 @@ function atanh(x::T) where T <: Union{Float32, Float64} # Method # 1.Reduced x to positive by atanh(-x) = -atanh(x) # 2. Find the branch and the expression to calculate and return it - # a) 0 <= x < 2^-28 - # return x - # b) 2^-28 <= x < 0.5 - # return 0.5*log1p(2x+2x*x/(1-x)) - # c) 0.5 <= x < 1 - # return 0.5*log1p(2x/1-x) - # d) x = 1 - # return Inf + # a) 0 <= x < 0.5 + # return 0.5*log1p(2x/(1-x)) + # b) 0.5 <= x <= 1 + # return 0.5*log((x+1)/(1-x)) # Special cases: # if |x| > 1 throw DomainError isnan(x) && return x @@ -260,20 +256,12 @@ function atanh(x::T) where T <: Union{Float32, Float64} if absx > 1 atanh_domain_error(x) end - if absx < T(2)^-28 - # in a) - return x - end if absx < T(0.5) + # in a) + t = log1p(T(2)*absx/(T(1)-absx)) + else # in b) - t = absx+absx - t = T(0.5)*log1p(t+t*absx/(T(1)-absx)) - elseif absx < T(1) - # in c) - t = T(0.5)*log1p((absx + absx)/(T(1)-absx)) - elseif absx == T(1) - # in d) - return copysign(T(Inf), x) + t = log((T(1)+absx)/(T(1)-absx)) end - return copysign(t, x) + return T(0.5)*copysign(t, x) end From c889de7eb80d42f745652da84b99c127a581d0ff Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Mon, 25 Jan 2021 10:13:29 -0600 Subject: [PATCH 167/239] Update PCRE2 to 10.36 (#39310) --- deps/Versions.make | 2 +- deps/checksums/pcre | 64 ++--- deps/patches/pcre2-cet-flags.patch | 229 ---------------- .../pcre2-sljit-apple-silicon-support.patch | 244 ++++++++++++++++++ deps/pcre.mk | 12 +- stdlib/PCRE2_jll/Project.toml | 2 +- stdlib/PCRE2_jll/test/runtests.jl | 2 +- 7 files changed, 284 insertions(+), 271 deletions(-) delete mode 100644 deps/patches/pcre2-cet-flags.patch create mode 100644 deps/patches/pcre2-sljit-apple-silicon-support.patch diff --git a/deps/Versions.make b/deps/Versions.make index b0b2e72f63f2e..75a22deff11df 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -91,7 +91,7 @@ P7ZIP_VER := 16.2.0 P7ZIP_JLL_NAME := p7zip # PCRE -PCRE_VER := 10.35 +PCRE_VER := 10.36 PCRE_JLL_NAME := PCRE2 # SuiteSparse diff --git a/deps/checksums/pcre b/deps/checksums/pcre index f89546fb71df4..421426e3d2389 100644 --- a/deps/checksums/pcre +++ b/deps/checksums/pcre @@ -1,32 +1,32 @@ -PCRE2.v10.35.0+0.aarch64-apple-darwin.tar.gz/md5/4c604a93fd5a1343ba0cd907655c2f7b -PCRE2.v10.35.0+0.aarch64-apple-darwin.tar.gz/sha512/9aeadea7c685cafe226d9e0059a1443e7ba408ced7689723d63851a05796da2bffaf2e8b469da16f569229d70515c75daa0e70eaca4b98368fb692c909545265 -PCRE2.v10.35.0+0.aarch64-linux-gnu.tar.gz/md5/be872ef012d842ec67307b38c70ee652 -PCRE2.v10.35.0+0.aarch64-linux-gnu.tar.gz/sha512/742334411e9d7251d863363a1df71b49fec6dec60d594825821bcca5beeac4681fec97da114dd2e7698b8012f521f282acfc076f367f2959c0c7ab3775e8a3a9 -PCRE2.v10.35.0+0.aarch64-linux-musl.tar.gz/md5/7fcfa6fd4263a601559e395c7ac5c1fa -PCRE2.v10.35.0+0.aarch64-linux-musl.tar.gz/sha512/66d291e2c2cfaefe575122c54b5b9d7ed62b0a1bd8db626bb7581d6981735a95ca42995b665023eba2704d04f38320518acfcbecf9fb9db71cae0c6ff4b4c96d -PCRE2.v10.35.0+0.armv6l-linux-gnueabihf.tar.gz/md5/1ce32c9911f40734463a5c44a127098b -PCRE2.v10.35.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/94c0df8dda0fb658407a4f90b8e7e938938698a29dd2a0ee799572101f3093d308f1f99a92b7ef33302a1b0dd9954be2b6e84391d331ff047a178e908431bcf9 -PCRE2.v10.35.0+0.armv6l-linux-musleabihf.tar.gz/md5/ab61045ca69a27b6f13db3b26dbf1ee6 -PCRE2.v10.35.0+0.armv6l-linux-musleabihf.tar.gz/sha512/a1c46c49b42b5ff3e1d736bc6748c7a69c53b1dca18aa4a4e1c5076a894bfc51af152b71b9075ba46583737aa78f9324f94fb3036327adc95f28fc29145c3504 -PCRE2.v10.35.0+0.armv7l-linux-gnueabihf.tar.gz/md5/8e55ae4239c682b611fdb7b3e64f2fad -PCRE2.v10.35.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/f63bb3b278b5f0e52fa30a5f8a0f67ad37a983a43d04fbcc9e5972978adcbc7d76dcc72d1bb7c8555cc1cbb3bd5907c4fdc23f5f24f962530c7313170228f9df -PCRE2.v10.35.0+0.armv7l-linux-musleabihf.tar.gz/md5/0e5da7ba4bb7930afd28e3b1f20db026 -PCRE2.v10.35.0+0.armv7l-linux-musleabihf.tar.gz/sha512/6b3c5b14ff799243121a056b4d79af762fd9fd6ea3e1b55e5146af25e98aad963d7a5b5b3ece07c8a2ceb934eee02edc238704e103a7cd5b7ce00a2776082adc -PCRE2.v10.35.0+0.i686-linux-gnu.tar.gz/md5/753232dcaa7cd3bf41cc65f5d10e9fac -PCRE2.v10.35.0+0.i686-linux-gnu.tar.gz/sha512/1377449341367c8546ddc010a38db9094c0e8f18626f8b010f020ef5f14077e0fca50945e1a9f6e4e18c3ea8c7ebd3f28954bb13c9ad8fcee8a8548bb0258925 -PCRE2.v10.35.0+0.i686-linux-musl.tar.gz/md5/ac3d8656f82251a925ba2c842938bc62 -PCRE2.v10.35.0+0.i686-linux-musl.tar.gz/sha512/736bca0879c4820bf2196244fd664d35d281e2f0a5ac969210de470e2d03182401294926753f67438fe8d0831366386e3a263c6e19a0cdea5ea2b87eedb901bd -PCRE2.v10.35.0+0.i686-w64-mingw32.tar.gz/md5/e80c503eb4ffa74ab486c18f2809c72c -PCRE2.v10.35.0+0.i686-w64-mingw32.tar.gz/sha512/ce252bb835bcdbae997825d9e7ee877509551a3d2063ac17bde8beb417bfdbe0461e9980d623608d5699804e5bf61e38c7a505d5083f6fc6964786928ed45165 -PCRE2.v10.35.0+0.powerpc64le-linux-gnu.tar.gz/md5/6c1cfcbe2e47d16bb345e68cf9a7d62a -PCRE2.v10.35.0+0.powerpc64le-linux-gnu.tar.gz/sha512/9977f3695bb8d4c065ed29acc56148017bb40ebfb2b08344e37cd7874e8934fa4e6ad8dfa552d45a65e8dbb6dc257b6663f8299ae1a1b49fa2217775e547cd8b -PCRE2.v10.35.0+0.x86_64-apple-darwin.tar.gz/md5/a41cd11abaf88d6331f382ff142d5631 -PCRE2.v10.35.0+0.x86_64-apple-darwin.tar.gz/sha512/37666cc9dbe686d6a614c99092eb8b636dc3f626c0619e832dd072c8fc2f9d5bae1435045471b87a4737218b107e3c265b65074bacf5762a813eff75b725bb39 -PCRE2.v10.35.0+0.x86_64-linux-gnu.tar.gz/md5/59785e82e8964eff86df5b3a4b6e4cce -PCRE2.v10.35.0+0.x86_64-linux-gnu.tar.gz/sha512/f09eff9864e944cc27f737329f466be32b7dc21ec68a425881f6a16bad358d999f203dc36c055e1ac4b613980878c51afd2fd7e379e61cc7a2812f775c323b71 -PCRE2.v10.35.0+0.x86_64-linux-musl.tar.gz/md5/043179f5a3622123e95128219571fa35 -PCRE2.v10.35.0+0.x86_64-linux-musl.tar.gz/sha512/7a689300101560f1053374089f33c6554a0b9b28f6a9022eadf1599747e419a9fbc98b70638640e065c0dc9d32e9e0bc05c87e46321b6b5aacfd61c04141fca7 -PCRE2.v10.35.0+0.x86_64-unknown-freebsd.tar.gz/md5/a18cb245ca057846802ccdcf0673d772 -PCRE2.v10.35.0+0.x86_64-unknown-freebsd.tar.gz/sha512/ff2ce9fea948561e87c1e68e29852ac917a690b807e43509b9184fd9233e5bb9d8ca98490d8936d2be43b31081e3e9829006cbb8b7cc160469e7d3df5215e820 -PCRE2.v10.35.0+0.x86_64-w64-mingw32.tar.gz/md5/04e7ecd60b039ba60fdbcb82a83e2e68 -PCRE2.v10.35.0+0.x86_64-w64-mingw32.tar.gz/sha512/a0cb69b73fb86de2f37c6e98633c4aeab83c6be871819baddec8cd483db65815043090ff0736e85aa2117f58dacf73e2b49cba9536e109b53840c5b45c3e3fb1 +PCRE2.v10.36.0+0.aarch64-apple-darwin.tar.gz/md5/34157dd76b931907009ec32aad7c6e5e +PCRE2.v10.36.0+0.aarch64-apple-darwin.tar.gz/sha512/f2c4a676fb4fad42bdcffcde4876b82d40e2e3aeb7668e3077aea4e98be022cb627110bb6c13a71db941d6135db64a455c969c0cc4b914a898dc8556a9d88e67 +PCRE2.v10.36.0+0.aarch64-linux-gnu.tar.gz/md5/4fb6705dfdd7889fc8f52616527a0956 +PCRE2.v10.36.0+0.aarch64-linux-gnu.tar.gz/sha512/7af0d79aa55c969fe434f89702e328ca04d236e78accced26d5038cd08fbf83c3b4feb7e02bb88fbf0338f94f8e13b099b454eaa3c59e5274d7b572dd2e3d687 +PCRE2.v10.36.0+0.aarch64-linux-musl.tar.gz/md5/968317b2a6fa8d71a82d5f9f1a7a7923 +PCRE2.v10.36.0+0.aarch64-linux-musl.tar.gz/sha512/ba7f89932447c1c3ca007c766c8987789f0792afba924d52b149d966010792b8182ab77d50911ec4fe6553d1794617d6c70ca74b5c3e8b8779fa69c61eb2f456 +PCRE2.v10.36.0+0.armv6l-linux-gnueabihf.tar.gz/md5/d760e518585dd9bfd9e3d3688417b8ef +PCRE2.v10.36.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/d0da6bbbd01e67e5a0ec448ca7bf218d90d4fbee17fd71981221816b5d00d05722347899aa960d88ee8e609b700e7b33d5c9b802b2e5eeccd1710f5b5deda839 +PCRE2.v10.36.0+0.armv6l-linux-musleabihf.tar.gz/md5/b746d89f79fbd5ba5bda60848eac517b +PCRE2.v10.36.0+0.armv6l-linux-musleabihf.tar.gz/sha512/8d025fc4e7f58ba89b7f763ff6250738ef76eb58dbd82baf8257cb5f9fdf0a59730c7854747ab3bda754294f2e2ceb2fc769a51e0e504fdadd68da73b5fc8684 +PCRE2.v10.36.0+0.armv7l-linux-gnueabihf.tar.gz/md5/f4529eccf64a257b5df354f084807eb5 +PCRE2.v10.36.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/46a4e6efa1a6ecbccecbeddeb0a66475917172350702b0c6eed077e2de1d25c266182999f9d0a48074e9124dcca812815d964fb0cce0033f117246e9d1933198 +PCRE2.v10.36.0+0.armv7l-linux-musleabihf.tar.gz/md5/896bdae6d898c2c71751341b5a10e344 +PCRE2.v10.36.0+0.armv7l-linux-musleabihf.tar.gz/sha512/c16c2291b2802037fec3ae5aec2b01ed072a712b7ef48bb2a02cdaae6715dd6dd9e6c4905134047a06ad435684856d7f400dc655ec8c42a9a5ec9a3eebc9a22a +PCRE2.v10.36.0+0.i686-linux-gnu.tar.gz/md5/c545dd71a854c328536d258d1defdf60 +PCRE2.v10.36.0+0.i686-linux-gnu.tar.gz/sha512/c9aa0d188f55ce3cd19b608832bfb5a22bed34fe23b58489e8716e3af2338728fb5bd9f281f29b203b0de00e885cc8bc35e046524d328e09b7371c353ba9fb2b +PCRE2.v10.36.0+0.i686-linux-musl.tar.gz/md5/927e70b0b164e7225019677c1ca8b1a7 +PCRE2.v10.36.0+0.i686-linux-musl.tar.gz/sha512/2d6e46a8cbe322950c905e6e845a5ad7426485e547d51ed5aae9a048a1fb284f2e7998f4dafe719cc512c22ce8ad8622b70d46e2140c4e01a85d1a053bc90190 +PCRE2.v10.36.0+0.i686-w64-mingw32.tar.gz/md5/3c5129a428239ef9bd6220ed6abc3a59 +PCRE2.v10.36.0+0.i686-w64-mingw32.tar.gz/sha512/e342d8fd180b4f663eddb93ac3893d45ab1757b4fefc4c81a42768cbf03d9ec6b27af42ffe5568b8cad42fbcce2ee3d01bb272eeecb2ebd75e236f8a22efb3fd +PCRE2.v10.36.0+0.powerpc64le-linux-gnu.tar.gz/md5/d4158e4c05a45b2a5e8fdf89de1d2d24 +PCRE2.v10.36.0+0.powerpc64le-linux-gnu.tar.gz/sha512/cd652a8acefcab959826239176585c003465e9d0220b712731ad83b0c24b24a6a6875f44a458f208872c3c50cdff205e3e178feed3984c6dbde1e1792a4a7da9 +PCRE2.v10.36.0+0.x86_64-apple-darwin.tar.gz/md5/efa1c7f36aa76f3c9278ea409e99cc4d +PCRE2.v10.36.0+0.x86_64-apple-darwin.tar.gz/sha512/5b3f37a5f99690937adc7346b0f7205b8f8743ee81acad72a8d605a896cd9e9b23a81b26a0dd18b7fac0434ab6a45fd9eed5cc12a97f48d8069d55f537228621 +PCRE2.v10.36.0+0.x86_64-linux-gnu.tar.gz/md5/41c18464e519fc53cc4d496a683b0088 +PCRE2.v10.36.0+0.x86_64-linux-gnu.tar.gz/sha512/afab98dd9cf808a094a7402e532d7adf0b7b562bf1858a3e036e3ad400fa704129c13a2c4d0b32cde6a9786b09d220b72f77e1af6ab2883bcc3ffc6fd7fa80b4 +PCRE2.v10.36.0+0.x86_64-linux-musl.tar.gz/md5/9a24b4e7dcb145c113f9b93f2fc82bef +PCRE2.v10.36.0+0.x86_64-linux-musl.tar.gz/sha512/329c86994da95725b04af4db340765ecf8620bbb255583a74932d9076b78da757e426ca79c0fe0002f9c4be4854fae861ea716c9c0c7b3d0962082c0506e90a7 +PCRE2.v10.36.0+0.x86_64-unknown-freebsd.tar.gz/md5/fb71d0f5c07f23c50dd9b9c5f26cf511 +PCRE2.v10.36.0+0.x86_64-unknown-freebsd.tar.gz/sha512/32f330d2492f9325c28d514343e6eb63e3958df769712814ef4c0975e2918d753a8898a30f49ea9ed5f9ff14fce8ec99cd5758e93c8964fb85ba1982c4c5a792 +PCRE2.v10.36.0+0.x86_64-w64-mingw32.tar.gz/md5/67991b37b9dd96541ba83999fb657ad5 +PCRE2.v10.36.0+0.x86_64-w64-mingw32.tar.gz/sha512/0978ead7b84db12fbeb9ca87b043982fc29350bf4a5342ebbf90746c6471c146b977b9c86cc5a090b013b919b2834745b18af10ace00db992bf82bc791124637 diff --git a/deps/patches/pcre2-cet-flags.patch b/deps/patches/pcre2-cet-flags.patch deleted file mode 100644 index 7c455175cdfe3..0000000000000 --- a/deps/patches/pcre2-cet-flags.patch +++ /dev/null @@ -1,229 +0,0 @@ -commit 6823a639a4a2d3e2b4a44bab6da78e1659431063 -Author: Elliot Saba -Date: Tue Nov 17 19:29:06 2020 +0000 - - Backport SVN revisions r1256 and r1257 to fix compilations errors - - Without this patch, compilation errors such as `"-mshstk is needed to compile with -fcf-protection"` - occur on newer Ubuntu distros. This is a backport of upstreams patch, along with a partial-update - of `configure` so that users do not have to run `aclocal` on their machines when building from source. - - X-ref: https://bugs.exim.org/show_bug.cgi?id=2578 - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 86b8896..a368523 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -92,6 +92,7 @@ - # library versioning. - # 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator - # 2020-04-28 PH added function check for memfd_create based on Carlo's patch -+# 2020-05-25 PH added a check for Intel CET - - PROJECT(PCRE2 C) - -@@ -146,6 +147,23 @@ CHECK_C_SOURCE_COMPILES( - ) - set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) - -+# Check whether Intel CET is enabled, and if so, adjust compiler flags. This -+# code was written by PH, trying to imitate the logic from the autotools -+# configuration. -+ -+CHECK_C_SOURCE_COMPILES( -+ "#ifndef __CET__ -+ #error CET is not enabled -+ #endif -+ int main() { return 0; }" -+ INTEL_CET_ENABLED -+) -+ -+IF (INTEL_CET_ENABLED) -+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk") -+ENDIF(INTEL_CET_ENABLED) -+ -+ - # User-configurable options - # - # Note: CMakeSetup displays these in alphabetical order, regardless of -diff --git a/ChangeLog b/ChangeLog -index 310eb60..f238cce 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,6 +1,15 @@ - Change Log for PCRE2 - -------------------- - -+Version 10.36-RC1 25-May-2020 -+----------------------------- -+ -+1. Add CET_CFLAGS so that when Intel CET is enabled, pass -mshstk to -+compiler. This fixes https://bugs.exim.org/show_bug.cgi?id=2578. Patch for -+Makefile.am and configure.ac by H.J. Lu. Equivalent patch for CMakeLists.txt -+invented by PH. -+ -+ - Version 10.35 09-May-2020 - --------------------------- - -diff --git a/Makefile.am b/Makefile.am -index bb888f2..6a771a5 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -391,6 +391,7 @@ nodist_libpcre2_8_la_SOURCES = \ - libpcre2_8_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=8 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_8_la_LIBADD = - endif # WITH_PCRE2_8 -@@ -404,6 +405,7 @@ nodist_libpcre2_16_la_SOURCES = \ - libpcre2_16_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=16 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_16_la_LIBADD = - endif # WITH_PCRE2_16 -@@ -417,6 +419,7 @@ nodist_libpcre2_32_la_SOURCES = \ - libpcre2_32_la_CFLAGS = \ - -DPCRE2_CODE_UNIT_WIDTH=32 \ - $(VISIBILITY_CFLAGS) \ -+ $(CET_CFLAGS) \ - $(AM_CFLAGS) - libpcre2_32_la_LIBADD = - endif # WITH_PCRE2_32 -diff --git a/Makefile.in b/Makefile.in -index 2873912..0ce7004 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -806,6 +806,7 @@ AUTOMAKE = @AUTOMAKE@ - AWK = @AWK@ - CC = @CC@ - CCDEPMODE = @CCDEPMODE@ -+CET_CFLAGS = @CET_CFLAGS@ - CFLAGS = @CFLAGS@ - CPP = @CPP@ - CPPFLAGS = @CPPFLAGS@ -@@ -1310,8 +1311,9 @@ COMMON_SOURCES = \ - @WITH_PCRE2_8_TRUE@ $(NODIST_SOURCES) - - @WITH_PCRE2_8_TRUE@libpcre2_8_la_CFLAGS = -DPCRE2_CODE_UNIT_WIDTH=8 \ --@WITH_PCRE2_8_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ --@WITH_PCRE2_8_TRUE@ $(am__append_5) $(am__append_8) -+@WITH_PCRE2_8_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ -+@WITH_PCRE2_8_TRUE@ $(AM_CFLAGS) $(am__append_5) \ -+@WITH_PCRE2_8_TRUE@ $(am__append_8) - @WITH_PCRE2_8_TRUE@libpcre2_8_la_LIBADD = - @WITH_PCRE2_16_TRUE@libpcre2_16_la_SOURCES = \ - @WITH_PCRE2_16_TRUE@ $(COMMON_SOURCES) -@@ -1321,8 +1323,9 @@ COMMON_SOURCES = \ - - @WITH_PCRE2_16_TRUE@libpcre2_16_la_CFLAGS = \ - @WITH_PCRE2_16_TRUE@ -DPCRE2_CODE_UNIT_WIDTH=16 \ --@WITH_PCRE2_16_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ --@WITH_PCRE2_16_TRUE@ $(am__append_6) $(am__append_9) -+@WITH_PCRE2_16_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ -+@WITH_PCRE2_16_TRUE@ $(AM_CFLAGS) $(am__append_6) \ -+@WITH_PCRE2_16_TRUE@ $(am__append_9) - @WITH_PCRE2_16_TRUE@libpcre2_16_la_LIBADD = - @WITH_PCRE2_32_TRUE@libpcre2_32_la_SOURCES = \ - @WITH_PCRE2_32_TRUE@ $(COMMON_SOURCES) -@@ -1332,8 +1335,9 @@ COMMON_SOURCES = \ - - @WITH_PCRE2_32_TRUE@libpcre2_32_la_CFLAGS = \ - @WITH_PCRE2_32_TRUE@ -DPCRE2_CODE_UNIT_WIDTH=32 \ --@WITH_PCRE2_32_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ --@WITH_PCRE2_32_TRUE@ $(am__append_7) $(am__append_10) -+@WITH_PCRE2_32_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ -+@WITH_PCRE2_32_TRUE@ $(AM_CFLAGS) $(am__append_7) \ -+@WITH_PCRE2_32_TRUE@ $(am__append_10) - @WITH_PCRE2_32_TRUE@libpcre2_32_la_LIBADD = - @WITH_PCRE2_8_TRUE@libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS) - @WITH_PCRE2_16_TRUE@libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS) -diff --git a/configure b/configure -index 615f638..322a3a4 100755 ---- a/configure -+++ b/configure -@@ -633,6 +633,7 @@ ac_subst_vars='am__EXEEXT_FALSE - am__EXEEXT_TRUE - LTLIBOBJS - LIBOBJS -+CET_CFLAGS - WITH_GCOV_FALSE - WITH_GCOV_TRUE - GCOV_LIBS -@@ -15493,6 +15494,46 @@ else - fi - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Intel CET is enabled" >&5 -+$as_echo_n "checking whether Intel CET is enabled... " >&6; } -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+#ifndef __CET__ -+# error CET is not enabled -+#endif -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ pcre2_cc_cv_intel_cet_enabled=yes -+else -+ pcre2_cc_cv_intel_cet_enabled=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcre2_cc_cv_intel_cet_enabled" >&5 -+$as_echo "$pcre2_cc_cv_intel_cet_enabled" >&6; } -+if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then -+ CET_CFLAGS="-mshstk" -+ -+fi -+ac_ext=c -+ac_cpp='$CPP $CPPFLAGS' -+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_c_compiler_gnu -+ -+ - # Produce these files, in addition to config.h. - ac_config_files="$ac_config_files Makefile libpcre2-8.pc libpcre2-16.pc libpcre2-32.pc libpcre2-posix.pc pcre2-config src/pcre2.h" - -diff --git a/configure.ac b/configure.ac -index 180d3dc..61b93ba 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1006,6 +1006,21 @@ fi # enable_coverage - - AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"]) - -+AC_MSG_CHECKING([whether Intel CET is enabled]) -+AC_LANG_PUSH([C]) -+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, -+ [[#ifndef __CET__ -+# error CET is not enabled -+#endif]])], -+ [pcre2_cc_cv_intel_cet_enabled=yes], -+ [pcre2_cc_cv_intel_cet_enabled=no]) -+AC_MSG_RESULT([$pcre2_cc_cv_intel_cet_enabled]) -+if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then -+ CET_CFLAGS="-mshstk" -+ AC_SUBST([CET_CFLAGS]) -+fi -+AC_LANG_POP([C]) -+ - # Produce these files, in addition to config.h. - AC_CONFIG_FILES( - Makefile diff --git a/deps/patches/pcre2-sljit-apple-silicon-support.patch b/deps/patches/pcre2-sljit-apple-silicon-support.patch new file mode 100644 index 0000000000000..3aff832ca08fd --- /dev/null +++ b/deps/patches/pcre2-sljit-apple-silicon-support.patch @@ -0,0 +1,244 @@ +From e87e1ccf93768238db3d6e28d0272980dba707fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= +Date: Mon, 30 Nov 2020 01:35:13 -0800 +Subject: [PATCH] macos: add BigSur support to execalloc (#90) + +Apple Silicon requires that pages that will hold JIT code are +marked with MAP_JIT (even if not using the hardened runtime) +and that a call be made to a pthread function before writing +to them, so a special exception could be made to the current +thread[1]; add support for both. + +since the allocator keeps the metadata about chunk/block in the +executable pages, all functions that modify that metadata will +also need to be updated. + +note that since there is no need for an accurate pointer range +with the apple implementation, NULL is passed for the pointers. + +historically, adding MAP_JIT was only recommended when the hardened +runtime was being used as it adds several undocumented restrictions +(like not being able to use JIT pages accross fork()) so the +new codepath won't be used if running in Intel. + +Tested-by: @Keno +Fixes: #51 + +[1] https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon?language=objc +--- + sljit_src/sljitExecAllocator.c | 113 ++++++++++++++++++--------------- + 1 file changed, 63 insertions(+), 50 deletions(-) + +diff --git a/sljit_src/sljitExecAllocator.c b/sljit_src/sljitExecAllocator.c +index 61a32f2..2e1c138 100644 +--- a/sljit_src/sljitExecAllocator.c ++++ b/sljit_src/sljitExecAllocator.c +@@ -79,6 +79,7 @@ + */ + + #ifdef _WIN32 ++#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec) + + static SLJIT_INLINE void* alloc_chunk(sljit_uw size) + { +@@ -91,65 +92,76 @@ static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size) + VirtualFree(chunk, 0, MEM_RELEASE); + } + +-#else +- +-#ifdef __APPLE__ +-#ifdef MAP_ANON +-/* Configures TARGET_OS_OSX when appropriate */ +-#include +- +-#if TARGET_OS_OSX && defined(MAP_JIT) +-#include +-#endif /* TARGET_OS_OSX && MAP_JIT */ +- +-#ifdef MAP_JIT ++#else /* POSIX */ + ++#if defined(__APPLE__) && defined(MAP_JIT) + /* + On macOS systems, returns MAP_JIT if it is defined _and_ we're running on a +- version where it's OK to have more than one JIT block. ++ version where it's OK to have more than one JIT block or where MAP_JIT is ++ required. + On non-macOS systems, returns MAP_JIT if it is defined. + */ ++#include ++#if TARGET_OS_OSX ++#if defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86 ++#ifdef MAP_ANON ++#include ++#include ++ ++#define SLJIT_MAP_JIT (get_map_jit_flag()) ++ + static SLJIT_INLINE int get_map_jit_flag() + { +-#if TARGET_OS_OSX +- sljit_sw page_size = get_page_alignment() + 1; ++ sljit_sw page_size; + void *ptr; ++ struct utsname name; + static int map_jit_flag = -1; + +- /* +- The following code is thread safe because multiple initialization +- sets map_jit_flag to the same value and the code has no side-effects. +- Changing the kernel version witout system restart is (very) unlikely. +- */ +- if (map_jit_flag == -1) { +- struct utsname name; +- ++ if (map_jit_flag < 0) { + map_jit_flag = 0; + uname(&name); + +- /* Kernel version for 10.14.0 (Mojave) */ ++ /* Kernel version for 10.14.0 (Mojave) or later */ + if (atoi(name.release) >= 18) { ++ page_size = get_page_alignment() + 1; + /* Only use MAP_JIT if a hardened runtime is used */ ++ ptr = mmap(NULL, page_size, PROT_WRITE | PROT_EXEC, ++ MAP_PRIVATE | MAP_ANON, -1, 0); + +- ptr = mmap(NULL, page_size, PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0); +- +- if (ptr == MAP_FAILED) { +- map_jit_flag = MAP_JIT; +- } else { ++ if (ptr != MAP_FAILED) + munmap(ptr, page_size); +- } ++ else ++ map_jit_flag = MAP_JIT; + } + } +- + return map_jit_flag; +-#else /* !TARGET_OS_OSX */ +- return MAP_JIT; +-#endif /* TARGET_OS_OSX */ + } +- +-#endif /* MAP_JIT */ + #endif /* MAP_ANON */ +-#endif /* __APPLE__ */ ++#else /* !SLJIT_CONFIG_X86 */ ++#if !(defined SLJIT_CONFIG_ARM && SLJIT_CONFIG_ARM) ++#error Unsupported architecture ++#endif /* SLJIT_CONFIG_ARM */ ++#include ++ ++#define SLJIT_MAP_JIT (MAP_JIT) ++#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec) \ ++ apple_update_wx_flags(enable_exec) ++ ++static SLJIT_INLINE void apple_update_wx_flags(sljit_s32 enable_exec) ++{ ++ pthread_jit_write_protect_np(enable_exec); ++} ++#endif /* SLJIT_CONFIG_X86 */ ++#else /* !TARGET_OS_OSX */ ++#define SLJIT_MAP_JIT (MAP_JIT) ++#endif /* TARGET_OS_OSX */ ++#endif /* __APPLE__ && MAP_JIT */ ++#ifndef SLJIT_UPDATE_WX_FLAGS ++#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec) ++#endif /* !SLJIT_UPDATE_WX_FLAGS */ ++#ifndef SLJIT_MAP_JIT ++#define SLJIT_MAP_JIT (0) ++#endif /* !SLJIT_MAP_JIT */ + + static SLJIT_INLINE void* alloc_chunk(sljit_uw size) + { +@@ -157,12 +169,7 @@ static SLJIT_INLINE void* alloc_chunk(sljit_uw size) + const int prot = PROT_READ | PROT_WRITE | PROT_EXEC; + + #ifdef MAP_ANON +- +- int flags = MAP_PRIVATE | MAP_ANON; +- +-#ifdef MAP_JIT +- flags |= get_map_jit_flag(); +-#endif ++ int flags = MAP_PRIVATE | MAP_ANON | SLJIT_MAP_JIT; + + retval = mmap(NULL, size, prot, flags, -1, 0); + #else /* !MAP_ANON */ +@@ -173,14 +180,15 @@ static SLJIT_INLINE void* alloc_chunk(sljit_uw size) + #endif /* MAP_ANON */ + + if (retval == MAP_FAILED) +- retval = NULL; +- else { +- if (mprotect(retval, size, prot) < 0) { +- munmap(retval, size); +- retval = NULL; +- } ++ return NULL; ++ ++ if (mprotect(retval, size, prot) < 0) { ++ munmap(retval, size); ++ return NULL; + } + ++ SLJIT_UPDATE_WX_FLAGS(retval, (uint8_t *)retval + size, 0); ++ + return retval; + } + +@@ -189,7 +197,7 @@ static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size) + munmap(chunk, size); + } + +-#endif ++#endif /* windows */ + + /* --------------------------------------------------------------------- */ + /* Common functions */ +@@ -261,6 +269,7 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size) + while (free_block) { + if (free_block->size >= size) { + chunk_size = free_block->size; ++ SLJIT_UPDATE_WX_FLAGS(NULL, NULL, 0); + if (chunk_size > size + 64) { + /* We just cut a block from the end of the free block. */ + chunk_size -= size; +@@ -326,6 +335,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr) + allocated_size -= header->size; + + /* Connecting free blocks together if possible. */ ++ SLJIT_UPDATE_WX_FLAGS(NULL, NULL, 0); + + /* If header->prev_size == 0, free_block will equal to header. + In this case, free_block->header.size will be > 0. */ +@@ -358,6 +368,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr) + } + } + ++ SLJIT_UPDATE_WX_FLAGS(NULL, NULL, 1); + SLJIT_ALLOCATOR_UNLOCK(); + } + +@@ -367,6 +378,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void) + struct free_block* next_free_block; + + SLJIT_ALLOCATOR_LOCK(); ++ SLJIT_UPDATE_WX_FLAGS(NULL, NULL, 0); + + free_block = free_blocks; + while (free_block) { +@@ -381,5 +393,6 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void) + } + + SLJIT_ASSERT((total_size && free_blocks) || (!total_size && !free_blocks)); ++ SLJIT_UPDATE_WX_FLAGS(NULL, NULL, 1); + SLJIT_ALLOCATOR_UNLOCK(); + } +-- +2.30.0 + diff --git a/deps/pcre.mk b/deps/pcre.mk index 70b9e9f96ff02..f92357d7d9f54 100644 --- a/deps/pcre.mk +++ b/deps/pcre.mk @@ -12,18 +12,16 @@ $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted: $(SRCCACHE)/pcre2-$(PCRE_VER).ta $(JLCHECKSUM) $< cd $(dir $<) && $(TAR) jxf $(notdir $<) cp $(SRCDIR)/patches/config.sub $(SRCCACHE)/pcre2-$(PCRE_VER)/config.sub - cd $(SRCCACHE)/pcre2-$(PCRE_VER) && patch -p1 -f < $(SRCDIR)/patches/pcre2-cet-flags.patch - # Fix some old targets modified by the patching - touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.am - touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.in - touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/aclocal.m4 - touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/configure echo $1 > $@ checksum-pcre2: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2 $(JLCHECKSUM) $< -$(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured: $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted +$(SRCCACHE)/pcre2-$(PCRE_VER)/pcre2-sljit-apple-silicon-support.patch-applied: $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted + cd $(SRCCACHE)/pcre2-$(PCRE_VER) && patch -d src/sljit -p2 -f < $(SRCDIR)/patches/pcre2-sljit-apple-silicon-support.patch + echo 1 > $@ + +$(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured: $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted $(SRCCACHE)/pcre2-$(PCRE_VER)/pcre2-sljit-apple-silicon-support.patch-applied mkdir -p $(dir $@) cd $(dir $@) && \ $(dir $<)/configure $(CONFIGURE_COMMON) --enable-jit --includedir=$(build_includedir) CFLAGS="$(CFLAGS) $(PCRE_CFLAGS)" LDFLAGS="$(LDFLAGS) $(PCRE_LDFLAGS)" diff --git a/stdlib/PCRE2_jll/Project.toml b/stdlib/PCRE2_jll/Project.toml index 4b57093d649b4..7f364d3fefd88 100644 --- a/stdlib/PCRE2_jll/Project.toml +++ b/stdlib/PCRE2_jll/Project.toml @@ -1,6 +1,6 @@ name = "PCRE2_jll" uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.35.0+0" +version = "10.36.0+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/stdlib/PCRE2_jll/test/runtests.jl b/stdlib/PCRE2_jll/test/runtests.jl index aa1d89f02cea5..b2446e7e5caab 100644 --- a/stdlib/PCRE2_jll/test/runtests.jl +++ b/stdlib/PCRE2_jll/test/runtests.jl @@ -6,5 +6,5 @@ using Test, Libdl, PCRE2_jll vstr = zeros(UInt8, 32) @test ccall((:pcre2_config_8, libpcre2_8), Cint, (UInt32, Ref{UInt8}), 11, vstr) > 0 vn = VersionNumber(split(unsafe_string(pointer(vstr)), " ")[1]) - @test vn == v"10.35.0" + @test vn == v"10.36.0" end From 0fe05cbd1046b040800a10c4b440ed0e67091da2 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Mon, 25 Jan 2021 17:20:54 +0100 Subject: [PATCH 168/239] Update src/aotcompile.cpp Co-authored-by: Julian Samaroo --- src/aotcompile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aotcompile.cpp b/src/aotcompile.cpp index 5f2d159db2cc0..b7bdac7923c2e 100644 --- a/src/aotcompile.cpp +++ b/src/aotcompile.cpp @@ -404,7 +404,7 @@ void *jl_create_native(jl_array_t *methods, const jl_cgparams_t cgparams, int _p // move everything inside, now that we've merged everything // (before adding the exported headers) - if (policy != CompilationPolicy::Extern) { + if (policy == CompilationPolicy::Default) { for (GlobalObject &G : clone->global_objects()) { if (!G.isDeclaration()) { G.setLinkage(Function::InternalLinkage); From fd8f97e98c93796a2913bb5e6be4c6637659b615 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 11:55:28 -0500 Subject: [PATCH 169/239] inference: SCC handling missing for return_type_tfunc (#39375) This has actually been broken for a long time, so it only got noticed when it caused a regression. Fixes #39361 --- base/compiler/tfuncs.jl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index ef63fa6bb82cf..e8057fbe74566 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -1619,25 +1619,25 @@ function return_type_tfunc(interp::AbstractInterpreter, argtypes::Vector{Any}, s if isa(rt, Const) # output was computed to be constant return Const(typeof(rt.val)) + end + rt = widenconst(rt) + if rt === Bottom || (isconcretetype(rt) && !iskindtype(rt)) + # output cannot be improved so it is known for certain + return Const(rt) + elseif !isempty(sv.pclimitations) + # conservatively express uncertainty of this result + # in two ways: both as being a subtype of this, and + # because of LimitedAccuracy causes + return Type{<:rt} + elseif (isa(tt, Const) || isconstType(tt)) && + (isa(aft, Const) || isconstType(aft)) + # input arguments were known for certain + # XXX: this doesn't imply we know anything about rt + return Const(rt) + elseif isType(rt) + return Type{rt} else - inaccurate = nothing - rt isa LimitedAccuracy && (inaccurate = rt.causes; rt = rt.typ) - rt = widenconst(rt) - if hasuniquerep(rt) || rt === Bottom - # output type was known for certain - return Const(rt) - elseif inaccurate !== nothing - return LimitedAccuracy(Type{<:rt}, inaccurate) - elseif (isa(tt, Const) || isconstType(tt)) && - (isa(aft, Const) || isconstType(aft)) - # input arguments were known for certain - # XXX: this doesn't imply we know anything about rt - return Const(rt) - elseif isType(rt) - return Type{rt} - else - return Type{<:rt} - end + return Type{<:rt} end end end From cdaf7405349c3d5389c36da47e0b9386b74db11a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 11:56:43 -0500 Subject: [PATCH 170/239] gf: invalidate when adding new methods (#39343) Error introduced by #36733 Fixes #38435 --- src/gf.c | 34 +++++++++++++++++++++++----------- test/worlds.jl | 8 ++++++++ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/gf.c b/src/gf.c index 7c278691f4cfa..63a9a6dbc0494 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1666,21 +1666,33 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method size_t ins = 0; for (i = 1; i < na; i += 2) { jl_value_t *backedgetyp = backedges[i - 1]; + int missing = 0; if (jl_type_intersection2(backedgetyp, (jl_value_t*)type, &isect, &isect2)) { - // see if the intersection was actually already fully - // covered by anything (method or ambiguity is okay) + // See if the intersection was actually already fully + // covered, but that the new method is ambiguous. + // -> no previous method: now there is one, need to update the missing edge + // -> one+ previously matching method(s): + // -> more specific then all of them: need to update the missing edge + // -> some may have been ambiguous: now there is a replacement + // -> some may have been called: now there is a replacement (also will be detected in the loop later) + // -> less specific or ambiguous with any one of them: can ignore the missing edge (not missing) + // -> some may have been ambiguous: still are + // -> some may have been called: they may be partly replaced (will be detected in the loop later) + missing = 1; size_t j; for (j = 0; j < n; j++) { jl_method_t *m = d[j]; - if (jl_subtype(isect, m->sig)) - break; - if (isect2 && jl_subtype(isect2, m->sig)) - break; + if (jl_subtype(isect, m->sig) || (isect2 && jl_subtype(isect2, m->sig))) { + // We now know that there actually was a previous + // method for this part of the type intersection. + if (!jl_type_morespecific(type, m->sig)) { + missing = 0; + break; + } + } } - if (j != n) - isect = jl_bottom_type; } - if (isect != jl_bottom_type) { + if (missing) { jl_method_instance_t *backedge = (jl_method_instance_t*)backedges[i]; invalidate_external(backedge, max_world); invalidate_method_instance(backedge, max_world, 0); @@ -1722,7 +1734,7 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method isect3 = jl_type_intersection(m->sig, (jl_value_t*)mi->specTypes); if (jl_type_intersection2(type, isect3, &isect, &isect2)) { if (morespec[j] == (char)morespec_unknown) - morespec[j] = (char)jl_type_morespecific(m->sig, type) ? morespec_is : morespec_isnot; + morespec[j] = (char)(jl_type_morespecific(m->sig, type) ? morespec_is : morespec_isnot); if (morespec[j] == (char)morespec_is) // not actually shadowing--the existing method is still better break; @@ -1737,7 +1749,7 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method if (m == m2 || !(jl_subtype(isect, m2->sig) || (isect && jl_subtype(isect, m2->sig)))) continue; if (morespec[k] == (char)morespec_unknown) - morespec[k] = (char)jl_type_morespecific(m2->sig, type) ? morespec_is : morespec_isnot; + morespec[k] = (char)(jl_type_morespecific(m2->sig, type) ? morespec_is : morespec_isnot); if (morespec[k] == (char)morespec_is) // not actually shadowing this--m2 will still be better break; diff --git a/test/worlds.jl b/test/worlds.jl index a6aae68da2ca7..d1072ce6ba918 100644 --- a/test/worlds.jl +++ b/test/worlds.jl @@ -200,6 +200,14 @@ notify(c26506_1) wait(c26506_2) @test result26506[1] == 3 +# issue #38435 +f38435(::Int, ::Any) = 1 +f38435(::Any, ::Int) = 2 +g38435(x) = f38435(x, x) +@test_throws MethodError(f38435, (1, 1), Base.get_world_counter()) g38435(1) +f38435(::Int, ::Int) = 3.0 +@test g38435(1) === 3.0 + ## Invalidation tests From cc4690a6a746cac3961a59ac8026f57d6d52351c Mon Sep 17 00:00:00 2001 From: motchy Date: Tue, 26 Jan 2021 02:01:52 +0900 Subject: [PATCH 171/239] Fixed a spelling error. (#39372) --- doc/src/manual/arrays.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/manual/arrays.md b/doc/src/manual/arrays.md index 1db77f107aabd..8e49e29a1508a 100644 --- a/doc/src/manual/arrays.md +++ b/doc/src/manual/arrays.md @@ -735,7 +735,7 @@ julia> LinearIndices(A)[2, 2] 5 ``` -It's important to note that there's a very large assymmetry in the performance +It's important to note that there's a very large asymmetry in the performance of these conversions. Converting a linear index to a set of cartesian indices requires dividing and taking the remainder, whereas going the other way is just multiplies and adds. In modern processors, integer division can be 10-50 times From b0fc9bacb9244959a7c1bd34aa0897828602d220 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Tue, 26 Jan 2021 02:03:18 +0900 Subject: [PATCH 172/239] a bit of inference code types cleanup (#39332) --- base/compiler/abstractinterpretation.jl | 34 +++++++++++++------------ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 3ca8b29cf772f..3ddefadaf5146 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -4,8 +4,6 @@ # constants # ############# -const CoreNumType = Union{Int32, Int64, Float32, Float64} - const _REF_NAME = Ref.body.name ######### @@ -215,11 +213,11 @@ function const_prop_profitable(@nospecialize(arg)) isconstType(b) && return true const_prop_profitable(b) && return true end - elseif !isa(arg, Const) || (isa(arg.val, Symbol) || isa(arg.val, Type) || (!isa(arg.val, String) && !ismutable(arg.val))) - # don't consider mutable values or Strings useful constants - return true end - return false + isa(arg, Const) || return true + val = arg.val + # don't consider mutable values or Strings useful constants + return isa(val, Symbol) || isa(val, Type) || (!isa(val, String) && !ismutable(val)) end # This is a heuristic to avoid trying to const prop through complicated functions @@ -455,7 +453,8 @@ function abstract_call_method(interp::AbstractInterpreter, method::Method, @nosp return Any, true, nothing end topmost = topmost::InferenceState - poison_callstack(sv, topmost.parent === nothing ? topmost : topmost.parent) + parentframe = topmost.parent + poison_callstack(sv, parentframe === nothing ? topmost : parentframe) sig = newsig sparams = svec() end @@ -820,10 +819,11 @@ function abstract_call_builtin(interp::AbstractInterpreter, f::Builtin, fargs::U end end rt = builtin_tfunction(interp, f, argtypes[2:end], sv) - if f === getfield && isa(fargs, Vector{Any}) && la == 3 && isa(argtypes[3], Const) && isa(argtypes[3].val, Int) && argtypes[2] ⊑ Tuple + if f === getfield && isa(fargs, Vector{Any}) && la == 3 && + (a3 = argtypes[3]; isa(a3, Const)) && (idx = a3.val; isa(idx, Int)) && + (a2 = argtypes[2]; a2 ⊑ Tuple) # TODO: why doesn't this use the getfield_tfunc? - cti, _ = precise_container_type(interp, iterate, argtypes[2], sv) - idx = argtypes[3].val::Int + cti, _ = precise_container_type(interp, iterate, a2, sv) if 1 <= idx <= length(cti) rt = unwrapva(cti[idx]) end @@ -1006,14 +1006,16 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f), end argtypes = Any[typeof(<:), argtypes[3], argtypes[2]] return CallMeta(abstract_call_known(interp, <:, fargs, argtypes, sv).rt, false) - elseif la == 2 && isa(argtypes[2], Const) && isa(argtypes[2].val, SimpleVector) && istopfunction(f, :length) + elseif la == 2 && + (a2 = argtypes[2]; isa(a2, Const)) && (svecval = a2.val; isa(svecval, SimpleVector)) && + istopfunction(f, :length) # mark length(::SimpleVector) as @pure - return CallMeta(Const(length(argtypes[2].val)), MethodResultPure()) - elseif la == 3 && isa(argtypes[2], Const) && isa(argtypes[3], Const) && - isa(argtypes[2].val, SimpleVector) && isa(argtypes[3].val, Int) && istopfunction(f, :getindex) + return CallMeta(Const(length(svecval)), MethodResultPure()) + elseif la == 3 && + (a2 = argtypes[2]; isa(a2, Const)) && (svecval = a2.val; isa(svecval, SimpleVector)) && + (a3 = argtypes[3]; isa(a3, Const)) && (idx = a3.val; isa(idx, Int)) && + istopfunction(f, :getindex) # mark getindex(::SimpleVector, i::Int) as @pure - svecval = argtypes[2].val::SimpleVector - idx = argtypes[3].val::Int if 1 <= idx <= length(svecval) && isassigned(svecval, idx) return CallMeta(Const(getindex(svecval, idx)), MethodResultPure()) end From fd46fc65792756a050021c89241d8fb64797a50a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 15:04:11 -0500 Subject: [PATCH 173/239] fix REPL summary for types (#39358) * add more information to Module for docview `summarize(...)` * Add specialization for all Type types to docview `summarize(...)` Co-Authored-By: Jameson Nash Co-authored-by: m-j-w --- stdlib/REPL/src/docview.jl | 80 +++++++---- test/docs.jl | 283 ++++++++++++++++++++++++++++++++++++- 2 files changed, 328 insertions(+), 35 deletions(-) diff --git a/stdlib/REPL/src/docview.jl b/stdlib/REPL/src/docview.jl index dbdfaa3d0dd1a..9539e339345c3 100644 --- a/stdlib/REPL/src/docview.jl +++ b/stdlib/REPL/src/docview.jl @@ -264,44 +264,66 @@ function summarize(io::IO, λ::Function, binding::Binding) println(io, "```\n", methods(λ), "\n```") end -function summarize(io::IO, T::DataType, binding::Binding) +function summarize(io::IO, TT::Type, binding::Binding) println(io, "# Summary") - println(io, "```") - println(io, - T.abstract ? "abstract type" : - T.mutable ? "mutable struct" : - Base.isstructtype(T) ? "struct" : "primitive type", - " ", T, " <: ", supertype(T) - ) - println(io, "```") - if !T.abstract && T.name !== Tuple.name && !isempty(fieldnames(T)) - println(io, "# Fields") + T = Base.unwrap_unionall(TT) + if T isa DataType println(io, "```") - pad = maximum(length(string(f)) for f in fieldnames(T)) - for (f, t) in zip(fieldnames(T), T.types) - println(io, rpad(f, pad), " :: ", t) - end - println(io, "```") - end - if !isempty(subtypes(T)) - println(io, "# Subtypes") + print(io, + T.abstract ? "abstract type " : + T.mutable ? "mutable struct " : + Base.isstructtype(T) ? "struct " : + "primitive type ") + supert = supertype(T) + println(io, T) println(io, "```") - for t in subtypes(T) - println(io, t) + if !T.abstract && T.name !== Tuple.name && !isempty(fieldnames(T)) + println(io, "# Fields") + println(io, "```") + pad = maximum(length(string(f)) for f in fieldnames(T)) + for (f, t) in zip(fieldnames(T), T.types) + println(io, rpad(f, pad), " :: ", t) + end + println(io, "```") end - println(io, "```") - end - if supertype(T) != Any - println(io, "# Supertype Hierarchy") - println(io, "```") - Base.show_supertypes(io, T) - println(io) - println(io, "```") + subt = subtypes(TT) + if !isempty(subt) + println(io, "# Subtypes") + println(io, "```") + for t in subt + println(io, t) + end + println(io, "```") + end + if supert != Any + println(io, "# Supertype Hierarchy") + println(io, "```") + Base.show_supertypes(io, T) + println(io) + println(io, "```") + end + elseif T isa Union + println(io, "`", binding, "` is of type `", typeof(TT), "`.\n") + println(io, "# Union Composed of Types") + for T1 in Base.uniontypes(T) + println(io, " - `", Base.rewrap_unionall(T1, TT), "`") + end + else # unreachable? + println(io, "`", binding, "` is of type `", typeof(TT), "`.\n") end end function summarize(io::IO, m::Module, binding::Binding) println(io, "No docstring found for module `", m, "`.\n") + exports = filter!(!=(nameof(m)), names(m)) + if isempty(exports) + println(io, "Module does not export any names.") + else + println(io, "# Exported names:") + print(io, " `") + join(io, exports, "`, `") + println(io, "`") + end end function summarize(io::IO, @nospecialize(T), binding::Binding) diff --git a/test/docs.jl b/test/docs.jl index 4a36251ea43d1..eefd90a2443d6 100644 --- a/test/docs.jl +++ b/test/docs.jl @@ -17,7 +17,22 @@ function docstrings_equal(d1, d2) io2 = IOBuffer() show(io1, MIME"text/markdown"(), d1) show(io2, MIME"text/markdown"(), d2) - String(take!(io1)) == String(take!(io2)) + s1 = String(take!(io1)) + s2 = String(take!(io2)) + #if s1 != s2 # for debugging + # e1 = eachline(IOBuffer(s1)) + # e2 = eachline(IOBuffer(s2)) + # for (l1, l2) in zip(e1, e2) + # l1 == l2 || println(l1, "\n", l2, "\n") + # end + # for l1 in e1 + # println(l1, "\n[missing]\n") + # end + # for l2 in e2 + # println("[missing]\n", l2, "\n") + # end + #end + return s1 == s2 end docstrings_equal(d1::DocStr, d2) = docstrings_equal(parsedoc(d1), d2) @@ -794,6 +809,8 @@ let err = try; @macroexpand(@doc "" f() = @x); false; catch ex; ex; end module Undocumented +export A, B, C, at0, pt2 + abstract type A end abstract type B <: A end @@ -805,13 +822,56 @@ struct D <: B three::Float64 end +abstract type at0{T<:Number,N} end +abstract type at1{T>:Integer,N} <:at0{T,N} end + +const at_ = at0{Int64} + +primitive type pt2{T<:Number,N,A>:Integer} <:at0{T,N} 32 end + +struct st3{T<:Integer,N} <: at0{T,N} + a::NTuple{N,T} + b::Array{Int64,N} + c::Int64 +end + +struct st4{T,N} <: at0{T,N} + a::T + b::NTuple{N,T} +end + +struct st5{T>:Int64,N} <:at1{T,N} + c::st3{T,N} +end + +mutable struct mt6{T<:Integer,N} <:at1{T,N} + d::st5{T,N} +end + +const ut7 = Union{st5, mt6} + +const ut8 = Union{at1, pt2, st3, st4} + +const ut9{T} = Union{at1{T}, pt2{T}, st3{T}, st4{T}} + f = () -> nothing undocumented() = 1 undocumented(x) = 2 undocumented(x,y) = 3 -end +end # module + +doc_str = Markdown.parse(""" +No documentation found. + +No docstring found for module `$(curmod_prefix)Undocumented`. + +# Exported names: + +`A`, `B`, `C`, `at0`, `pt2` +""") +@test docstrings_equal(@doc(Undocumented), doc"$doc_str") doc_str = Markdown.parse(""" No documentation found. @@ -825,7 +885,7 @@ No documentation found. # Summary ``` -abstract type $(curmod_prefix)Undocumented.A <: Any +abstract type $(curmod_prefix)Undocumented.A ``` # Subtypes @@ -841,7 +901,7 @@ No documentation found. # Summary ``` -abstract type $(curmod_prefix)Undocumented.B <: $(curmod_prefix)Undocumented.A +abstract type $(curmod_prefix)Undocumented.B ``` # Subtypes @@ -861,7 +921,7 @@ No documentation found. # Summary ``` -mutable struct $(curmod_prefix)Undocumented.C <: $(curmod_prefix)Undocumented.A +mutable struct $(curmod_prefix)Undocumented.C ``` # Supertype Hierarchy @@ -876,7 +936,7 @@ No documentation found. # Summary ``` -struct $(curmod_prefix)Undocumented.D <: $(curmod_prefix)Undocumented.B +struct $(curmod_prefix)Undocumented.D ``` # Fields @@ -893,6 +953,217 @@ $(curmod_prefix)Undocumented.D <: $(curmod_prefix)Undocumented.B <: $(curmod_pre """) @test docstrings_equal(@doc(Undocumented.D), doc"$doc_str") +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +abstract type $(curmod_prefix)Undocumented.at0{T<:Number, N} +``` + +# Subtypes + +``` +$(curmod_prefix)Undocumented.at1{T, N} where N where Integer<:T<:Number +$(curmod_prefix)Undocumented.pt2 +$(curmod_prefix)Undocumented.st3 +$(curmod_prefix)Undocumented.st4{T, N} where N where T<:Number +``` +""") +@test docstrings_equal(@doc(Undocumented.at0), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +abstract type $(curmod_prefix)Undocumented.at1{T>:Integer, N} +``` + +# Subtypes + +``` +$(curmod_prefix)Undocumented.mt6{Integer, N} where N +``` + +# Supertype Hierarchy +``` +$(curmod_prefix)Undocumented.at1{T>:Integer, N} <: $(curmod_prefix)Undocumented.at0{T>:Integer, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.at1), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +abstract type $(curmod_prefix)Undocumented.at0{Int64, N} +``` + +# Subtypes + +``` +$(curmod_prefix)Undocumented.pt2{Int64, N, A} where A>:Integer where N +$(curmod_prefix)Undocumented.st3{Int64, N} where N +$(curmod_prefix)Undocumented.st4{Int64, N} where N +``` +""") +@test docstrings_equal(@doc(Undocumented.at_), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +primitive type $(curmod_prefix)Undocumented.pt2{T<:Number, N, A>:Integer} +``` + +# Supertype Hierarchy + +``` +$(curmod_prefix)Undocumented.pt2{T<:Number, N, A>:Integer} <: $(curmod_prefix)Undocumented.at0{T<:Number, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.pt2), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +struct $(curmod_prefix)Undocumented.st3{T<:Integer, N} +``` + +# Fields +``` +a :: Tuple{Vararg{T<:Integer, N}} +b :: Array{Int64, N} +c :: Int64 +``` + +# Supertype Hierarchy +``` +$(curmod_prefix)Undocumented.st3{T<:Integer, N} <: $(curmod_prefix)Undocumented.at0{T<:Integer, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.st3), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +struct $(curmod_prefix)Undocumented.st4{T, N} +``` + +# Fields +``` +a :: T +b :: Tuple{Vararg{T, N}} +``` + +# Supertype Hierarchy +``` +$(curmod_prefix)Undocumented.st4{T, N} <: $(curmod_prefix)Undocumented.at0{T, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.st4), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +struct $(curmod_prefix)Undocumented.st5{T>:Int64, N} +``` + +# Fields +``` +c :: $(curmod_prefix)Undocumented.st3{T>:Int64, N} +``` + +# Supertype Hierarchy +``` +$(curmod_prefix)Undocumented.st5{T>:Int64, N} <: $(curmod_prefix)Undocumented.at1{T>:Int64, N} <: $(curmod_prefix)Undocumented.at0{T>:Int64, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.st5), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +``` +mutable struct $(curmod_prefix)Undocumented.mt6{T<:Integer, N} +``` + +# Fields +``` +d :: $(curmod_prefix)Undocumented.st5{T<:Integer, N} +``` + +# Supertype Hierarchy +``` +$(curmod_prefix)Undocumented.mt6{T<:Integer, N} <: $(curmod_prefix)Undocumented.at1{T<:Integer, N} <: $(curmod_prefix)Undocumented.at0{T<:Integer, N} <: Any +``` +""") +@test docstrings_equal(@doc(Undocumented.mt6), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +`$(curmod_prefix)Undocumented.ut7` is of type `Union`. + +# Union Composed of Types + + - `$(curmod_prefix)Undocumented.mt6` + - `$(curmod_prefix)Undocumented.st5` +""") +@test docstrings_equal(@doc(Undocumented.ut7), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +`$(curmod_prefix)Undocumented.ut8` is of type `Union`. + +# Union Composed of Types + + - `$(curmod_prefix)Undocumented.at1` + - `$(curmod_prefix)Undocumented.pt2` + - `$(curmod_prefix)Undocumented.st3` + - `$(curmod_prefix)Undocumented.st4` +""") +@test docstrings_equal(@doc(Undocumented.ut8), doc"$doc_str") + +doc_str = Markdown.parse(""" +No documentation found. + +# Summary + +`$(curmod_prefix)Undocumented.ut9` is of type `UnionAll`. + +# Union Composed of Types + + - `$(curmod_prefix)Undocumented.at1{T, N} where N where T` + - `$(curmod_prefix)Undocumented.pt2{T, N, A} where A>:Integer where N where T` + - `$(curmod_prefix)Undocumented.st3{T, N} where N where T` + - `$(curmod_prefix)Undocumented.st4` +""") +@test docstrings_equal(@doc(Undocumented.ut9), doc"$doc_str") + let d = @doc(Undocumented.f) io = IOBuffer() show(io, MIME"text/markdown"(), d) From f31ef767ef9cb0eb1de04d23e2e9e1ac765869b3 Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Mon, 25 Jan 2021 15:06:01 -0500 Subject: [PATCH 174/239] Fix #39367, doc for inbounds use each index (#39369) --- base/essentials.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/essentials.jl b/base/essentials.jl index bbba482b84974..ec113c39fa764 100644 --- a/base/essentials.jl +++ b/base/essentials.jl @@ -540,7 +540,7 @@ element `i` of array `A` is skipped to improve performance. ```julia function sum(A::AbstractArray) r = zero(eltype(A)) - for i = 1:length(A) + for i in eachindex(A) @inbounds r += A[i] end return r From debf26e33ee249a3c9105a09644be6cb1d140977 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 26 Jan 2021 01:44:45 +0100 Subject: [PATCH 175/239] Add basic docs for (Lazy)Artifacts stdlibs (#39073) --- stdlib/Artifacts/docs/src/index.md | 21 +++++++++++++++++++++ stdlib/Artifacts/src/Artifacts.jl | 4 ++-- stdlib/LazyArtifacts/docs/src/index.md | 10 ++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 stdlib/Artifacts/docs/src/index.md create mode 100644 stdlib/LazyArtifacts/docs/src/index.md diff --git a/stdlib/Artifacts/docs/src/index.md b/stdlib/Artifacts/docs/src/index.md new file mode 100644 index 0000000000000..80f4c62cbf77f --- /dev/null +++ b/stdlib/Artifacts/docs/src/index.md @@ -0,0 +1,21 @@ +# Artifacts + +```@meta +DocTestSetup = :(using Artifacts) +``` + +Starting with Julia 1.6, the artifacts support has moved from `Pkg.jl` to Julia itself. +Until proper documentation can be added here, you can learn more about artifacts in the +`Pkg.jl` manual at . + +!!! compat "Julia 1.6" + Julia's artifacts API requires at least Julia 1.6. In Julia + versions 1.3 to 1.5, you can use `Pkg.Artifacts` instead. + + +```@docs +Artifacts.artifact_meta +Artifacts.artifact_hash +Artifacts.find_artifacts_toml +Artifacts.@artifact_str +``` diff --git a/stdlib/Artifacts/src/Artifacts.jl b/stdlib/Artifacts/src/Artifacts.jl index 626e480377bb8..fd65494782d92 100644 --- a/stdlib/Artifacts/src/Artifacts.jl +++ b/stdlib/Artifacts/src/Artifacts.jl @@ -551,7 +551,7 @@ function _artifact_str(__module__, artifacts_toml, name, path_tail, artifact_dic error("Artifact $(repr(name)) was not installed correctly. Try `using Pkg; Pkg.instantiate()` to re-install all missing resources.") end -""" +raw""" split_artifact_slash(name::String) Splits an artifact indexing string by path deliminters, isolates the first path element, @@ -559,7 +559,7 @@ returning that and the `joinpath()` of the remaining arguments. This normalizes separators to the native path separator for the current platform. Examples: # Examples -```jldoctest +```jldoctest; setup = :(using Artifacts: split_artifact_slash) julia> split_artifact_slash("Foo") ("Foo", "") diff --git a/stdlib/LazyArtifacts/docs/src/index.md b/stdlib/LazyArtifacts/docs/src/index.md new file mode 100644 index 0000000000000..9de6b219c6988 --- /dev/null +++ b/stdlib/LazyArtifacts/docs/src/index.md @@ -0,0 +1,10 @@ +# Lazy Artifacts + +```@meta +DocTestSetup = :(using LazyArtifacts) +``` + +In order for a package to download artifacts lazily, `LazyArtifacts` must be +explicitly listed as a dependency of that package. + +For further information on artifacts, see [Artifacts](@ref). From 3ea80fb6421417c11af8517a6fc4ea6e90496327 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 25 Jan 2021 19:46:14 -0500 Subject: [PATCH 176/239] Add a macro to opt into aggressive constprop (#38080) Right now aggressive constprop is essentially tied to the inlining threshold (or to their name being `getproperty` or `setproperty!` respectively, which can be both somewhat brittle if the inlining cost changes and insufficient when you do really know that const prop would be beneficial even if the function is not inlineable. This adds a simple macro that can be used to manually annotate methods to force aggressive constprop on them. --- base/compiler/abstractinterpretation.jl | 2 +- base/expr.jl | 13 +++++++++++++ src/ast.c | 2 ++ src/dump.c | 2 ++ src/ircode.c | 4 +++- src/jltypes.c | 18 +++++++++++------- src/julia.h | 2 ++ src/julia_internal.h | 1 + src/method.c | 3 +++ stdlib/Serialization/src/Serialization.jl | 19 +++++++++++++++++-- test/compiler/inference.jl | 12 ++++++++++++ 11 files changed, 67 insertions(+), 11 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 3ddefadaf5146..63ea8bba739d8 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -288,7 +288,7 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, @nosp istopfunction(f, :<<) || istopfunction(f, :>>)) return Any end - force_inference = allconst || InferenceParams(interp).aggressive_constant_propagation + force_inference = allconst || method.aggressive_constprop || InferenceParams(interp).aggressive_constant_propagation if istopfunction(f, :getproperty) || istopfunction(f, :setproperty!) force_inference = true end diff --git a/base/expr.jl b/base/expr.jl index ff5e92005b8dd..38a1c4e7089cb 100644 --- a/base/expr.jl +++ b/base/expr.jl @@ -242,6 +242,19 @@ macro pure(ex) esc(isa(ex, Expr) ? pushmeta!(ex, :pure) : ex) end +""" + @aggressive_constprop ex + @aggressive_constprop(ex) + +`@aggressive_constprop` requests more aggressive interprocedural constant +propagation for the annotated function. For a method where the return type +depends on the value of the arguments, this can yield improved inference results +at the cost of additional compile time. +""" +macro aggressive_constprop(ex) + esc(isa(ex, Expr) ? pushmeta!(ex, :aggressive_constprop) : ex) +end + """ @propagate_inbounds diff --git a/src/ast.c b/src/ast.c index 1206db9f7bb8f..633adb6db4a49 100644 --- a/src/ast.c +++ b/src/ast.c @@ -58,6 +58,7 @@ jl_sym_t *static_parameter_sym; jl_sym_t *inline_sym; jl_sym_t *noinline_sym; jl_sym_t *generated_sym; jl_sym_t *generated_only_sym; jl_sym_t *isdefined_sym; jl_sym_t *propagate_inbounds_sym; jl_sym_t *specialize_sym; +jl_sym_t *aggressive_constprop_sym; jl_sym_t *nospecialize_sym; jl_sym_t *macrocall_sym; jl_sym_t *colon_sym; jl_sym_t *hygienicscope_sym; jl_sym_t *throw_undef_if_not_sym; jl_sym_t *getfield_undefref_sym; @@ -385,6 +386,7 @@ void jl_init_common_symbols(void) noinline_sym = jl_symbol("noinline"); polly_sym = jl_symbol("polly"); propagate_inbounds_sym = jl_symbol("propagate_inbounds"); + aggressive_constprop_sym = jl_symbol("aggressive_constprop"); isdefined_sym = jl_symbol("isdefined"); nospecialize_sym = jl_symbol("nospecialize"); specialize_sym = jl_symbol("specialize"); diff --git a/src/dump.c b/src/dump.c index 3cecd0befa002..591dc3434ec91 100644 --- a/src/dump.c +++ b/src/dump.c @@ -594,6 +594,7 @@ static void jl_serialize_value_(jl_serializer_state *s, jl_value_t *v, int as_li write_int8(s->s, m->isva); write_int8(s->s, m->pure); write_int8(s->s, m->is_for_opaque_closure); + write_int8(s->s, m->aggressive_constprop); jl_serialize_value(s, (jl_value_t*)m->slot_syms); jl_serialize_value(s, (jl_value_t*)m->roots); jl_serialize_value(s, (jl_value_t*)m->ccallable); @@ -1442,6 +1443,7 @@ static jl_value_t *jl_deserialize_value_method(jl_serializer_state *s, jl_value_ m->isva = read_int8(s->s); m->pure = read_int8(s->s); m->is_for_opaque_closure = read_int8(s->s); + m->aggressive_constprop = read_int8(s->s); m->slot_syms = jl_deserialize_value(s, (jl_value_t**)&m->slot_syms); jl_gc_wb(m, m->slot_syms); m->roots = (jl_array_t*)jl_deserialize_value(s, (jl_value_t**)&m->roots); diff --git a/src/ircode.c b/src/ircode.c index 5ce8d806691db..da78a3a8a327a 100644 --- a/src/ircode.c +++ b/src/ircode.c @@ -702,7 +702,8 @@ JL_DLLEXPORT jl_array_t *jl_compress_ir(jl_method_t *m, jl_code_info_t *code) jl_get_ptls_states() }; - uint8_t flags = (code->inferred << 3) + uint8_t flags = (code->aggressive_constprop << 4) + | (code->inferred << 3) | (code->inlineable << 2) | (code->propagate_inbounds << 1) | (code->pure << 0); @@ -787,6 +788,7 @@ JL_DLLEXPORT jl_code_info_t *jl_uncompress_ir(jl_method_t *m, jl_code_instance_t jl_code_info_t *code = jl_new_code_info_uninit(); uint8_t flags = read_uint8(s.s); + code->aggressive_constprop = !!(flags & (1 << 4)); code->inferred = !!(flags & (1 << 3)); code->inlineable = !!(flags & (1 << 2)); code->propagate_inbounds = !!(flags & (1 << 1)); diff --git a/src/jltypes.c b/src/jltypes.c index 4a5efa845f465..cb853ce2c521c 100644 --- a/src/jltypes.c +++ b/src/jltypes.c @@ -2150,7 +2150,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_code_info_type = jl_new_datatype(jl_symbol("CodeInfo"), core, jl_any_type, jl_emptysvec, - jl_perm_symsvec(18, + jl_perm_symsvec(19, "code", "codelocs", "ssavaluetypes", @@ -2168,8 +2168,9 @@ void jl_init_types(void) JL_GC_DISABLED "inferred", "inlineable", "propagate_inbounds", - "pure"), - jl_svec(18, + "pure", + "aggressive_constprop"), + jl_svec(19, jl_array_any_type, jl_array_int32_type, jl_any_type, @@ -2187,13 +2188,14 @@ void jl_init_types(void) JL_GC_DISABLED jl_bool_type, jl_bool_type, jl_bool_type, + jl_bool_type, jl_bool_type), - 0, 1, 18); + 0, 1, 19); jl_method_type = jl_new_datatype(jl_symbol("Method"), core, jl_any_type, jl_emptysvec, - jl_perm_symsvec(23, + jl_perm_symsvec(24, "name", "module", "file", @@ -2216,8 +2218,9 @@ void jl_init_types(void) JL_GC_DISABLED "nkw", "isva", "pure", - "is_for_opaque_closure"), - jl_svec(23, + "is_for_opaque_closure", + "aggressive_constprop"), + jl_svec(24, jl_symbol_type, jl_module_type, jl_symbol_type, @@ -2240,6 +2243,7 @@ void jl_init_types(void) JL_GC_DISABLED jl_int32_type, jl_bool_type, jl_bool_type, + jl_bool_type, jl_bool_type), 0, 1, 10); diff --git a/src/julia.h b/src/julia.h index 6191ec92e6d0d..98a1a8a2d4959 100644 --- a/src/julia.h +++ b/src/julia.h @@ -288,6 +288,7 @@ typedef struct _jl_code_info_t { uint8_t inlineable; uint8_t propagate_inbounds; uint8_t pure; + uint8_t aggressive_constprop; } jl_code_info_t; // This type describes a single method definition, and stores data @@ -328,6 +329,7 @@ typedef struct _jl_method_t { uint8_t isva; uint8_t pure; uint8_t is_for_opaque_closure; + uint8_t aggressive_constprop; // hidden fields: // lock for modifications to the method diff --git a/src/julia_internal.h b/src/julia_internal.h index 19dc2bd47bb87..52d45bf177c46 100644 --- a/src/julia_internal.h +++ b/src/julia_internal.h @@ -1289,6 +1289,7 @@ extern jl_sym_t *static_parameter_sym; extern jl_sym_t *inline_sym; extern jl_sym_t *noinline_sym; extern jl_sym_t *generated_sym; extern jl_sym_t *generated_only_sym; extern jl_sym_t *isdefined_sym; extern jl_sym_t *propagate_inbounds_sym; extern jl_sym_t *specialize_sym; +extern jl_sym_t *aggressive_constprop_sym; extern jl_sym_t *nospecialize_sym; extern jl_sym_t *macrocall_sym; extern jl_sym_t *colon_sym; extern jl_sym_t *hygienicscope_sym; extern jl_sym_t *throw_undef_if_not_sym; extern jl_sym_t *getfield_undefref_sym; diff --git a/src/method.c b/src/method.c index c4a686eb26e9d..a582a6468a620 100644 --- a/src/method.c +++ b/src/method.c @@ -269,6 +269,8 @@ static void jl_code_info_set_ir(jl_code_info_t *li, jl_expr_t *ir) li->inlineable = 1; else if (ma == (jl_value_t*)propagate_inbounds_sym) li->propagate_inbounds = 1; + else if (ma == (jl_value_t*)aggressive_constprop_sym) + li->aggressive_constprop = 1; else jl_array_ptr_set(meta, ins++, ma); } @@ -528,6 +530,7 @@ static void jl_method_set_source(jl_method_t *m, jl_code_info_t *src) } m->called = called; m->pure = src->pure; + m->aggressive_constprop = src->aggressive_constprop; jl_add_function_name_to_lineinfo(src, (jl_value_t*)m->name); jl_array_t *copy = NULL; diff --git a/stdlib/Serialization/src/Serialization.jl b/stdlib/Serialization/src/Serialization.jl index cf425566b54c6..f28c95a3b8b3f 100644 --- a/stdlib/Serialization/src/Serialization.jl +++ b/stdlib/Serialization/src/Serialization.jl @@ -22,7 +22,8 @@ mutable struct Serializer{I<:IO} <: AbstractSerializer table::IdDict{Any,Any} pending_refs::Vector{Int} known_object_data::Dict{UInt64,Any} - Serializer{I}(io::I) where I<:IO = new(io, 0, IdDict(), Int[], Dict{UInt64,Any}()) + version::Int + Serializer{I}(io::I) where I<:IO = new(io, 0, IdDict(), Int[], Dict{UInt64,Any}(), ser_version) end Serializer(io::IO) = Serializer{typeof(io)}(io) @@ -78,7 +79,10 @@ const TAGS = Any[ @assert length(TAGS) == 255 -const ser_version = 13 # do not make changes without bumping the version #! +const ser_version = 14 # do not make changes without bumping the version #! + +format_version(::AbstractSerializer) = ser_version +format_version(s::Serializer) = s.version const NTAGS = length(TAGS) @@ -414,6 +418,7 @@ function serialize(s::AbstractSerializer, meth::Method) serialize(s, meth.nargs) serialize(s, meth.isva) serialize(s, meth.is_for_opaque_closure) + serialize(s, meth.aggressive_constprop) if isdefined(meth, :source) serialize(s, Base._uncompressed_ast(meth, meth.source)) else @@ -717,6 +722,8 @@ function readheader(s::AbstractSerializer) error("""Cannot read stream serialized with a newer version of Julia. Got data version $version > current version $ser_version""") end + s.version = version + return end """ @@ -988,9 +995,13 @@ function deserialize(s::AbstractSerializer, ::Type{Method}) nargs = deserialize(s)::Int32 isva = deserialize(s)::Bool is_for_opaque_closure = false + aggressive_constprop = false template_or_is_opaque = deserialize(s) if isa(template_or_is_opaque, Bool) is_for_opaque_closure = template_or_is_opaque + if format_version(s) >= 14 + aggressive_constprop = deserialize(s)::Bool + end template = deserialize(s) else template = template_or_is_opaque @@ -1005,6 +1016,7 @@ function deserialize(s::AbstractSerializer, ::Type{Method}) meth.nargs = nargs meth.isva = isva meth.is_for_opaque_closure = is_for_opaque_closure + meth.aggressive_constprop = aggressive_constprop if template !== nothing # TODO: compress template meth.source = template::CodeInfo @@ -1125,6 +1137,9 @@ function deserialize(s::AbstractSerializer, ::Type{CodeInfo}) ci.inlineable = deserialize(s) ci.propagate_inbounds = deserialize(s) ci.pure = deserialize(s) + if format_version(s) >= 14 + ci.aggressive_constprop = deserialize(s)::Bool + end return ci end diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 062d8c81cf776..a7d94629e55f8 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3011,3 +3011,15 @@ g38888() = S38888(Base.inferencebarrier(3), nothing) f_inf_error_bottom(x::Vector) = isempty(x) ? error(x[1]) : x @test Core.Compiler.return_type(f_inf_error_bottom, Tuple{Vector{Any}}) == Vector{Any} + +# @aggressive_constprop +@noinline g_nonaggressive(y, x) = Val{x}() +@noinline @Base.aggressive_constprop g_aggressive(y, x) = Val{x}() + +f_nonaggressive(x) = g_nonaggressive(x, 1) +f_aggressive(x) = g_aggressive(x, 1) + +# The first test just makes sure that improvements to the compiler don't +# render the annotation effectless. +@test Base.return_types(f_nonaggressive, Tuple{Int})[1] == Val +@test Base.return_types(f_aggressive, Tuple{Int})[1] == Val{1} From 8631089e5dc0d82b1247c9ef6bbc5073adca713e Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 19 Jan 2021 19:56:19 -0500 Subject: [PATCH 177/239] replace PPC half patch --- deps/llvm.mk | 3 +- .../llvm-11-D94058-sext-atomic-ops.patch | 1201 +++++++++++++++++ .../llvm-11-D94828-ppc-half-fpconv.patch | 102 -- deps/patches/llvm-11-D94980-CTR-half.patch | 398 ++++++ 4 files changed, 1601 insertions(+), 103 deletions(-) create mode 100644 deps/patches/llvm-11-D94058-sext-atomic-ops.patch delete mode 100644 deps/patches/llvm-11-D94828-ppc-half-fpconv.patch create mode 100644 deps/patches/llvm-11-D94980-CTR-half.patch diff --git a/deps/llvm.mk b/deps/llvm.mk index 729e7867565fd..c3a3c0b4208c1 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -544,8 +544,9 @@ $(eval $(call LLVM_PATCH,llvm-11-D93154-globalisel-as)) $(eval $(call LLVM_PATCH,llvm-11-ppc-half-ctr)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-11-ppc-sp-from-bp)) # remove for LLVM 12 $(eval $(call LLVM_PATCH,llvm-rGb498303066a6-gcc11-header-fix)) # remove for LLVM 12 -$(eval $(call LLVM_PATCH,llvm-11-D94828-ppc-half-fpconv)) $(eval $(call LLVM_PATCH,llvm-11-D94813-mergeicmps)) +$(eval $(call LLVM_PATCH,llvm-11-D94980-CTR-half)) +$(eval $(call LLVM_PATCH,llvm-11-D94058-sext-atomic-ops)) # remove for LLVM 12 endif # LLVM_VER 11.0 diff --git a/deps/patches/llvm-11-D94058-sext-atomic-ops.patch b/deps/patches/llvm-11-D94058-sext-atomic-ops.patch new file mode 100644 index 0000000000000..732ae2b2b143a --- /dev/null +++ b/deps/patches/llvm-11-D94058-sext-atomic-ops.patch @@ -0,0 +1,1201 @@ +From b46706e1d5307d98a5a4895380f91380a0987ded Mon Sep 17 00:00:00 2001 +From: Nemanja Ivanovic +Date: Mon, 18 Jan 2021 21:19:11 -0600 +Subject: [PATCH] [PowerPC] Sign extend comparison operand for signed atomic + comparisons + +As of 8dacca943af8a53a23b1caf3142d10fb4a77b645, we sign extend the atomic loaded +operand for signed subword comparisons. However, the assumption that the other +operand is correctly sign extended doesn't always hold. This patch sign extends +the other operand if it needs to be sign extended. + +This is a second fix for https://bugs.llvm.org/show_bug.cgi?id=30451 + +Differential revision: https://reviews.llvm.org/D94058 +--- + llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 79 +++- + .../CodeGen/PowerPC/atomics-regression.ll | 440 ++++++++++-------- + llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll | 105 +++++ + 3 files changed, 418 insertions(+), 206 deletions(-) + create mode 100644 llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll + +diff --git llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/PowerPC/PPCISelLowering.cpp +index f54f1673526d..867ef24ea53b 100644 +--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp ++++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp +@@ -11444,17 +11444,88 @@ PPCTargetLowering::EmitAtomicBinary(MachineInstr &MI, MachineBasicBlock *BB, + return BB; + } + ++static bool isSignExtended(MachineInstr &MI, const PPCInstrInfo *TII) { ++ switch(MI.getOpcode()) { ++ default: ++ return false; ++ case PPC::COPY: ++ return TII->isSignExtended(MI); ++ case PPC::LHA: ++ case PPC::LHA8: ++ case PPC::LHAU: ++ case PPC::LHAU8: ++ case PPC::LHAUX: ++ case PPC::LHAUX8: ++ case PPC::LHAX: ++ case PPC::LHAX8: ++ case PPC::LWA: ++ case PPC::LWAUX: ++ case PPC::LWAX: ++ case PPC::LWAX_32: ++ case PPC::LWA_32: ++ case PPC::PLHA: ++ case PPC::PLHA8: ++ case PPC::PLHA8pc: ++ case PPC::PLHApc: ++ case PPC::PLWA: ++ case PPC::PLWA8: ++ case PPC::PLWA8pc: ++ case PPC::PLWApc: ++ case PPC::EXTSB: ++ case PPC::EXTSB8: ++ case PPC::EXTSB8_32_64: ++ case PPC::EXTSB8_rec: ++ case PPC::EXTSB_rec: ++ case PPC::EXTSH: ++ case PPC::EXTSH8: ++ case PPC::EXTSH8_32_64: ++ case PPC::EXTSH8_rec: ++ case PPC::EXTSH_rec: ++ case PPC::EXTSW: ++ case PPC::EXTSWSLI: ++ case PPC::EXTSWSLI_32_64: ++ case PPC::EXTSWSLI_32_64_rec: ++ case PPC::EXTSWSLI_rec: ++ case PPC::EXTSW_32: ++ case PPC::EXTSW_32_64: ++ case PPC::EXTSW_32_64_rec: ++ case PPC::EXTSW_rec: ++ case PPC::SRAW: ++ case PPC::SRAWI: ++ case PPC::SRAWI_rec: ++ case PPC::SRAW_rec: ++ return true; ++ } ++ return false; ++} ++ + MachineBasicBlock *PPCTargetLowering::EmitPartwordAtomicBinary( + MachineInstr &MI, MachineBasicBlock *BB, + bool is8bit, // operation + unsigned BinOpcode, unsigned CmpOpcode, unsigned CmpPred) const { ++ // This also handles ATOMIC_SWAP, indicated by BinOpcode==0. ++ const PPCInstrInfo *TII = Subtarget.getInstrInfo(); ++ ++ // If this is a signed comparison and the value being compared is not known ++ // to be sign extended, sign extend it here. ++ DebugLoc dl = MI.getDebugLoc(); ++ MachineFunction *F = BB->getParent(); ++ MachineRegisterInfo &RegInfo = F->getRegInfo(); ++ Register incr = MI.getOperand(3).getReg(); ++ bool IsSignExtended = Register::isVirtualRegister(incr) && ++ isSignExtended(*RegInfo.getVRegDef(incr), TII); ++ ++ if (CmpOpcode == PPC::CMPW && !IsSignExtended) { ++ Register ValueReg = RegInfo.createVirtualRegister(&PPC::GPRCRegClass); ++ BuildMI(*BB, MI, dl, TII->get(is8bit ? PPC::EXTSB : PPC::EXTSH), ValueReg) ++ .addReg(MI.getOperand(3).getReg()); ++ MI.getOperand(3).setReg(ValueReg); ++ } + // If we support part-word atomic mnemonics, just use them + if (Subtarget.hasPartwordAtomics()) + return EmitAtomicBinary(MI, BB, is8bit ? 1 : 2, BinOpcode, CmpOpcode, + CmpPred); + +- // This also handles ATOMIC_SWAP, indicated by BinOpcode==0. +- const TargetInstrInfo *TII = Subtarget.getInstrInfo(); + // In 64 bit mode we have to use 64 bits for addresses, even though the + // lwarx/stwcx are 32 bits. With the 32-bit atomics we can use address + // registers without caring whether they're 32 or 64, but here we're +@@ -11464,14 +11535,11 @@ MachineBasicBlock *PPCTargetLowering::EmitPartwordAtomicBinary( + unsigned ZeroReg = is64bit ? PPC::ZERO8 : PPC::ZERO; + + const BasicBlock *LLVM_BB = BB->getBasicBlock(); +- MachineFunction *F = BB->getParent(); + MachineFunction::iterator It = ++BB->getIterator(); + + Register dest = MI.getOperand(0).getReg(); + Register ptrA = MI.getOperand(1).getReg(); + Register ptrB = MI.getOperand(2).getReg(); +- Register incr = MI.getOperand(3).getReg(); +- DebugLoc dl = MI.getDebugLoc(); + + MachineBasicBlock *loopMBB = F->CreateMachineBasicBlock(LLVM_BB); + MachineBasicBlock *loop2MBB = +@@ -11485,7 +11553,6 @@ MachineBasicBlock *PPCTargetLowering::EmitPartwordAtomicBinary( + std::next(MachineBasicBlock::iterator(MI)), BB->end()); + exitMBB->transferSuccessorsAndUpdatePHIs(BB); + +- MachineRegisterInfo &RegInfo = F->getRegInfo(); + const TargetRegisterClass *RC = + is64bit ? &PPC::G8RCRegClass : &PPC::GPRCRegClass; + const TargetRegisterClass *GPRC = &PPC::GPRCRegClass; +diff --git llvm/test/CodeGen/PowerPC/atomics-regression.ll llvm/test/CodeGen/PowerPC/atomics-regression.ll +index ae79f82e1e06..3b7caeee91e4 100644 +--- llvm/test/CodeGen/PowerPC/atomics-regression.ll ++++ llvm/test/CodeGen/PowerPC/atomics-regression.ll +@@ -4352,16 +4352,17 @@ define i64 @test259(i64* %ptr, i64 %val) { + define i8 @test260(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test260: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB260_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB260_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB260_1 + ; PPC64LE-NEXT: .LBB260_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val monotonic + ret i8 %ret +@@ -4370,16 +4371,17 @@ define i8 @test260(i8* %ptr, i8 %val) { + define i8 @test261(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test261: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB261_1: +-; PPC64LE-NEXT: lbarx 3, 0, 5 +-; PPC64LE-NEXT: extsb 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB261_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 5 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB261_1 + ; PPC64LE-NEXT: .LBB261_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val acquire +@@ -4389,17 +4391,18 @@ define i8 @test261(i8* %ptr, i8 %val) { + define i8 @test262(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test262: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB262_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB262_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB262_1 + ; PPC64LE-NEXT: .LBB262_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val release + ret i8 %ret +@@ -4408,17 +4411,18 @@ define i8 @test262(i8* %ptr, i8 %val) { + define i8 @test263(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test263: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB263_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB263_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB263_1 + ; PPC64LE-NEXT: .LBB263_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val acq_rel +@@ -4428,17 +4432,18 @@ define i8 @test263(i8* %ptr, i8 %val) { + define i8 @test264(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test264: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB264_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB264_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB264_1 + ; PPC64LE-NEXT: .LBB264_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val seq_cst +@@ -4448,16 +4453,17 @@ define i8 @test264(i8* %ptr, i8 %val) { + define i16 @test265(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test265: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB265_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB265_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB265_1 + ; PPC64LE-NEXT: .LBB265_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val monotonic + ret i16 %ret +@@ -4466,16 +4472,17 @@ define i16 @test265(i16* %ptr, i16 %val) { + define i16 @test266(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test266: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB266_1: +-; PPC64LE-NEXT: lharx 3, 0, 5 +-; PPC64LE-NEXT: extsh 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB266_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 5 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB266_1 + ; PPC64LE-NEXT: .LBB266_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val acquire +@@ -4485,17 +4492,18 @@ define i16 @test266(i16* %ptr, i16 %val) { + define i16 @test267(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test267: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB267_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB267_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB267_1 + ; PPC64LE-NEXT: .LBB267_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val release + ret i16 %ret +@@ -4504,17 +4512,18 @@ define i16 @test267(i16* %ptr, i16 %val) { + define i16 @test268(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test268: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB268_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB268_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB268_1 + ; PPC64LE-NEXT: .LBB268_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val acq_rel +@@ -4524,17 +4533,18 @@ define i16 @test268(i16* %ptr, i16 %val) { + define i16 @test269(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test269: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB269_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB269_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB269_1 + ; PPC64LE-NEXT: .LBB269_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val seq_cst +@@ -4726,16 +4736,17 @@ define i64 @test279(i64* %ptr, i64 %val) { + define i8 @test280(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test280: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB280_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB280_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB280_1 + ; PPC64LE-NEXT: .LBB280_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val monotonic + ret i8 %ret +@@ -4744,16 +4755,17 @@ define i8 @test280(i8* %ptr, i8 %val) { + define i8 @test281(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test281: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB281_1: +-; PPC64LE-NEXT: lbarx 3, 0, 5 +-; PPC64LE-NEXT: extsb 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB281_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 5 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB281_1 + ; PPC64LE-NEXT: .LBB281_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val acquire +@@ -4763,17 +4775,18 @@ define i8 @test281(i8* %ptr, i8 %val) { + define i8 @test282(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test282: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB282_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB282_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB282_1 + ; PPC64LE-NEXT: .LBB282_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val release + ret i8 %ret +@@ -4782,17 +4795,18 @@ define i8 @test282(i8* %ptr, i8 %val) { + define i8 @test283(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test283: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB283_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB283_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB283_1 + ; PPC64LE-NEXT: .LBB283_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val acq_rel +@@ -4802,17 +4816,18 @@ define i8 @test283(i8* %ptr, i8 %val) { + define i8 @test284(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test284: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB284_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB284_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB284_1 + ; PPC64LE-NEXT: .LBB284_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val seq_cst +@@ -4822,16 +4837,17 @@ define i8 @test284(i8* %ptr, i8 %val) { + define i16 @test285(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test285: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB285_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB285_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB285_1 + ; PPC64LE-NEXT: .LBB285_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val monotonic + ret i16 %ret +@@ -4840,16 +4856,17 @@ define i16 @test285(i16* %ptr, i16 %val) { + define i16 @test286(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test286: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB286_1: +-; PPC64LE-NEXT: lharx 3, 0, 5 +-; PPC64LE-NEXT: extsh 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB286_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 5 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB286_1 + ; PPC64LE-NEXT: .LBB286_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val acquire +@@ -4859,17 +4876,18 @@ define i16 @test286(i16* %ptr, i16 %val) { + define i16 @test287(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test287: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB287_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB287_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB287_1 + ; PPC64LE-NEXT: .LBB287_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val release + ret i16 %ret +@@ -4878,17 +4896,18 @@ define i16 @test287(i16* %ptr, i16 %val) { + define i16 @test288(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test288: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB288_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB288_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB288_1 + ; PPC64LE-NEXT: .LBB288_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val acq_rel +@@ -4898,17 +4917,18 @@ define i16 @test288(i16* %ptr, i16 %val) { + define i16 @test289(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test289: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB289_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB289_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB289_1 + ; PPC64LE-NEXT: .LBB289_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val seq_cst +@@ -8076,16 +8096,17 @@ define i64 @test479(i64* %ptr, i64 %val) { + define i8 @test480(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test480: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB480_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB480_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB480_1 + ; PPC64LE-NEXT: .LBB480_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val syncscope("singlethread") monotonic + ret i8 %ret +@@ -8094,16 +8115,17 @@ define i8 @test480(i8* %ptr, i8 %val) { + define i8 @test481(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test481: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB481_1: +-; PPC64LE-NEXT: lbarx 3, 0, 5 +-; PPC64LE-NEXT: extsb 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB481_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 5 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB481_1 + ; PPC64LE-NEXT: .LBB481_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val syncscope("singlethread") acquire +@@ -8113,17 +8135,18 @@ define i8 @test481(i8* %ptr, i8 %val) { + define i8 @test482(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test482: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB482_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB482_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB482_1 + ; PPC64LE-NEXT: .LBB482_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val syncscope("singlethread") release + ret i8 %ret +@@ -8132,17 +8155,18 @@ define i8 @test482(i8* %ptr, i8 %val) { + define i8 @test483(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test483: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB483_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB483_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB483_1 + ; PPC64LE-NEXT: .LBB483_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val syncscope("singlethread") acq_rel +@@ -8152,17 +8176,18 @@ define i8 @test483(i8* %ptr, i8 %val) { + define i8 @test484(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test484: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB484_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB484_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB484_1 + ; PPC64LE-NEXT: .LBB484_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i8* %ptr, i8 %val syncscope("singlethread") seq_cst +@@ -8172,16 +8197,17 @@ define i8 @test484(i8* %ptr, i8 %val) { + define i16 @test485(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test485: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB485_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB485_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB485_1 + ; PPC64LE-NEXT: .LBB485_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val syncscope("singlethread") monotonic + ret i16 %ret +@@ -8190,16 +8216,17 @@ define i16 @test485(i16* %ptr, i16 %val) { + define i16 @test486(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test486: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB486_1: +-; PPC64LE-NEXT: lharx 3, 0, 5 +-; PPC64LE-NEXT: extsh 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB486_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 5 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB486_1 + ; PPC64LE-NEXT: .LBB486_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val syncscope("singlethread") acquire +@@ -8209,17 +8236,18 @@ define i16 @test486(i16* %ptr, i16 %val) { + define i16 @test487(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test487: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB487_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB487_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB487_1 + ; PPC64LE-NEXT: .LBB487_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val syncscope("singlethread") release + ret i16 %ret +@@ -8228,17 +8256,18 @@ define i16 @test487(i16* %ptr, i16 %val) { + define i16 @test488(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test488: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB488_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB488_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB488_1 + ; PPC64LE-NEXT: .LBB488_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val syncscope("singlethread") acq_rel +@@ -8248,17 +8277,18 @@ define i16 @test488(i16* %ptr, i16 %val) { + define i16 @test489(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test489: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB489_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: ble 0, .LBB489_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB489_1 + ; PPC64LE-NEXT: .LBB489_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw max i16* %ptr, i16 %val syncscope("singlethread") seq_cst +@@ -8450,16 +8480,17 @@ define i64 @test499(i64* %ptr, i64 %val) { + define i8 @test500(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test500: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB500_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB500_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB500_1 + ; PPC64LE-NEXT: .LBB500_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val syncscope("singlethread") monotonic + ret i8 %ret +@@ -8468,16 +8499,17 @@ define i8 @test500(i8* %ptr, i8 %val) { + define i8 @test501(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test501: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: .LBB501_1: +-; PPC64LE-NEXT: lbarx 3, 0, 5 +-; PPC64LE-NEXT: extsb 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB501_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 5 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB501_1 + ; PPC64LE-NEXT: .LBB501_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val syncscope("singlethread") acquire +@@ -8487,17 +8519,18 @@ define i8 @test501(i8* %ptr, i8 %val) { + define i8 @test502(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test502: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB502_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB502_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB502_1 + ; PPC64LE-NEXT: .LBB502_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val syncscope("singlethread") release + ret i8 %ret +@@ -8506,17 +8539,18 @@ define i8 @test502(i8* %ptr, i8 %val) { + define i8 @test503(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test503: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB503_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB503_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB503_1 + ; PPC64LE-NEXT: .LBB503_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val syncscope("singlethread") acq_rel +@@ -8526,17 +8560,18 @@ define i8 @test503(i8* %ptr, i8 %val) { + define i8 @test504(i8* %ptr, i8 %val) { + ; PPC64LE-LABEL: test504: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsb 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB504_1: +-; PPC64LE-NEXT: lbarx 5, 0, 3 +-; PPC64LE-NEXT: extsb 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lbarx 4, 0, 3 ++; PPC64LE-NEXT: extsb 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB504_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: stbcx. 4, 0, 3 ++; PPC64LE-NEXT: stbcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB504_1 + ; PPC64LE-NEXT: .LBB504_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i8* %ptr, i8 %val syncscope("singlethread") seq_cst +@@ -8546,16 +8581,17 @@ define i8 @test504(i8* %ptr, i8 %val) { + define i16 @test505(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test505: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB505_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB505_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB505_1 + ; PPC64LE-NEXT: .LBB505_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val syncscope("singlethread") monotonic + ret i16 %ret +@@ -8564,16 +8600,17 @@ define i16 @test505(i16* %ptr, i16 %val) { + define i16 @test506(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test506: + ; PPC64LE: # %bb.0: +-; PPC64LE-NEXT: mr 5, 3 ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: .LBB506_1: +-; PPC64LE-NEXT: lharx 3, 0, 5 +-; PPC64LE-NEXT: extsh 6, 3 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB506_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 5 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB506_1 + ; PPC64LE-NEXT: .LBB506_3: ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val syncscope("singlethread") acquire +@@ -8583,17 +8620,18 @@ define i16 @test506(i16* %ptr, i16 %val) { + define i16 @test507(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test507: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB507_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB507_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB507_1 + ; PPC64LE-NEXT: .LBB507_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val syncscope("singlethread") release + ret i16 %ret +@@ -8602,17 +8640,18 @@ define i16 @test507(i16* %ptr, i16 %val) { + define i16 @test508(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test508: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: .LBB508_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB508_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB508_1 + ; PPC64LE-NEXT: .LBB508_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val syncscope("singlethread") acq_rel +@@ -8622,17 +8661,18 @@ define i16 @test508(i16* %ptr, i16 %val) { + define i16 @test509(i16* %ptr, i16 %val) { + ; PPC64LE-LABEL: test509: + ; PPC64LE: # %bb.0: ++; PPC64LE-NEXT: extsh 5, 4 + ; PPC64LE-NEXT: sync + ; PPC64LE-NEXT: .LBB509_1: +-; PPC64LE-NEXT: lharx 5, 0, 3 +-; PPC64LE-NEXT: extsh 6, 5 +-; PPC64LE-NEXT: cmpw 4, 6 ++; PPC64LE-NEXT: lharx 4, 0, 3 ++; PPC64LE-NEXT: extsh 6, 4 ++; PPC64LE-NEXT: cmpw 5, 6 + ; PPC64LE-NEXT: bge 0, .LBB509_3 + ; PPC64LE-NEXT: # %bb.2: +-; PPC64LE-NEXT: sthcx. 4, 0, 3 ++; PPC64LE-NEXT: sthcx. 5, 0, 3 + ; PPC64LE-NEXT: bne 0, .LBB509_1 + ; PPC64LE-NEXT: .LBB509_3: +-; PPC64LE-NEXT: mr 3, 5 ++; PPC64LE-NEXT: mr 3, 4 + ; PPC64LE-NEXT: lwsync + ; PPC64LE-NEXT: blr + %ret = atomicrmw min i16* %ptr, i16 %val syncscope("singlethread") seq_cst +diff --git llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll +new file mode 100644 +index 000000000000..7716dc0cedcc +--- /dev/null ++++ llvm/test/CodeGen/PowerPC/sign-ext-atomics.ll +@@ -0,0 +1,105 @@ ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ++; RUN: llc -mtriple=powerpc64le-linux-gnu < %s | FileCheck %s ++define i16 @SEXTParam(i16 signext %0) #0 { ++; CHECK-LABEL: SEXTParam: ++; CHECK: # %bb.0: # %top ++; CHECK-NEXT: li 4, 0 ++; CHECK-NEXT: sth 4, -4(1) ++; CHECK-NEXT: addi 4, 1, -4 ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: .LBB0_1: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: lharx 5, 0, 4 ++; CHECK-NEXT: extsh 5, 5 ++; CHECK-NEXT: cmpw 3, 5 ++; CHECK-NEXT: bge 0, .LBB0_3 ++; CHECK-NEXT: # %bb.2: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: sthcx. 3, 0, 4 ++; CHECK-NEXT: bne 0, .LBB0_1 ++; CHECK-NEXT: .LBB0_3: # %top ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: lhz 3, -4(1) ++; CHECK-NEXT: cmpd 7, 3, 3 ++; CHECK-NEXT: bne- 7, .+4 ++; CHECK-NEXT: isync ++; CHECK-NEXT: blr ++top: ++ %1 = alloca i16, align 4 ++ %2 = bitcast i16* %1 to i8* ++ store i16 0, i16* %1, align 4 ++ %rv.i = atomicrmw min i16* %1, i16 %0 acq_rel ++ %rv.i2 = load atomic i16, i16* %1 acquire, align 16 ++ ret i16 %rv.i2 ++} ++ ++define i16 @noSEXTParam(i16 %0) #0 { ++; CHECK-LABEL: noSEXTParam: ++; CHECK: # %bb.0: # %top ++; CHECK-NEXT: li 4, 0 ++; CHECK-NEXT: extsh 3, 3 ++; CHECK-NEXT: sth 4, -4(1) ++; CHECK-NEXT: addi 4, 1, -4 ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: .LBB1_1: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: lharx 5, 0, 4 ++; CHECK-NEXT: extsh 5, 5 ++; CHECK-NEXT: cmpw 3, 5 ++; CHECK-NEXT: bge 0, .LBB1_3 ++; CHECK-NEXT: # %bb.2: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: sthcx. 3, 0, 4 ++; CHECK-NEXT: bne 0, .LBB1_1 ++; CHECK-NEXT: .LBB1_3: # %top ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: lhz 3, -4(1) ++; CHECK-NEXT: cmpd 7, 3, 3 ++; CHECK-NEXT: bne- 7, .+4 ++; CHECK-NEXT: isync ++; CHECK-NEXT: blr ++top: ++ %1 = alloca i16, align 4 ++ %2 = bitcast i16* %1 to i8* ++ store i16 0, i16* %1, align 4 ++ %rv.i = atomicrmw min i16* %1, i16 %0 acq_rel ++ %rv.i2 = load atomic i16, i16* %1 acquire, align 16 ++ ret i16 %rv.i2 ++} ++ ++define i16 @noSEXTLoad(i16 *%p) #0 { ++; CHECK-LABEL: noSEXTLoad: ++; CHECK: # %bb.0: # %top ++; CHECK-NEXT: lhz 5, 0(3) ++; CHECK-NEXT: li 4, 0 ++; CHECK-NEXT: addi 3, 1, -4 ++; CHECK-NEXT: sth 4, -4(1) ++; CHECK-NEXT: extsh 4, 5 ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: .LBB2_1: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: lharx 5, 0, 3 ++; CHECK-NEXT: extsh 5, 5 ++; CHECK-NEXT: cmpw 4, 5 ++; CHECK-NEXT: bge 0, .LBB2_3 ++; CHECK-NEXT: # %bb.2: # %top ++; CHECK-NEXT: # ++; CHECK-NEXT: sthcx. 4, 0, 3 ++; CHECK-NEXT: bne 0, .LBB2_1 ++; CHECK-NEXT: .LBB2_3: # %top ++; CHECK-NEXT: lwsync ++; CHECK-NEXT: lhz 3, -4(1) ++; CHECK-NEXT: cmpd 7, 3, 3 ++; CHECK-NEXT: bne- 7, .+4 ++; CHECK-NEXT: isync ++; CHECK-NEXT: blr ++top: ++ %0 = load i16, i16* %p, align 2 ++ %1 = alloca i16, align 4 ++ %2 = bitcast i16* %1 to i8* ++ store i16 0, i16* %1, align 4 ++ %rv.i = atomicrmw min i16* %1, i16 %0 acq_rel ++ %rv.i2 = load atomic i16, i16* %1 acquire, align 16 ++ ret i16 %rv.i2 ++} ++attributes #0 = { nounwind } +-- +2.30.0 + diff --git a/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch b/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch deleted file mode 100644 index 9850d8fc9e68e..0000000000000 --- a/deps/patches/llvm-11-D94828-ppc-half-fpconv.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 43b108a71d25d526a51c371cbc867ce5ae49ad8d Mon Sep 17 00:00:00 2001 -From: Valentin Churavy -Date: Fri, 15 Jan 2021 17:30:39 -0500 -Subject: [PATCH] [PowerPC] Disable CTR loops containing floating point - conversion on half-precision - -Follow-up on https://reviews.llvm.org/rG0a19fc3088f5 and fixes https://bugs.llvm.org/show_bug.cgi?id=48519 -for fpext and fptrunc. - -Differential Revision: https://reviews.llvm.org/D94828 ---- - .../Target/PowerPC/PPCTargetTransformInfo.cpp | 12 +++++ - llvm/test/CodeGen/PowerPC/pr48519.ll | 50 +++++++++++++++++++ - 2 files changed, 62 insertions(+) - -diff --git llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp -index 71f867a617c8..614dc6746289 100644 ---- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp -+++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp -@@ -677,6 +677,18 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, - } - } - -+ if (!ST->isISA3_0()) { -+ switch (J->getOpcode()) { -+ case Instruction::FPTrunc: -+ case Instruction::FPExt: { -+ CastInst *CI = cast(J); -+ if (CI->getSrcTy()->getScalarType()->isHalfTy() || -+ CI->getDestTy()->getScalarType()->isHalfTy()) -+ return true; -+ } -+ } -+ } -+ - for (Value *Operand : J->operands()) - if (memAddrUsesCTR(Operand, TM, Visited)) - return true; -diff --git llvm/test/CodeGen/PowerPC/pr48519.ll llvm/test/CodeGen/PowerPC/pr48519.ll -index 777874e91c26..85d42a1994e6 100644 ---- llvm/test/CodeGen/PowerPC/pr48519.ll -+++ llvm/test/CodeGen/PowerPC/pr48519.ll -@@ -49,6 +49,56 @@ pass.1: ; preds = %L139 - unreachable - } - -+define void @julia__hypot_17() { -+; CHECK-LABEL: julia__hypot_17: -+; CHECK: # %bb.0: # %top -+; CHECK-NEXT: mflr r0 -+; CHECK-NEXT: .cfi_def_cfa_offset 48 -+; CHECK-NEXT: .cfi_offset lr, 16 -+; CHECK-NEXT: .cfi_offset r30, -16 -+; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill -+; CHECK-NEXT: std r0, 16(r1) -+; CHECK-NEXT: stdu r1, -48(r1) -+; CHECK-NEXT: li r30, 3 -+; CHECK-NEXT: .p2align 5 -+; CHECK-NEXT: .LBB1_1: # %L57 -+; CHECK-NEXT: # -+; CHECK-NEXT: addi r30, r30, -1 -+; CHECK-NEXT: cmpldi r30, 0 -+; CHECK-NEXT: beq cr0, .LBB1_3 -+; CHECK-NEXT: # %bb.2: # %L68 -+; CHECK-NEXT: # -+; CHECK-NEXT: lhz r3, 0(0) -+; CHECK-NEXT: bl __gnu_h2f_ieee -+; CHECK-NEXT: nop -+; CHECK-NEXT: fcmpu cr0, f1, f1 -+; CHECK-NEXT: bun cr0, .LBB1_1 -+; CHECK-NEXT: .LBB1_3: # %L78 -+; CHECK-NEXT: addi r1, r1, 48 -+; CHECK-NEXT: ld r0, 16(r1) -+; CHECK-NEXT: ld r30, -16(r1) # 8-byte Folded Reload -+; CHECK-NEXT: mtlr r0 -+; CHECK-NEXT: blr -+top: -+ br label %L57 -+ -+L57: ; preds = %L68, %top -+ %value_phi117 = phi i64 [ %0, %L68 ], [ 2, %top ] -+ %exitcond = icmp eq i64 %value_phi117, 4 -+ br i1 %exitcond, label %L78, label %L68 -+ -+L68: ; preds = %L57 -+ %0 = add nuw nsw i64 %value_phi117, 1 -+ %1 = load half, half* null, align 2 -+ %2 = fpext half %1 to float -+ %3 = fcmp uno float %2, 0.000000e+00 -+ %4 = or i1 %3, false -+ br i1 %4, label %L57, label %L78 -+ -+L78: ; preds = %L68, %L57 -+ ret void -+} -+ - ; Function Attrs: nounwind readnone speculatable willreturn - declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64, i64) #0 - --- -2.30.0 - diff --git a/deps/patches/llvm-11-D94980-CTR-half.patch b/deps/patches/llvm-11-D94980-CTR-half.patch new file mode 100644 index 0000000000000..64debc43a9e92 --- /dev/null +++ b/deps/patches/llvm-11-D94980-CTR-half.patch @@ -0,0 +1,398 @@ +From 8a3be8c0ff83f2b9d2db4fd581ec014bd3217505 Mon Sep 17 00:00:00 2001 +From: Nemanja Ivanovic +Date: Tue, 19 Jan 2021 19:52:31 -0500 +Subject: [PATCH] [PowerPC] Do not emit HW loop with half precision operations + +If a loop has any operations on half precision values, there will be calls to library functions on Power8. Even on Power9, there is a small subset of instructions that are actually supported for the type. + +This patch disables HW loops whenever any operations on the type are found (other than the handfull of supported ones when compiling for Power9). Fixes a few PR's opened by Julia: + +https://bugs.llvm.org/show_bug.cgi?id=48785 +https://bugs.llvm.org/show_bug.cgi?id=48786 +https://bugs.llvm.org/show_bug.cgi?id=48519 +--- + .../Target/PowerPC/PPCTargetTransformInfo.cpp | 29 +- + llvm/test/CodeGen/PowerPC/pr48519.ll | 296 ++++++++++++++++-- + 2 files changed, 299 insertions(+), 26 deletions(-) + +diff --git llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +index 49c10fdf8898..adf9f0df82f8 100644 +--- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp ++++ llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +@@ -276,8 +276,33 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, + return false; + }; + ++ auto supportedHalfPrecisionOp = [](Instruction *Inst) { ++ switch (Inst->getOpcode()) { ++ default: return false; ++ case Instruction::FPTrunc: ++ case Instruction::FPExt: ++ case Instruction::Load: ++ case Instruction::Store: ++ case Instruction::FPToUI: ++ case Instruction::UIToFP: ++ case Instruction::FPToSI: ++ case Instruction::SIToFP: ++ return true; ++ } ++ }; ++ + for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); + J != JE; ++J) { ++ // There are no direct operations on half precision so assume that ++ // anything with that type requires a call except for a few select ++ // operations with Power9. ++ if (Instruction *CurrInst = dyn_cast(J)) { ++ for (const auto &Op : CurrInst->operands()) { ++ if (Op->getType()->getScalarType()->isHalfTy() || ++ CurrInst->getType()->getScalarType()->isHalfTy()) ++ return !(ST->isISA3_0() && supportedHalfPrecisionOp(CurrInst)); ++ } ++ } + if (CallInst *CI = dyn_cast(J)) { + // Inline ASM is okay, unless it clobbers the ctr register. + if (InlineAsm *IA = dyn_cast(CI->getCalledOperand())) { +@@ -441,10 +466,6 @@ bool PPCTTIImpl::mightUseCTR(BasicBlock *BB, TargetLibraryInfo *LibInfo, + isLargeIntegerTy(!TM.isPPC64(), CI->getSrcTy()->getScalarType()) || + isLargeIntegerTy(!TM.isPPC64(), CI->getDestTy()->getScalarType())) + return true; +- if (!ST->isISA3_0() && +- (CI->getSrcTy()->getScalarType()->isHalfTy() || +- CI->getDestTy()->getScalarType()->isHalfTy())) +- return true; + } else if (isLargeIntegerTy(!TM.isPPC64(), + J->getType()->getScalarType()) && + (J->getOpcode() == Instruction::UDiv || +diff --git llvm/test/CodeGen/PowerPC/pr48519.ll llvm/test/CodeGen/PowerPC/pr48519.ll +index 777874e91c26..50970cb185d8 100644 +--- llvm/test/CodeGen/PowerPC/pr48519.ll ++++ llvm/test/CodeGen/PowerPC/pr48519.ll +@@ -1,9 +1,13 @@ + ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py + ; RUN: llc -mcpu=pwr8 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ + ; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s ++; RUN: llc -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ ++; RUN: -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \ ++; RUN: -check-prefix=CHECK-P9 ++ + define void @julia__typed_vcat_20() #0 { + ; CHECK-LABEL: julia__typed_vcat_20: +-; CHECK: # %bb.0: # %top ++; CHECK: # %bb.0: # %bb + ; CHECK-NEXT: mflr r0 + ; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill + ; CHECK-NEXT: std r0, 16(r1) +@@ -11,7 +15,7 @@ define void @julia__typed_vcat_20() #0 { + ; CHECK-NEXT: li r3, 1 + ; CHECK-NEXT: li r30, 0 + ; CHECK-NEXT: .p2align 4 +-; CHECK-NEXT: .LBB0_1: # %L139 ++; CHECK-NEXT: .LBB0_1: # %bb3 + ; CHECK-NEXT: # + ; CHECK-NEXT: addi r3, r3, -1 + ; CHECK-NEXT: mtfprd f0, r3 +@@ -24,32 +28,280 @@ define void @julia__typed_vcat_20() #0 { + ; CHECK-NEXT: li r3, 0 + ; CHECK-NEXT: cmpldi r30, 0 + ; CHECK-NEXT: bne+ cr0, .LBB0_1 +-; CHECK-NEXT: # %bb.2: # %pass.1 ++; CHECK-NEXT: # %bb.2: # %bb11 + ; CHECK-NEXT: bl __gnu_f2h_ieee + ; CHECK-NEXT: nop + ; CHECK-NEXT: sth r3, 0(r3) +-top: +- %.sroa.6.0.copyload = load i64, i64 addrspace(11)* null, align 8 +- %0 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %.sroa.6.0.copyload, i64 0) +- %1 = extractvalue { i64, i1 } %0, 0 +- br label %L139 +- +-L139: ; preds = %L139, %top +- %value_phi21 = phi i64 [ %5, %L139 ], [ 1, %top ] +- %value_phi23 = phi i64 [ 0, %L139 ], [ 1, %top ] +- %2 = add nsw i64 %value_phi23, -1 +- %3 = add i64 %2, 0 +- %4 = sitofp i64 %3 to half +- store half %4, half addrspace(13)* undef, align 2 +- %.not101.not = icmp eq i64 %value_phi21, 0 +- %5 = add i64 %value_phi21, 1 +- br i1 %.not101.not, label %pass.1, label %L139 +- +-pass.1: ; preds = %L139 ++; ++; CHECK-P9-LABEL: julia__typed_vcat_20: ++; CHECK-P9: # %bb.0: # %bb ++; CHECK-P9-NEXT: li r3, 0 ++; CHECK-P9-NEXT: mtctr r3 ++; CHECK-P9-NEXT: li r3, 1 ++; CHECK-P9-NEXT: .p2align 4 ++; CHECK-P9-NEXT: .LBB0_1: # %bb3 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: addi r3, r3, -1 ++; CHECK-P9-NEXT: mtfprd f0, r3 ++; CHECK-P9-NEXT: xscvsxdsp f0, f0 ++; CHECK-P9-NEXT: xscvdphp f0, f0 ++; CHECK-P9-NEXT: mffprwz r3, f0 ++; CHECK-P9-NEXT: mtfprwz f0, r3 ++; CHECK-P9-NEXT: li r3, 0 ++; CHECK-P9-NEXT: xscvhpdp f0, f0 ++; CHECK-P9-NEXT: bdnz .LBB0_1 ++; CHECK-P9-NEXT: # %bb.2: # %bb11 ++; CHECK-P9-NEXT: xscvdphp f0, f0 ++; CHECK-P9-NEXT: stxsihx f0, 0, r3 ++bb: ++ %i = load i64, i64 addrspace(11)* null, align 8 ++ %i1 = call { i64, i1 } @llvm.ssub.with.overflow.i64(i64 %i, i64 0) ++ %i2 = extractvalue { i64, i1 } %i1, 0 ++ br label %bb3 ++ ++bb3: ; preds = %bb3, %bb ++ %i4 = phi i64 [ %i10, %bb3 ], [ 1, %bb ] ++ %i5 = phi i64 [ 0, %bb3 ], [ 1, %bb ] ++ %i6 = add nsw i64 %i5, -1 ++ %i7 = add i64 %i6, 0 ++ %i8 = sitofp i64 %i7 to half ++ store half %i8, half addrspace(13)* undef, align 2 ++ %i9 = icmp eq i64 %i4, 0 ++ %i10 = add i64 %i4, 1 ++ br i1 %i9, label %bb11, label %bb3 ++ ++bb11: ; preds = %bb3 + unreachable + } + +-; Function Attrs: nounwind readnone speculatable willreturn + declare { i64, i1 } @llvm.ssub.with.overflow.i64(i64, i64) #0 + ++define void @julia__hypot_17() #0 { ++; CHECK-LABEL: julia__hypot_17: ++; CHECK: # %bb.0: # %bb ++; CHECK-NEXT: mflr r0 ++; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill ++; CHECK-NEXT: std r0, 16(r1) ++; CHECK-NEXT: stdu r1, -48(r1) ++; CHECK-NEXT: li r30, 3 ++; CHECK-NEXT: .p2align 5 ++; CHECK-NEXT: .LBB1_1: # %bb1 ++; CHECK-NEXT: # ++; CHECK-NEXT: addi r30, r30, -1 ++; CHECK-NEXT: cmpldi r30, 0 ++; CHECK-NEXT: beq cr0, .LBB1_3 ++; CHECK-NEXT: # %bb.2: # %bb3 ++; CHECK-NEXT: # ++; CHECK-NEXT: lhz r3, 0(0) ++; CHECK-NEXT: bl __gnu_h2f_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: fcmpu cr0, f1, f1 ++; CHECK-NEXT: bun cr0, .LBB1_1 ++; CHECK-NEXT: .LBB1_3: # %bb9 ++; CHECK-NEXT: addi r1, r1, 48 ++; CHECK-NEXT: ld r0, 16(r1) ++; CHECK-NEXT: ld r30, -16(r1) # 8-byte Folded Reload ++; CHECK-NEXT: mtlr r0 ++; CHECK-NEXT: blr ++; ++; CHECK-P9-LABEL: julia__hypot_17: ++; CHECK-P9: # %bb.0: # %bb ++; CHECK-P9-NEXT: li r3, 3 ++; CHECK-P9-NEXT: mtctr r3 ++; CHECK-P9-NEXT: li r3, 0 ++; CHECK-P9-NEXT: .p2align 5 ++; CHECK-P9-NEXT: .LBB1_1: # %bb1 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: bdzlr ++; CHECK-P9-NEXT: # %bb.2: # %bb3 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: lxsihzx f0, 0, r3 ++; CHECK-P9-NEXT: xscvhpdp f0, f0 ++; CHECK-P9-NEXT: fcmpu cr0, f0, f0 ++; CHECK-P9-NEXT: bun cr0, .LBB1_1 ++; CHECK-P9-NEXT: # %bb.3: # %bb9 ++; CHECK-P9-NEXT: blr ++bb: ++ br label %bb1 ++ ++bb1: ; preds = %bb3, %bb ++ %i = phi i64 [ %i4, %bb3 ], [ 2, %bb ] ++ %i2 = icmp eq i64 %i, 4 ++ br i1 %i2, label %bb9, label %bb3 ++ ++bb3: ; preds = %bb1 ++ %i4 = add nuw nsw i64 %i, 1 ++ %i5 = load half, half* null, align 2 ++ %i6 = fpext half %i5 to float ++ %i7 = fcmp uno float %i6, 0.000000e+00 ++ %i8 = or i1 %i7, false ++ br i1 %i8, label %bb1, label %bb9 ++ ++bb9: ; preds = %bb3, %bb1 ++ ret void ++} ++ ++define void @func_48786() #0 { ++; CHECK-LABEL: func_48786: ++; CHECK: # %bb.0: # %bb ++; CHECK-NEXT: mfocrf r12, 32 ++; CHECK-NEXT: mflr r0 ++; CHECK-NEXT: std r0, 16(r1) ++; CHECK-NEXT: stw r12, 8(r1) ++; CHECK-NEXT: stdu r1, -48(r1) ++; CHECK-NEXT: ld r3, 0(r3) ++; CHECK-NEXT: std r30, 32(r1) # 8-byte Folded Spill ++; CHECK-NEXT: # implicit-def: $x30 ++; CHECK-NEXT: cmpdi r3, 0 ++; CHECK-NEXT: crnot 4*cr2+lt, eq ++; CHECK-NEXT: bc 12, 4*cr5+lt, .LBB2_3 ++; CHECK-NEXT: .p2align 4 ++; CHECK-NEXT: .LBB2_1: # %bb4 ++; CHECK-NEXT: lhz r3, 0(r3) ++; CHECK-NEXT: bl __gnu_h2f_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: bc 4, 4*cr2+lt, .LBB2_6 ++; CHECK-NEXT: # %bb.2: # %bb8 ++; CHECK-NEXT: bl __gnu_f2h_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: sth r3, 0(0) ++; CHECK-NEXT: .LBB2_3: # %bb10 ++; CHECK-NEXT: # ++; CHECK-NEXT: cmpldi r30, 0 ++; CHECK-NEXT: beq cr0, .LBB2_5 ++; CHECK-NEXT: # %bb.4: # %bb12 ++; CHECK-NEXT: # ++; CHECK-NEXT: addi r30, r30, 1 ++; CHECK-NEXT: bc 4, 4*cr5+lt, .LBB2_1 ++; CHECK-NEXT: b .LBB2_3 ++; CHECK-NEXT: .LBB2_5: # %bb14 ++; CHECK-NEXT: ld r30, 32(r1) # 8-byte Folded Reload ++; CHECK-NEXT: addi r1, r1, 48 ++; CHECK-NEXT: ld r0, 16(r1) ++; CHECK-NEXT: lwz r12, 8(r1) ++; CHECK-NEXT: mtocrf 32, r12 ++; CHECK-NEXT: mtlr r0 ++; CHECK-NEXT: blr ++; CHECK-NEXT: .LBB2_6: # %bb15 ++; ++; CHECK-P9-LABEL: func_48786: ++; CHECK-P9: # %bb.0: # %bb ++; CHECK-P9-NEXT: ld r3, 0(r3) ++; CHECK-P9-NEXT: cmpdi r3, 0 ++; CHECK-P9-NEXT: mtctr r3 ++; CHECK-P9-NEXT: li r3, 0 ++; CHECK-P9-NEXT: crnot 4*cr5+lt, eq ++; CHECK-P9-NEXT: b .LBB2_2 ++; CHECK-P9-NEXT: .p2align 5 ++; CHECK-P9-NEXT: .LBB2_1: # %bb10 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: bdzlr ++; CHECK-P9-NEXT: .LBB2_2: # %bb2 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: bc 12, 4*cr5+lt, .LBB2_1 ++; CHECK-P9-NEXT: # %bb.3: # %bb4 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: lxsihzx f0, 0, r3 ++; CHECK-P9-NEXT: xscvhpdp f0, f0 ++; CHECK-P9-NEXT: bc 4, 4*cr5+lt, .LBB2_5 ++; CHECK-P9-NEXT: # %bb.4: # %bb8 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: xscvdphp f0, f0 ++; CHECK-P9-NEXT: stxsihx f0, 0, r3 ++; CHECK-P9-NEXT: b .LBB2_1 ++; CHECK-P9-NEXT: .LBB2_5: # %bb15 ++bb: ++ %i = load i64, i64 addrspace(11)* undef, align 8 ++ %i1 = load i64, i64 addrspace(11)* undef, align 8 ++ br label %bb2 ++ ++bb2: ; preds = %bb12, %bb ++ %i3 = phi i64 [ undef, %bb ], [ %i13, %bb12 ] ++ br i1 undef, label %bb10, label %bb4 ++ ++bb4: ; preds = %bb2 ++ switch i32 undef, label %bb9 [ ++ i32 1426063360, label %bb5 ++ i32 1275068416, label %bb5 ++ ] ++ ++bb5: ; preds = %bb4, %bb4 ++ %i6 = load half, half addrspace(13)* undef, align 2 ++ %i7 = icmp ult i64 0, %i1 ++ br i1 %i7, label %bb8, label %bb15 ++ ++bb8: ; preds = %bb5 ++ store half %i6, half addrspace(13)* null, align 2 ++ br label %bb10 ++ ++bb9: ; preds = %bb4 ++ unreachable ++ ++bb10: ; preds = %bb8, %bb2 ++ %i11 = icmp eq i64 %i3, 0 ++ br i1 %i11, label %bb14, label %bb12 ++ ++bb12: ; preds = %bb10 ++ %i13 = add i64 %i3, 1 ++ br label %bb2 ++ ++bb14: ; preds = %bb10 ++ ret void ++ ++bb15: ; preds = %bb5 ++ unreachable ++} ++ ++define void @func_48785(half %arg) #0 { ++; CHECK-LABEL: func_48785: ++; CHECK: # %bb.0: # %bb ++; CHECK-NEXT: mflr r0 ++; CHECK-NEXT: std r29, -32(r1) # 8-byte Folded Spill ++; CHECK-NEXT: std r30, -24(r1) # 8-byte Folded Spill ++; CHECK-NEXT: stfd f31, -8(r1) # 8-byte Folded Spill ++; CHECK-NEXT: std r0, 16(r1) ++; CHECK-NEXT: stdu r1, -64(r1) ++; CHECK-NEXT: fmr f31, f1 ++; CHECK-NEXT: li r30, 0 ++; CHECK-NEXT: .p2align 5 ++; CHECK-NEXT: .LBB3_1: # %bb1 ++; CHECK-NEXT: # ++; CHECK-NEXT: fmr f1, f31 ++; CHECK-NEXT: sldi r29, r30, 1 ++; CHECK-NEXT: bl __gnu_f2h_ieee ++; CHECK-NEXT: nop ++; CHECK-NEXT: addi r30, r30, 12 ++; CHECK-NEXT: sth r3, 0(r29) ++; CHECK-NEXT: cmpldi r30, 0 ++; CHECK-NEXT: bne+ cr0, .LBB3_1 ++; CHECK-NEXT: # %bb.2: # %bb5 ++; ++; CHECK-P9-LABEL: func_48785: ++; CHECK-P9: # %bb.0: # %bb ++; CHECK-P9-NEXT: li r3, 1 ++; CHECK-P9-NEXT: rldic r3, r3, 62, 1 ++; CHECK-P9-NEXT: mtctr r3 ++; CHECK-P9-NEXT: li r3, 0 ++; CHECK-P9-NEXT: .p2align 4 ++; CHECK-P9-NEXT: .LBB3_1: # %bb1 ++; CHECK-P9-NEXT: # ++; CHECK-P9-NEXT: xscvdphp f0, f1 ++; CHECK-P9-NEXT: stxsihx f0, 0, r3 ++; CHECK-P9-NEXT: addi r3, r3, 24 ++; CHECK-P9-NEXT: bdnz .LBB3_1 ++; CHECK-P9-NEXT: # %bb.2: # %bb5 ++bb: ++ br label %bb1 ++ ++bb1: ; preds = %bb1, %bb ++ %i = phi i64 [ 0, %bb ], [ %i3, %bb1 ] ++ %i2 = getelementptr inbounds half, half addrspace(13)* null, i64 %i ++ store half %arg, half addrspace(13)* %i2, align 2 ++ %i3 = add i64 %i, 12 ++ %i4 = icmp eq i64 %i3, 0 ++ br i1 %i4, label %bb5, label %bb1 ++ ++bb5: ; preds = %bb1 ++ unreachable ++} + attributes #0 = { nounwind } +-- +2.30.0 + From bf15b706e9a29cbb0d3ed59f90a5eea9d202cb46 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 23:39:42 -0500 Subject: [PATCH 178/239] test: fix merge conflict in show (#39399) Fixes merge conflict breaking tests caused by fb59c1936bc8f961e18b9e5f6374ba90b6fb5ae5 --- test/docs.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/docs.jl b/test/docs.jl index eefd90a2443d6..fbe24da9be873 100644 --- a/test/docs.jl +++ b/test/docs.jl @@ -965,10 +965,10 @@ abstract type $(curmod_prefix)Undocumented.at0{T<:Number, N} # Subtypes ``` -$(curmod_prefix)Undocumented.at1{T, N} where N where Integer<:T<:Number +$(curmod_prefix)Undocumented.at1{T, N} where {Integer<:T<:Number, N} $(curmod_prefix)Undocumented.pt2 $(curmod_prefix)Undocumented.st3 -$(curmod_prefix)Undocumented.st4{T, N} where N where T<:Number +$(curmod_prefix)Undocumented.st4{T, N} where {T<:Number, N} ``` """) @test docstrings_equal(@doc(Undocumented.at0), doc"$doc_str") @@ -1007,7 +1007,7 @@ abstract type $(curmod_prefix)Undocumented.at0{Int64, N} # Subtypes ``` -$(curmod_prefix)Undocumented.pt2{Int64, N, A} where A>:Integer where N +$(curmod_prefix)Undocumented.pt2{Int64, N, A} where {N, A>:Integer} $(curmod_prefix)Undocumented.st3{Int64, N} where N $(curmod_prefix)Undocumented.st4{Int64, N} where N ``` @@ -1157,9 +1157,9 @@ No documentation found. # Union Composed of Types - - `$(curmod_prefix)Undocumented.at1{T, N} where N where T` - - `$(curmod_prefix)Undocumented.pt2{T, N, A} where A>:Integer where N where T` - - `$(curmod_prefix)Undocumented.st3{T, N} where N where T` + - `$(curmod_prefix)Undocumented.at1{T, N} where {T, N}` + - `$(curmod_prefix)Undocumented.pt2{T, N, A} where {T, N, A>:Integer}` + - `$(curmod_prefix)Undocumented.st3{T, N} where {T, N}` - `$(curmod_prefix)Undocumented.st4` """) @test docstrings_equal(@doc(Undocumented.ut9), doc"$doc_str") From 9638ba0e064e10f3f0738371970ea6623845219d Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 23:35:22 -0500 Subject: [PATCH 179/239] fix linux unwind info, per x86_64 ABI Closes #23074 Fixes #35155 --- src/task.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index 5460e79618ba6..345176a98dd5f 100644 --- a/src/task.c +++ b/src/task.c @@ -807,10 +807,25 @@ STATIC_OR_JS void NOINLINE JL_NORETURN start_task(void) { #ifdef _OS_WINDOWS_ #if defined(_CPU_X86_64_) - // install the unhandled exception hanlder at the top of our stack + // install the unhandled exception handler at the top of our stack // to call directly into our personality handler asm volatile ("\t.seh_handler __julia_personality, @except\n\t.text"); #endif +#else + // wipe out the call-stack unwind capability beyond this function + // (we are noreturn, so it is not a total lie) +#if defined(_CPU_X86_64_) + // per nongnu libunwind: "x86_64 ABI specifies that end of call-chain is marked with a NULL RBP or undefined return address" + // so we do all 3, to be extra certain of it + asm volatile ("\t.cfi_undefined rip"); + asm volatile ("\t.cfi_undefined rbp"); + asm volatile ("\t.cfi_return_column rbp"); +#else + // per nongnu libunwind: "DWARF spec says undefined return address location means end of stack" + // we use whatever happens to be register 1 on this platform for this + asm volatile ("\t.cfi_undefined 1"); + asm volatile ("\t.cfi_return_column 1"); +#endif #endif // this runs the first time we switch to a task From d1fa5a57acff6ebe51424dca71f6e962d86d28b1 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 25 Jan 2021 23:35:56 -0500 Subject: [PATCH 180/239] build: fix libunwind configure flags --- deps/unwind.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/unwind.mk b/deps/unwind.mk index 351f9b3df745f..c51adfe63dce0 100644 --- a/deps/unwind.mk +++ b/deps/unwind.mk @@ -27,7 +27,7 @@ $(SRCCACHE)/libunwind-$(UNWIND_VER)/libunwind-static-arm.patch-applied: $(SRCCAC $(BUILDDIR)/libunwind-$(UNWIND_VER)/build-configured: $(SRCCACHE)/libunwind-$(UNWIND_VER)/source-extracted $(SRCCACHE)/libunwind-$(UNWIND_VER)/libunwind-static-arm.patch-applied mkdir -p $(dir $@) cd $(dir $@) && \ - $(dir $<)/configure $(CONFIGURE_COMMON) CPPFLAGS="$(CPPFLAGS) $(LIBUNWIND_CPPFLAGS)" CFLAGS="$(CFLAGS) $(LIBUNWIND_CFLAGS)" --disable-shared --disable-minidebuginfo --disable-tests + $(dir $<)/configure $(CONFIGURE_COMMON) CPPFLAGS="$(CPPFLAGS) $(LIBUNWIND_CPPFLAGS)" CFLAGS="$(CFLAGS) $(LIBUNWIND_CFLAGS)" --enable-shared --disable-minidebuginfo --disable-tests echo 1 > $@ $(BUILDDIR)/libunwind-$(UNWIND_VER)/build-compiled: $(BUILDDIR)/libunwind-$(UNWIND_VER)/build-configured From 50587b1666151aacf03395f39f5558bd1deba129 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 23 Jan 2021 10:16:44 -0500 Subject: [PATCH 181/239] Set -fno-gnu-unique for building LLVM --- deps/llvm.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deps/llvm.mk b/deps/llvm.mk index 729e7867565fd..f577184197fa4 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -190,6 +190,13 @@ LLVM_CPPFLAGS += -flto LLVM_LDFLAGS += -flto endif # LLVM_LTO +ifeq ($(USE_LLVM_SHLIB),1) +ifeq ($(USECLANG),0) +# https://bugs.llvm.org/show_bug.cgi?id=48221 +LLVM_CXXFLAGS += -fno-gnu-unique +endif +endif + ifeq ($(fPIC),) LLVM_CMAKE += -DLLVM_ENABLE_PIC=OFF endif From ef2fb44b83e2a62fdb371d1e01d23f64b200d394 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 26 Jan 2021 21:06:44 -0500 Subject: [PATCH 182/239] bump LLVM to 11.0.1+1 --- deps/Versions.make | 6 +- deps/checksums/clang | 116 +++--- deps/checksums/clang-11.0.1.src.tar.xz/md5 | 1 - deps/checksums/clang-11.0.1.src.tar.xz/sha512 | 1 - deps/checksums/llvm | 350 +++++++++--------- deps/checksums/llvm-tools | 0 stdlib/libLLVM_jll/Project.toml | 2 +- 7 files changed, 236 insertions(+), 240 deletions(-) delete mode 100644 deps/checksums/clang-11.0.1.src.tar.xz/md5 delete mode 100644 deps/checksums/clang-11.0.1.src.tar.xz/sha512 delete mode 100644 deps/checksums/llvm-tools diff --git a/deps/Versions.make b/deps/Versions.make index 22a6c4d744135..0a70852512baa 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -15,7 +15,7 @@ CSL_JLL_NAME := CompilerSupportLibraries # Clang (paired with LLVM, only here as a JLL download) CLANG_JLL_NAME := Clang -CLANG_JLL_VER := 11.0.1+0 +CLANG_JLL_VER := 11.0.1+1 # DSFMT DSFMT_VER := 2.2.4 @@ -46,12 +46,12 @@ LIBUV_JLL_NAME := LibUV # LLVM LLVM_VER := 11.0.1 -LLVM_ASSERT_JLL_VER := 11.0.1+0 +LLVM_ASSERT_JLL_VER := 11.0.1+1 LLVM_JLL_NAME := libLLVM # LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) LLVM_TOOLS_JLL_NAME := LLVM -LLVM_TOOLS_JLL_VER := 11.0.1+0 +LLVM_TOOLS_JLL_VER := 11.0.1+1 # MbedTLS MBEDTLS_VER := 2.24.0 diff --git a/deps/checksums/clang b/deps/checksums/clang index e8925bc759262..48a6fafb88103 100644 --- a/deps/checksums/clang +++ b/deps/checksums/clang @@ -1,58 +1,58 @@ -Clang.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/f01b3fb362068c230bfe65b07a55bd3f -Clang.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/5cccc6e042f5c435bd7e25535651c6803b078dc1ebb49a2f653a928870bf686ff2b8963f80d6b2f553da6d23d3e168c24273bee9b6aa4391bbce7a681065a1aa -Clang.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/4e67174cebead479bd89b3390debaf5e -Clang.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/1449fc2ee161d5d81ec125b9e93089fe0c9cb519fc44738a7867b717ab26d53dcf4dc2ae93cf08df3470f7c3c1209671a4f9540a32ac7525427c12b724898aed -Clang.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/9c8ad928aa8fbb9c27da41dfc9f6355c -Clang.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/9f32c67064e8a4bccbfce02a9214fafaba9ad7043bfac59edb2ece5ef08864cea4e516179bcb1331178a6aa7449b6d22b556b3a3bc295d819e10a0885102ef72 -Clang.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/585a30e5a5a68f92f154574e5f2086e3 -Clang.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/fd8c7131c4e288f092840feda0e7b20feabdbece45abca0fa7ce3161ce6579dbc839097a635686012f26aff0a860bfaa593c296066d062f0bec4ec3872b2126f -Clang.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f1cdb2be71d8c16ab8f7850261890070 -Clang.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/4f44dacc01a3a39cf7c0efcdfa6704bec75ca38b93971d336bcdabfddb7fd39a1d7dd6c4b8574b8190ef03507cd8990352bfb524d6df9af82c5a6083b38321c0 -Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/7f58048db2e5095a5fb797f58f804430 -Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/2712637e3cb38bf74d1695ec84478e6c76aaa8d52bd000f81a4e4e73771d6c2b008ed17e94154588310cd51378d43a6f158b51645cfc75e665bbe84c488adc3f -Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/1299a67b65ec7a1adc2b327c6e5a4195 -Clang.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/5d9fe1fa151fc065c38525a880ee1993c53f049717475cf473b67c6a8c44021f1bc6add29fe6c1ab196a66b524647c5dabb1bd336651bea2a2a7910a668fb096 -Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/a51f767667e7be8d0ead7c5b4f58656e -Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/2ea5218cbec3e4d1aa61c182451e8717f0295b9be221462fe24bb24dbd503c82051156420d090003b49b2454baf2f171e5e8d5011b3643c4153025474738f043 -Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/6ce5593f191da26b58a84844d6834af6 -Clang.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/b07d9546db5105eb60010fcd21476be625e4bf5d5804dddc53a242363ddb93f0dbc1e2de67fb91c545000c38c197eabb0db219acc293e2e175eb95866527b4f8 -Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/5beac00e4c5755c14f66656470a2d91a -Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/d98d516724d4d6ecf5c7c6f6e4e64ba333af91949a14661a60318ab1f48a50f54923f9e9071578e447a0744b8ffba2e468591f92373c0d5cfc202ada4283e2e1 -Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/1bf95e16121bf4ef7ab7534ec2906e8d -Clang.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/922b45b33f316d41ba6b089c30ba0606a26a58cac341e32db37c3565b711d74d43b9b6e6e2db64b307300f6f9b1613bdc69e8b85a47605474b34b2eb5132db65 -Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/3905ff26b1ba349bfed10036cfadc8b2 -Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/209b8087ba26cdaffe6d5f379f7dda00d32fabaf914139067728fabef7788ecd54b39a298ce9191ec45ff708a109e99add41d7953a1e9c4c0ddadff204df4a80 -Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/13c587485207dce3537b3349d4bfa33d -Clang.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/d0bd627a6f6b23833c728ba50dc38f9a8b172202d3a581cb72da3ef8add6ce2a4d3dfdae10f8c4a694f4881c5c08d48e61ab6d426002651f5e9ebaf2c8167c76 -Clang.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/27d72e0c76e2269daa5db96d66640b10 -Clang.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/ab0ba11b03fc97c9b2817bfe43d6871e2eb201b14849ffac284eb49be02c9c5893d50bc89b48411de9d87b7267c1527f60b5995d81b1495afa3af473224cf216 -Clang.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/200d9bb6dac86649fc671467d2343585 -Clang.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/7808084dfe733577932f434cc5107a6f77cdc6f25e830928045f3ab8d9b8a75349aad0bbc337075d06b1492c84e3704dc922cd5006abafe3d10a197420952197 -Clang.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/41c1508f51f157d0df10a7f4ac901a17 -Clang.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/370202acb230a82a2b9613a984d22d0208aa7458d032b31d90a5cc04ed7afcaef3f704ae37910815ed090c4fec093dec0b90a10a0bbd2539c1dc0c5e564aa85c -Clang.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/d2a5fd3dc0feb4964383f425d6e00477 -Clang.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/0b7a442b2b87883e3b50996af7e114dee77d46ae898fcaa4e934da0ecfe3efd9603c5af433d61997c2722917937fb04c5c29cdb2ddd0f718375b8915636000e9 -Clang.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/a9af99fa1c6e7ab67dbb9f317ebe7431 -Clang.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/1fc204a2c1a6b5668d3e80b4226226f0cc301c70dc794030d32dbb9280b2010fddf3298158750a32c0ce1e40191e8fa2c036c1f4d3532888bcefffd8194bf64e -Clang.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/7ea67c2feed4e7227cd9079abb4b39d5 -Clang.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/f3926a8f9a6fce8198a31a5a221954c60cf3df28ded5b3683344b223ba8de769cb543de81f807bf09c3007b421e7c5c06a1aa6c36c4f3dcff5704caffc3c23bf -Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/e33c9f7503b25350ea757871b8b6dc92 -Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/6eb506361cd427ab9b7cb60458d26dba453bd2c152246391482028fb94643b4868a77fa34f8c59ef14150f17c32c29ec8ac50fcccb83511e5fe6154f4e172b6e -Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/1cce0a376b3b3ae764e153c70d0480b5 -Clang.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d6685af43b0bffbd141e03ab7613b3a6431496b9734cba92025863cf0cad2d25d2baf4d6eb6aeaf342d0670389d45ccda5bfff6d3e859e65a0dffac17c11240c -Clang.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/4af3cbcfb1c0d352bc1e8f61ed108017 -Clang.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/9d20901febabcb06d87b706aabbc0aa7a0ebb173c4999b8708b590fa5113577bc93a4bce59f9cc0aa9078d3e35f4242424a6d949c21118a146484901297661e3 -Clang.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/e8c701382bf8e2d01ff79e5415a51875 -Clang.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/72187909227c7bcdb30c60655a53178af9b518c02a5ac5784bcf522ed536365da12054c3d16b7aa7e2a2d21f88b6b4fa1c54a66437ca221122859079409426ed -Clang.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/5d92dda365296697e88abd5996495b38 -Clang.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/6d2acf3bf2d2ba6e9d9c6351aa1e43d59528e89c5218bdf732ad4e475f4b4787d578055b863401a4573b7c88b76cf6787f76bc06d0a100ddd5908f31538752c6 -Clang.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/7b51ff2a6eb55c45bad712318a6aff5f -Clang.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/3d607531beeea0e46b0d2b5f0d6589a11f933fff1ed53b59758375efcce9a3dfe5513f57f242b85983a2b11205a797f9ee1e2033a17efe0ffa77e3286820efba -Clang.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/119345ed95b24b84cdbd272e575e3143 -Clang.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/8ea6a61d6275c15d47528a465fac3707159b37dd994c80da70712bc869b860417e26d71a99a8c09f91e7d274ddce4fcb27003c10058319efe75a592de40bad0b -Clang.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/9c1c8559ed4d0bb16194cc09cc2186ba -Clang.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/91522014a111180f86b7e0e026cce31836481f12136b9e3cfb196c1b769b389571f586d9528fc8834a6282f7eee72513f9f144aa519c5bdb37b4c0ae50627f77 -Clang.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/c68ddbca935a7edcb698a4a8582fcfd3 -Clang.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/892d9f55a4647d5f3b3a458647c2aa642ef931e10af253972ac344acd264c3be9cb0d7fab4e8b0249b606a98f43f9f95601fbf8dbcb7572a01422982d0e66d95 -Clang.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/16dae3d351001a49378c200f9990d7cb -Clang.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/8e29ae0d0d1747ca566f1c79736d2d53dd6b883ecada2561a613378d84d3e733d2946783f48a6ddb462cfe5676f1ee62369ae5e5cd68ba411f9fa43e5b541cc1 +Clang.v11.0.1+1.aarch64-apple-darwin.tar.gz/md5/bd2ac8ac75a73330dc045157e80b595a +Clang.v11.0.1+1.aarch64-apple-darwin.tar.gz/sha512/fdd59e424bcbfa909a9e7c89d6ebcb798b5261ba6dd9f24d77543e7aaabec90ca4faebb3c1d58969ee7cf17d893b794a83a7426c399b5b393f31153a93a48212 +Clang.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/f141613a2365f74f5ab5a9a04484e55d +Clang.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/7c53fee9b9e46f2a2cfeb6435221af79c0b6458e7a3848c889f11f235802899df36d36e584c6aa86b171e85ef56326527006f8d489f6189e6806321ac6da7b42 +Clang.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/e047f96317ab0ba21d5bffe75bdeca22 +Clang.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/c486a1b8a44dbeca94eaea7d9f97ff2c9b9b639e155e3e17e375c8c12a04d43bd30301d1fbdf7aef528389a990afe585fe7a7f6eade57586944e7f8ae47e0009 +Clang.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/cd7e2019d43abba512b712efb7b5f809 +Clang.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/98e2e7790ac81ed3d5f454b6229f5b719e194ca8f7b9584182e208335c395eced30b9a4b24b63c5e0d8fd2a220f73e8afafb78d34c7e621b140f92f7e63481ba +Clang.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/8676d3feee0188193109c0795fa2dbdf +Clang.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/fe568279563e4372946a8a9cac38d4a0132c8003f65875e524adf25f7ceda78dfa9215d05d3e0ce96c48c0e7d962e85283110e4067cc2b477f2995f6f1bd6a18 +Clang.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/471271ca81b52643d528e99deab4002c +Clang.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/502c189d2d30b42fa1a4faaca4846d749fa8bbed2b581947e86905a7863431b11a44c257c48f56969fc67580fbfbc0d8e21cf77b94c0eea05ca56d9fde53d20c +Clang.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/41e2dda7887edf35646dc8b3f41c91fc +Clang.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/6a34a1141e22194f08b5410a4389df35242fec2b8e4364399a0de52d591ab2eb06dcd5c1849bd08fa6dad1a75fa05660a11995fc6781624b8f47d19c84286096 +Clang.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/c4a9a40ebd87dcf2aeed2936da13718f +Clang.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/1b78ddd6486d8cab17f7e9673c39bfa87f83c2be56769a2045e778f3b04bb5f2f68725c15454426da98e236c636eded1660802cd1c2defdd61497d0de88e5c92 +Clang.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/57feaf3f44e9247bd61fd3b6975745b7 +Clang.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ba04642da7feed8de983c5bb265fb23fcfdb6703241ed3a2abcae95ee19e0e58cb4d1e7346534eb12a9a0b48ca117697c07783b928b46c6c80d86c7f2317a9c1 +Clang.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/f4f70ff9ac4a37d202d8ecd24a236ced +Clang.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/0ad4fb61b5343205e2219ce636fe3aaf54aab7b0b0a2c46bd4b9991a31460ac8b8f0cb99a5832dbf302ddebb84110d077b94f56c5132453ac6ceb49699fe7372 +Clang.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/bfd93acb62b2f57b155b52e0c77e24a3 +Clang.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/9890b586cec7c29cd7203d35e9327f4e961a789fb5009fc2bf70f8e9d943453a897d62846599e76a37094d0a338933d8ad84d002f5a20c457f7fe233ab3c5b16 +Clang.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/4c2fb61ee10b885b1d65ee5b8012483e +Clang.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/a899a471353464dd55c6885b46d6a6f6fec295aec9a1919bd2f5c404cb4f23a03ea110a07493b7aad832f846e492b16050e2256e0612339848c8d0b591b8d2ec +Clang.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/bd44ec910a0a07fc8957e88e30ba2f4a +Clang.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/03b6aefc302617ee74ca49b34bbf250de87d23dc5b51ea327c7d7764b2f4d6c42195a98db4f94efb5681c4c4a9c6f51b2f98a425ddc6fb153a1c0268fb2c319b +Clang.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/5e0936c5030749f5299efaf713c89f69 +Clang.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/9c61c143532fb8dbb2b7f6f2350f6d7e613a9d5ff99715fb10f878fbfd1b8fc6f5057ed3a0bd50b4589a5160f3c544415447ea5409539b28613532d9e5249e46 +Clang.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/bc13934cf87a25614a94d60125508228 +Clang.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/b4f40135b31aaf266ecabbacf9c59f3814bac7e29c24fc1aa34e37ab091a92f0bd7345887dbcff90eb6654abf4a00d25ea1507b1a0583c8cbaa92211f123cb45 +Clang.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/fe168dda805e979ecbdc253682465980 +Clang.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/3360ed8b06abf3e4a153446daed8f4a7eacad92a9f0cadfcdc92ce17496f42d2ae4847e460e8a32b7e04c62344595ec06f17429d449712f73ad9dfa91be99ed8 +Clang.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/d45c9e2fa36f9c996e9176a8e3766f71 +Clang.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/774e8e77164d8051c50875ad2a197500d17b7caa07932fccb9b051943466c84783786c740d75a95fa8003e76c5af60405e9679e158da4fdc2f3fa5b989bd9368 +Clang.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/6d42179f36d59f7447f60dea4f8ee637 +Clang.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/1fe29043428a35f655181820ff05111a1805aedf92ccd10bc82642033db7cd622cf9468b7d7dd5852db10fedfd67d1a935bbe1731b997da531770dd94a227b52 +Clang.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/68005aec251193f22dc52f3723428325 +Clang.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/e2f4a6947e08192dccffa7866e9a91a762ffa4d939c23556e0190369761487936b052328081a4818719acb460f7cfa6bdd081607e9f8347fc11b4b1c3dec58e4 +Clang.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/8c920b50e5d0eeaad7e6eaf908cbecab +Clang.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/8fc9840f4e8431f8b9e250ea131057f4a5ad21237d7822c6da5f773479cde9c19733cbd0b9a2540406ba48810473ab5bfabc4fa787ae26004879301ed1af3e2a +Clang.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/e635c668aac1987b1a6819cb692b623b +Clang.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/4fb84fe7ab533f511d28d4e57680d7e0e6000d35f38a56cd60dd43b4ab2734e5a1851aa12d00f5957ea887a8e93dd30837e11f66130832e02470ce2f00859e8e +Clang.v11.0.1+1.x86_64-apple-darwin.tar.gz/md5/de3d9417237218d4ff2767a9733f748d +Clang.v11.0.1+1.x86_64-apple-darwin.tar.gz/sha512/dca6e930abedaccaa7a53559bd54df205a03c4e8c8a8cf35bb3afc1d53c1f8775511e095242c8eda76f40622c07536b14b8e334c43514e565a4c8528bf0b2fb4 +Clang.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/dbf3d18ff1c178d0d4d82917b22f8432 +Clang.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/04a40c512d6bf562a204d8de6fb0e0c24649953816093eb1636e613771046d6b5800669e8f88dfe105a63d00da27e8444382f0c0960bc5b6fe3449ea0fd54ebd +Clang.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/62ce0306c66963ccc467f65bc1d5dbc1 +Clang.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/cf5d67e1375a57c86bacc4a47d8454db2f9184e8fa30b51e511c1d6b2ca771f2a1d10c4c8b9a1a4356e5248ec5dd8291b279ded83abf7535641aba903e708d4a +Clang.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/90f967cf84e4eb344e635526703fcb17 +Clang.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/26afc541b4ef5cbd2c7c74d6dd7fed031f3fa50412af568b06557308a7f3034332b7eb01ad36d86a0d81e3453ed0dbc5b2671921a69cef5d2d021ad3c9b6e6f4 +Clang.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/c86b41b136688ceeef43bbb6e8969127 +Clang.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/1f4c008371a3da3af04047528248c7fb3349d57b40003035d7bf4468091d33c912b9855a6f1c7e3e3643ebaee6f09a293dac599135451853f972d05893e5e082 +Clang.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/e04fdc6c07cecc64ab6b48a70cded13b +Clang.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/ade4a8c247ce6843ad4692bb3b7539dd49c554d677e7d8fd727b423e82b6c9846fffdf9a7dfe151f54d815976e451f9c20c1196e716be73e09e6fa3e50e9a543 +Clang.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/abebe4c6fd4d7555e6fb02182fe6f8c6 +Clang.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/82fb13c9cdb8301e151502fda81e7365ba110d93e8b65bfd97125324b9f7f891f647a61d4a6de5c0313a066fe57bda54f87e83d1ba55e044e6fd25af83ff0f9f +Clang.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/3f833f97f599abe996791936ab1abd95 +Clang.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/05495d82b051957180a5e5b3f460eacda2f565307a3e27d7fc88cc9baf875f0d67b679a54b57cdb50a60e96816207c74ebb06bdd2eb3580a3a1677e4c104a80d diff --git a/deps/checksums/clang-11.0.1.src.tar.xz/md5 b/deps/checksums/clang-11.0.1.src.tar.xz/md5 deleted file mode 100644 index 4c4b87aa1e2c7..0000000000000 --- a/deps/checksums/clang-11.0.1.src.tar.xz/md5 +++ /dev/null @@ -1 +0,0 @@ -b4cb0b74b1f3292a89c9720f3e1e2934 diff --git a/deps/checksums/clang-11.0.1.src.tar.xz/sha512 b/deps/checksums/clang-11.0.1.src.tar.xz/sha512 deleted file mode 100644 index 14b91b3162906..0000000000000 --- a/deps/checksums/clang-11.0.1.src.tar.xz/sha512 +++ /dev/null @@ -1 +0,0 @@ -bb98ffb0a992c9907795f7bb7492196f7195fdb5e292e8a764a7a1a8cc078dcf60bebf26ed3db116f78b7022a600c996fd2645e5f6e5d24e4ed99392e1f08df3 diff --git a/deps/checksums/llvm b/deps/checksums/llvm index 43d18317aad5a..05222deacd550 100644 --- a/deps/checksums/llvm +++ b/deps/checksums/llvm @@ -1,178 +1,176 @@ -libLLVM_assert.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/72cb73b4eb0420466ebccc0fea17a324 -libLLVM_assert.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/09f443cf3ea3daf81a650822e7277f4da5edfaf5c1f79b9456f503cb7d884855d5c23f7b25fd7674d66e7ae7892a1749ea7ab87893e99c568e718fc4596e4c33 -libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/b387f40172a505f48c06b04943e939a8 -libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/ca4b1ea26c6151c72c56f70be2cecea58ab5d9b2b793e0316a15c10ed25e3fafaa392219e508d7a21a33e0b1a7e172e70c1b0b9fc70693fc2409312675af2bbe -libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/5b65df008d5b6f824e5cf456cc6112df -libLLVM_assert.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/b0525756f8099bc44b50392bcce955909a8e784bd55de09a1bad445d9f079e34ea8fafc8c6992522edc8a19fc15b23318cce40ddb9b23191d300ff3554c0ee06 -libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/eaf292542f6c2f24f98563c7a25cb242 -libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/350a5158d6cd79039c45068fe26e5bc73343b184407f12442096a4e5f3549f70468ec7bb72d40bdfd69d945b8d3b75a280367c9fb7fce13012d5fe5d07802b9b -libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f25d713fd86eebd93e5ad4cb049b1569 -libLLVM_assert.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/a536a5bb3c23b8f1a76d8eaced4842b711ecae820ce38dbe0e0ac7466773a0b838832465518f2c54e881208a557d88a73bf7120b3263b03e697e38a1914686c8 -libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/fe0952b6450241b7b517c166ccea4c88 -libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/49f8b100199f4d9d668be6314b3ae6c1b4044c9520b2a3bd7812813bac469341208df67b5f875c8cec18a6eec93bb287a36a5235fdd289b2e43bdeecb7621e23 -libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/9f879b954eccefef125bd3a8a62021c1 -libLLVM_assert.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/aca699cad540681d1b07845492abb42b96d3662313aa0177b1764616cf281398d3e8e9cfa59b18440be58c8f65f843857e626ba95fa9baca296fc2406f453a34 -libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/a7b1d9a513d587591aa3308203ce6268 -libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/03e1bbc38635e8c65a1e14a173f2920519e2566ac240afaceea669345982459d7d98c6ef82aeb1c9e199b1f1e3e556ee34f5516bd30ff18cf8b683d91169fa0e -libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/12457a9b3fa21c99a49caf93b373c574 -libLLVM_assert.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ab193741a31f5452abc295d2a09301eeae0c3b6a03bf92691cac84880b40d6527a4628e468234822991ad55e35598ae5858a2bd00ef9eab9c90c45e18317b851 -libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/576f3ec63c7d64491cef6205c359b115 -libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/e48baf95c5812bb3a9c7d37fd78beb961c91fe58beef549d1b4e0e1b66809341c096fae68cc908be3dc94de71b0fe828496ae2febdcc4e09cd308cf697e4c414 -libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/6e1b2c07501a17453c039f549ae3a75a -libLLVM_assert.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/c7f12fefacb420b40ba7283226e1c458ce46e70ce5e5527c81cdbd2fa2cc7debdbfd14aeadb1dada1bf510ac678928432f850e1c3f8f74c8f8c34f078ded30f6 -libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/4c550be2bb9de498aa9c2a71b42b4980 -libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e5b505476ae796d52549884d2924c5ee4546b1d43b6a6205b9be18badbe1cf842181d4c8e699ef6daeefc12d7741c558f2594ea8bda1661a6a00bb34339191fb -libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/247a069c1af0d07353ababdd8d0ad534 -libLLVM_assert.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/e7b46803f2dbc9734d824e0464cf1c999d0b4efd2ee7283695a94e9e04ded524b60cc97498e02d3b4330604fff7ce3b59ec74839cd6793657cb064158dfe0f70 -libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/424a59e82d63f0559a4440f97c4fb0a4 -libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/aef94d142af96419f3749c13fdc89d2f0a9d072d5bb817fdb787718aa04825c28c9187970645d0dc48f79f58e5eb48003267d78d20e09c8bf76155e016f8c2f7 -libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/684d885f70bcd2fed245a6d5e275a86f -libLLVM_assert.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/808d932f565a03837bc5a189d58e942ee205e34cc5f985f384aceb83dfb3b721c10507339079dc87edc90db92aacd01e95534754867a6184755580b06699a6f3 -libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/087b86f490f1b0032f0b63beedc5d8bf -libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/566bc8c09d9b4e01ad8ea784d1e4ba13c3fe54338d49043251b91f9e3ef2ca718f64369f7b637a45b011eca03940825d2f0a48d306182ed32dc3af6b6ce757ee -libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/4e86a5d2a79ec57402a36d05f19ab870 -libLLVM_assert.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/de36ce76dc6611c12957123aeefccb1be26ef7b63c5aea0967afeddd7f473ac4674365ebfd9e35ea1607567b9701a1d58b55b1100b7e2f830723bf45315c68ca -libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/7cda46769ad2c27e0ba9e7404e1cd7cb -libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/a51eb2d0f4a61947b3449ba3ed60110b5e183fcd09126b9b0bfc63d285e881373e8ae26c0925e42bb3b69176bdb6c9bf9301ebc5d7c9775115af690f728d1476 -libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/8449c26f913b7b6ce1aff4e0c89d223d -libLLVM_assert.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/4196db36c4fddd2f267b97144ba0469f616952931df757708bdbdb28bd5e7615cdc292456019f5ca5747b708e7b805a2651e56dda74e33b1a8638d3e6197f856 -libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/73933ef6ac652ab1df761f44054ff926 -libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/5267f1bb0fd73bc87f77c5b323b2664fd98c1e92aec67d7dac0ce748c57bf68284585f0474b995cdb7bd25c7b0840a21be55cf00e9a0b12f7bafaa7a4626c04d -libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/788729c6e58a0e0d1ff06f7a07157e09 -libLLVM_assert.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/e97c0461c88c86f2ef07fbe3e1298d03381b3240fde1ce1e3e49e267eec81bd3a043ddabad90a9014d9eefecb632eeb07597a5e8316ff9c37cc6617800ff5e8a -libLLVM_assert.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/5fd60a44a572000f2621dee40ea16841 -libLLVM_assert.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/c8104fbe347b8984a6c60ce4f26ebc85f2618a225f1b9787b4f7867bbab887ac9b661847e72e0bf8ac703505b9e37aa83aaa1367228d96ff7e52477c5de805ec -libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/e97353b1761afd7a24eb9ddcc38f701e -libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/34580edbfb68c7472ec40c14d5aa48458d754b9cab24ae7cfe3c1bd6ab7b383ff021af4963b79495028fc0c94e07e221dfcad8272e7815b1cbf3bf4042bddf70 -libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/59c6c59e083c55ac2e2ab2ad25a330f4 -libLLVM_assert.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/569bd4a55f6cddcfcce250f408cd1f8ea1c1a20ba81076a24acd27fb84242ba9c44c70bb7ec32d544c23679bd9032f378e604d0df30b948e12a0ac4b08afb521 -libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/ff17494ba9d7ca146d56eaef17ac9d20 -libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/10e1eee6d1b0e84aaaaf8424ebd9c07f08315dc0d92d34ea05165673416a1c41aded9ce4f1980b8a06abf301017884756e0835735677e125ee0854f81e90a881 -libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/3848a194f4dee0f4e0140e31f68e2e8c -libLLVM_assert.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/d0b2423a21de72ebaa76a69e7764f83f87f572f880a36cc6e26582db8f49d054265c4d8c12411b735b623c6ee2ba90b28dd37821e9bbe83120a7babde376a969 -libLLVM_assert.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/cba351ba676be1ae16ae194f1d313a39 -libLLVM_assert.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/c8dde7849ab528ff0c1fddc5f76d4fff67680fd93e8c44f5241009f4c5a6049e6fcf4ba5c168574f6efabc59ec87d81f1d1382ff55abeb9617addf69aef385cf -libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/6c2b449509d27d65a70549def9566c58 -libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/bfcf864871c590eef891cf604daf1507f1a9f117e091d88c3730dfb60dc8b49133b388315da8cd75a51683c54d7e7ae1887aee617cb8c704a6eafe7d0b81e948 -libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/7cb9c53aceb48acc4b1ff0bcb2d32073 -libLLVM_assert.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/e5b47e3697b695f45117af1d0ac0a37886e9c85d128d8b7d6ae40f3ea957b6ef04dd1539578bdc37a80f52b241ff34f49d75e104bafeaa76790b8a57ed95d1c8 -libLLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/6bbbe4f8828d965e6bda15ca6ed686d3 -libLLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/6f0ba6a0b8cfe9ca00d4a1ca11a0537542ca6b0d108b44148ad558245fc9b9a5849a8c31c98ea78c5cbc781cb264c9fafa4568412030f98ce78d895f88ddb083 -libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/ff941c8f9b710d8300eeeb29bf77688b -libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/fc5a41931d5af01452f9a104ffe4434a8842fa6ec4279f7534e8825bab0f7b5395d973a7269643af6e662b4dd8680920cd2879af4208aa6a96f0ec3d9eaa847b -libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/b429299c2ea4123b53d352bf15436fb4 -libLLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/1365e9df2f0c69be190b956e33ae8d89fb468f3475b25a1955ad9ad3a87545c9c433af9bc1a419394afba2ed7d06557a59ae700b19a8ca99b1989fe2c51fc24b -libLLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/7d1d63f817c40728881da6d5e5a759f3 -libLLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/c2b81988a6fa95a5186580fefe9ca645a37bd0b1529e77d3b32c60c2cd3201260197997230d43d96f5d94418ca85b641041c13a1a5737b6dc5002be6b410cc47 -libLLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/f497572a7ddc42ccccf8588ef1be63ea -libLLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/5646bd76573eec9ee7276a702bdf72681f9271b8ee06903a04fede7057c012dde7fd2a4c297f92b5a13ebdddbb7e82decc9bfbb1e6bf561da16bfe4e91a39615 -libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/e2ca9e7ce03d1d5f9a8f926ec43a2f1d -libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/a62343736796c8f38593db6f433bf88652163e440ae597647acd2d03935ce8644c8a73b5759533a126479ff8c1e7aecb80f96683b119b0568432f90b1eb9a616 -libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/e21cb8bf3381613346c8e7e0a557f3b0 -libLLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/ca8c593339b19b514b29dd60e0ddfe8027b74c549915430e63baa94bcbb655640e1cfb5c0671eb02a5a966aa219b1be72a8433f79fd6b1cf35a48663cd0f9903 -libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/698481903ca0c777c866f7d3df59f665 -libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/1f06d2758817cbbc87e17e694b2a28e361579061e713d434a8305e67101b86d403a5032342f032e779c65e5bddc1618139d7dce328210599166d5b89aa6ea53c -libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/3a0bfd5e1b7f0bccb594d8247b1c3482 -libLLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ebe41b12be7dd9aeba28305e05cced23a4536af84712f09356071a2f8042f9ba5195bb252b4bf641dd56141bafc04aea8a98ff21249d865ffdd0f4d2e4954285 -libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/b6be95080504eed815a14d43ff20ebe9 -libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/a1107732bcab4810a0856e0150be52178b71d527b77f37c9cdc702f371c7cfc16c5b42377752cf403a15584d891a20b7cb73f5c61f4944dd5b7e20272c5e02b5 -libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/abbd5e59d90b7207137537782c08c685 -libLLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/b2386fad803560b3b995b0aee4b8bdebd225953f380f36e327893b6c29ddfd955b2792b02ff580d8656f978d28d7ab4d6ed1d06e585b2a7b2fa05e5e0a8e02b7 -libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/6eafded818a43bc73d2673d09728f1ad -libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/970c3ac986fc57fc0e2326fb55ffc8a32b88771e2527e5407d0e7c70ceb6484b19e906c6e51f2e7f93c92c2fba808e91a7567a07c72b791fb150bd12d9e80716 -libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/7c8e834845e30584f3980ca02df71a0e -libLLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/21c1adbc367ff56f1873bc27d8e8ddd7e860b52b73a8e7663d93ad7f4c9a5a116975b97298d804821b1af7ec05547936a25586ff989cc52f61901fbf8ed60945 -libLLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/2dac9d6b8d1bf5ff11c76381aebf23fc -libLLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/894a4bb9eeb742f7db103d16c1f55f735afae26419d11791e4dc5cf97f285681b59c91d6f41aafcb59d6a274419fa3cd5e6bd9496577c0c71732c7789b61c839 -libLLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/1551a6e70daff5c990dbc40cc069a73b -libLLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/0c0c36e42323364648844bdb3afc8d0efc4553484924e1fcd74e33c689e0b4076d614e85b29afd989aa007e5c03bb5b117504558d44e0566aaaa616d18c26161 -libLLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/ea235c280d3c76f05842b7630d1a5de6 -libLLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/cea4aca951683b3ec4cd590dd2d6626267de2a12edafaf07304e2dfdd0ee799f88a9ef2a126cfa32546fa221f724da928397798e1beba0964a80a8a56fbdd1bb -libLLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/e3b21c9a06e8b28be5e727807517d71e -libLLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/880f67c2c7613ee2c50c834c128770e06d58297bfb1f80b11f05833c231ffb3e1449b5c6069590f697c6fbba58c80719c8fb3fdc2786252176ec7d45db93db8e -libLLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/73a6b7a8837aea5b75b3e6a8f721dcef -libLLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/6fb7611a7f9a95123eb706ead1d470c055c517194839feb2c235285ab9c7a11be8fdc774726f64bb51908a9c5ba6838ef2376455f3064a6bffda8e9f8e6a295e -libLLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/2d6b5dd1752f9425ab9aad465a6fe691 -libLLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/6d107e0929fd121bf7cd98afc83c5b2da8808d69ed3126b87a9238ac7adbe073de96da0ed211eb226eabb64ad88a0176cad2fd2e86f928f8903995814f47695f -libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/9c06d611fc1fa0ce4fcc0c12570f8471 -libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/25f8ba2faba088dd4a53e25ddbbfff7ae35f23caa05e43c7f8f269ca289820e423255b174451a7f50f3b0631b4b3a1a977a3edfd67132f461774cc5a59178778 -libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/79838f0f3b33f5808a029f9ad47655a3 -libLLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/2bf5f9bdbf04f15cbcbc31efa5d122f46994bb9070d8421105dde3ffac4379be0b9a1c87e4b1224cff198b75ddeb9edb32313bb6e63e6083d97d039bb1c11e87 -libLLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/f0e546033f265a397272a69704addc54 -libLLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/68c8a2f46f18e70998415c99c4e59241138b455e32f09077633ba8ecf4de90ec4ac76ea0d0dae0cecd4e0a000ff879151b54593bf9aaed076586bf6bb11f23cb -libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/39389153062b455b210aedd75c8ee0e7 -libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/4301516630ff4b0ae81c37a94b32d9905cbb180d564692a4ba6baed66813eb7fab9a630fc6a252312af44eee8453eb4758ffef14d01460bec6b9b60a8dc59e54 -libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/b57ba068f4a5bf91706d81ebb5951482 -libLLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/8c931fe67045f2d321e3529e714835fb12d45776e32da3ad88a2180f92e9d28c55c7260af8dbac6273de41a540e18bcc941bc46f733d01b10669ff2620603893 -libLLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/1cc16ff9eceeddf92f3dd2d84bf53602 -libLLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/5b076f85ac97141881d165941e7cf5d3b2cb2e7aa8456dc7401c066015443720047887ccb2ced73a730f936770dbce0a8d45c4dabd5743fc3e094a8e6aeb1ea9 -libLLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/c4fbdb281f80c19459fdf3b9c8e5df9e -libLLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/b79582daec0842d6975484cc7848c9e6517b6a1c4d71f66ec348b8fb04e671a1231f47eab51425fd08a5e7a1c6e85c6414fce85c9e305eba02949db7ba77c326 -libLLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/34d2e843abb3c3721fec3da9d024b00c -libLLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/49f2a15d78f4aec7768393490a80c48a88a3fe3c5728b303d9871efc74862bf7a76a6355e7bfc08068aa8b4f6f637f51276cabc9cea75749fbdf5ee373bf9e15 -libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/8e96606a79e4321b38546a15c05bc69d -libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/6313fd9ede345acd9b228971846208228f67f237380341e3631725a43759f7da804a2b9c57169a08d02d1130bef51f7a7168fcf200c51261cac04f590766bcd2 -libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/fa3c453c5ec7068fdc84bb1ce1575b98 -libLLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/576e09913861b3148894bf217c3c411a9e8f8e67c47c2faae1c5cdc01a69b7dd411e9d606822304b4454fec9594e09871e7a2f0e97b88b2d5a6def80b29f0eaf +libLLVM_assert.v11.0.1+1.aarch64-apple-darwin.tar.gz/md5/c9b855046b6f439f666ec415dbe53517 +libLLVM_assert.v11.0.1+1.aarch64-apple-darwin.tar.gz/sha512/431c223b959b8a00b0ac4efda96206e51ddc87120eed6225f888254b8119bbf9f4e87d1a03bbb5ed19d01579538b5448eca9af0d03e97959ab4d380d0207817b +libLLVM_assert.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/8ce7c0aa0b750a1ff4a64b9f6153b95f +libLLVM_assert.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/432942a4975cf840dad1014253ea43771b2be850cad89e8365a95b7307df0d89f4e419f785abd131aa172fa5c7db3359a092ccc6cd8c1bb634dcbb5a146d92b9 +libLLVM_assert.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/c1e04cb76eb77208ff7f299d62106a33 +libLLVM_assert.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/dc9ea37f712723b69e6e85965a25c65c0bd57b406c991c089f807fb33c2818988d619fe8999390f2c529b973c2153aea1a5d24440fa78f76fb4885ddc953d82c +libLLVM_assert.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/7367d34fd143e277eaae745b8a547e05 +libLLVM_assert.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/00df2bb9b55fe9db8ae74d8b7166e753156f7d85421eef07dc700501dfeede262849ad101f200185ab9e4573c67a9eb743ba35a3e1c71e34cb2107a6dc1cc41d +libLLVM_assert.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/396af2bf32541539f33ac6788f45aa3e +libLLVM_assert.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/5c7675d5e84119e594260a41ce7905382cb432bc6eb7e06a7ea86fec8b56d6563defdb3c966e499dac98edb9dd37d0c7db2b54f08f9722a9aa861563b4c5977e +libLLVM_assert.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/062cef64afdf95c560e0036ba888f3ca +libLLVM_assert.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/8305b2eaabead7796b1f2248a28b0f9fea507a07c1c72a2d47cbe29c02a3ab66d5bfad67ff0cc475649d13b3865e9c788c24d30e36f7235ef8ff1347ce26cab8 +libLLVM_assert.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c82e29bf35dbd7e0688d0e76ec7d5a61 +libLLVM_assert.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/dab85fb625d5bcd95999a8c1776f4cae61ebec650e8ceecf06318666dd67c6e6b61b328088d0c8e3540c0f2b46eccd2465de49d467eab810878e4eec4623b3a1 +libLLVM_assert.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/a6fe2dfed05e66fec2c51d3775b4baf9 +libLLVM_assert.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/43ce6d2097770908365fc641231243810c7ab8a50452d9d4f4d1df90f91fbf9841a120c2b6f32bae46edc74aad879db9e9c33a31d29050fe21be6352253c7fa6 +libLLVM_assert.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/17b55047bfbf8ee641d13a000d9be7a8 +libLLVM_assert.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/7492f6cc954aa2ada14c989e2a3da03a60db785a312d3efd7fa4c8678a56112d0b07f206911fb63459ddbb05dd5fd8497bd46cda1e4e3766ec0e18dbe225327d +libLLVM_assert.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/8f61e4f7024f4b8b3a20dd5217daa160 +libLLVM_assert.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/809a34b6ad78961a9ab6c1bbd769f4a299905eae693375555d4901d7d4629820597a7f5343d354f1c2aad5a058537bf36ab7f6e42a0a5a0407c4b4df5b447494 +libLLVM_assert.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/0e23f4b0bee8da244feac6d5eebc10a8 +libLLVM_assert.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/e2e13bf2e1bc53dc995d2b9c91c5543090f532d63714028e58ec770450aed1462237e3a73abcda91090863a8cc286b15f49f1ae87866db7bb2e2beb82c8bbfa4 +libLLVM_assert.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/821279e10a684f5fa338ebfa7e8893f1 +libLLVM_assert.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/e1e80194ca5d992a92fa4a581de3c85c21ddf8630109849ead05152b302a68fe2df49e9c047a73d6bcfce17b2de8f5ed176b6c367609f7d8025049069d22f031 +libLLVM_assert.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/e2d255f456953fcc4525197d8913cc65 +libLLVM_assert.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/1cd2b9230a74351180cad345a8328257179e9e257ebead8e50f60c4bd2396058e89ef517069a204971076ffca85e47c126c61d8001708a28d77059c530118de0 +libLLVM_assert.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/2960d7427f093eed30a1cddea99df8b1 +libLLVM_assert.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/d9e1ca448bdaf12b1e63f40d3b1d4e3ce284a6cba5cf3bbdb44efaa1abbca7221c8912bfd589e08609a78044ba70cb0832e0504fdc5e7def83cc47a032c58440 +libLLVM_assert.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/f0231f640206a4e8ce7d35ead7c58356 +libLLVM_assert.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/da6a85cf1b352e903f54321eaaf1398b7103f284d93469f97b651cccd839340146286f6b96a46263ab0802d5119fa1d2feeacd71d59e2fe99f11f2ecb2ae554d +libLLVM_assert.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/931843dbc249e6634763c0e810358c81 +libLLVM_assert.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/4d540b1556da1c9a90fd1fb9662ded55e1f3948b3b612b2dd760b837db820232ebcc4cd39ea2e1922e83b9e61d45e1b661f83d6cdd778669b5ee25c1469f037c +libLLVM_assert.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/619bec19c3d2c9b097be99e73b5d7f18 +libLLVM_assert.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/5b4029b1a6798cda9073c2689b7cc566936654ddc8541d101b382456544c5cb6db6a6827f33a47404ce89e547d4979edab3646e51e3025851f5cd586a5f290be +libLLVM_assert.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/05e50013aa09fda6d85136da9ffa923b +libLLVM_assert.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/121a5de386fd20940622796364e28cb62ccc693906e41863ea6772ef9d802faa9caa70976b24d645094b56f850d29493bb7ee1ea063a94ce38a3e39dff0ae037 +libLLVM_assert.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/1ad1baf3e05fc081da46f33d858dd25e +libLLVM_assert.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/99aeed28f8e1ade9b4a6565dc63ff89bb2a51a0b7cf97158b75e0ea77c50f1a8c9f67dfb92accb24d3fb39d9c2a041e34d09085905ed10cd10f1e306f264234c +libLLVM_assert.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/20093037cef1e6322d87a56c3e0a4d6f +libLLVM_assert.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/e3bc2b4273df512fdd7e2a644378552aae66268dd173cd280f9400e6c1b2ac9efc6c96ef01a900d27b1e5558e5db252d40f8c269dd58fbb65de32755ba6306d7 +libLLVM_assert.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/2dcdcc72d28c26cf68d0ad425ec1f685 +libLLVM_assert.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/17d61c6e10c90602d5b84130cf614464ed52517d94375444e16f2879f14dbf0632ba9232600ce2296f21af4ae4245e2998170f56a4308de34bdd3f6aedeea3af +libLLVM_assert.v11.0.1+1.x86_64-apple-darwin.tar.gz/md5/91f9e7d6c9f4660788dd2868b016ee7d +libLLVM_assert.v11.0.1+1.x86_64-apple-darwin.tar.gz/sha512/6efdb27f8675aa427a9aeb2172b8cf932468457d5dcdadef03e7562546e2e1e5d8e7b1bcca527b428f77ae49212e68e3269895dcdcc8cf1819d2d07093a6423b +libLLVM_assert.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/8c127663c6c13a9ef68258ebd8c78475 +libLLVM_assert.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/0537cd09b40eaa8215185b134e31607f7234f1ffb8ccca52ee025399456f07a6c51bed8fdf89a7ff32e92308c8d2a389800a68f44e73f7da56832eba08bbfc5b +libLLVM_assert.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/5b39c1870655632d1e00fedf10b0ae1d +libLLVM_assert.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/745ebea91219208ee58a95ea8cf5aeb4db08cb54fb2165c0f1b4ceaeec95e97b83e21fbe1ff186fcdd611052c5c0a33c37848afa468abaa903f05eb253866f6d +libLLVM_assert.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/5c833449f92d2f481751a5a610f37ef7 +libLLVM_assert.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/39b64e911678eb2886635673822e8345ff44e5ce888647d01572774a46a4c28e06ffb2711a5b271b7e304454e92f9ee68e50044f00d337fb3e0844445fbb03cb +libLLVM_assert.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/f8a507adc3cb875b0c91f264b971160a +libLLVM_assert.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/7cdc82d9459e1a93fc386d19f55fc606001bd6287dc8fe8182f1439e07858bde396d934aee759c9bf6469fe6f5e03c7e4e95f52f718b59dae8d2cd5b4c0b27b7 +libLLVM_assert.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/845a28db01c550eee6e5cba23c950009 +libLLVM_assert.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/a163a6c3d1c5e76be009f1bd51275fe7d27ba9ddf23ced5a63b3e7b401943cc815c2bef9c665c883f1be918f18c667ffa21f8cf012de8f7715fa91195495a349 +libLLVM_assert.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/dee317fdd6f8b4f4f2ab960baddadc0d +libLLVM_assert.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/9f2807a1cb1582c3327bc98eac570eddab14354f06c608636060913983e708e18b9f01414f29e347cfb679a5048e9fb6964200620fdd4187886cd0c97c8c5469 +libLLVM_assert.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/3d049fac6bb62465bc6b913d4fb33aca +libLLVM_assert.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/cb2a66837b9bb14f7e9ca6b5c4ef5e2572a2cc8053769f77b16005bca329734ab93c0f7052e986391d6eebf7765dd718385c284b1d3b9caf6083688940007b6f +libLLVM.v11.0.1+1.aarch64-apple-darwin.tar.gz/md5/1622ced2d1fb291fa7b79f3c2911a65e +libLLVM.v11.0.1+1.aarch64-apple-darwin.tar.gz/sha512/afccc9244636220e7f892a6e6aa0be665080090f6b9f2e8f0ad8d350d514ec4ca7f7db20c2186b2a6db3d00178e56ef06faba4cca3f801bef92b934a9207107e +libLLVM.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/666901e42c570891ab93d05dde73a812 +libLLVM.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/1365cec23dd60960ff249532cc833684ff9ad2e870d55b321cae6c2b5771512d56dbbe3eece106b71f2012058f5ff4796ccfe09017d3ee08429174953f28baef +libLLVM.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/72fdeff0e297b61d285ec2d99261abe0 +libLLVM.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/b6061df19c6cca7b96853a0fcde397c8ceb833758b2a6cd71d16042e551db082341dfc63c6278326a0c83ab6651d09bae68c2f746b44ff33f86d3c8db98620c1 +libLLVM.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/bb43cd1360f79f6ee4df73c454977718 +libLLVM.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/aa5c1e0c1292b9c59efe41de65ff4a5cb20af499963abab44714aa1c17db3aaaec3e1a13526241349dc30576fee090d522eddf2cd1c569800323b923e1f60cd4 +libLLVM.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/b48cc232f36ecd03249decfe6f9e5080 +libLLVM.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/487f2e3d31905c9a68b1021edb6e930b3af06ac1ec7c75249acc18e16df6407db157b95f23cda9b033a07d6a0f0925b3cfbe8bf21c302857b366509d63051075 +libLLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/dee3ccb2973e47f4d8683df2a0dc3e13 +libLLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/6ab2ad568836a11664e5f31950a0146fac925af7eef11f347a29e549c9312adec6430e3b75a2ffc5d945d0e7a7fb175920a8633613916d9ba5f8da0930a1853f +libLLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/1d45125767f31c302a2f9929f95f3930 +libLLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/a1c360785a2f310e978b92d053a17149935227b98c46acae12fec18d692542ab4a109424faa2d62fc02c2234b784a51afaffe44aca24689201939329eec6b569 +libLLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/0bb9a73b15469000b67ccabb401ff501 +libLLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/cf8522609d49d0fe184d56f4dd1a6e83ac0a004ae42587619575e01c5d7ce5812867a5394009603231b4d8c6d682dd2505c1d7b4b61935e7b0cfa24dfa7a68a5 +libLLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/d1d9ffe09bd844439f2393ca5d580eee +libLLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/9c56a4b1cfda1e4442a0e65950a1ae250901ca1faeb6288f56ec378c142f762629f2e07029a4c40a3da882292358b2aaf38894fe2a3d341f0ca6b08ec1b6867f +libLLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/d4f45247ea38672c913812e2f912ff02 +libLLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/1906a20aed81d36063a47b96a1a6f09876d977f56a2327241e050205c054f704d160fb066aaa0d0672f78101952a811e0bc0b67f88e5a5cfc0ed9253aca0c056 +libLLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/c9e91730b469a4632a654c3861a24e7e +libLLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/f975049c38897bb1619f5e624e5c57cd2dbd0060b7cacbbd4eb25bc6fb5a8843f8dfc68560d9f13f393d22d78de0f1fa4fbca9d3455021f06a65e44fe783504d +libLLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/d8a2bdcdcd713e12286f80b504760937 +libLLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d0cebbf7ae1b9ce8a55752b10f285fec9a5714eac484644fc0aff8333d5a556be3472e9d332efa4725be78e100bb2b1d1ea70ee56bef55366a345d5932a03813 +libLLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/870242cc57777cecbece68dcc2cf97dc +libLLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/5f21baf5097671e6c2d792f52b65c919b08ce17398ebf2220118b4588cb46182d405c8c379872d0e28abd6d8c5e8695cbd0bb8a9d6454cd7a56eec476a0d390c +libLLVM.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/62fd82cd980da63413b37aa9452b02d0 +libLLVM.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/e69b412bcd8a653570fc20b977d16ece2bbc40669b61aa2383f26f11510a36948aabe930a003ba99c695bf18fe3a1d6162c4bf9d47d265ccdddf6310004726f9 +libLLVM.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/d65dc4edcea1e1eb9c4657c730d514c1 +libLLVM.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/217c515ee9da368ca1fbd5b43537865f67b3229e71ff6edd04840edea59fd07385ee3055a78b8a390ff8a1c73b89c3f2b9318669a85f476c94b1ebb0c27464d1 +libLLVM.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/81960d2abfaf01c7ecfd3dc260d4faed +libLLVM.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/dc31a9337d2321ee3fa1c7aab0afe349b9427a4a743723e5a9ae6eaa8d8cb0d31740ee690361b554a75c372f316a6e595279cc35e06bc48bc972f3863b051129 +libLLVM.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/08b2e6709a5be7b6d6c8beea0c593707 +libLLVM.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/291aafc45cd9ab282d1be9f983949510a3d478c040aac874f611c83b64061cb99367f4f958e3169c4700abb5649a8e778ce2e9666c4ea82981bfe58306372cf6 +libLLVM.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/640d49b3005923d9b1ba96a870fc897c +libLLVM.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/4e7ef6c4b339a3291e5574ece46e94ee5ce5f78c842d232271324386e269387af7b90a55160b177d3b063407475ddcf2e4a88d4e892a1e1c37c81a90bcbada1f +libLLVM.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/64a706b22f1d573f4aeef77fcb25ad22 +libLLVM.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/637593ddf0f30e2d0a5721fdd755ef103349b937c4296246c6fd6e2a026545547d3a21564663af1ffbaabb0d599cb86bb3ac267b5ca258745189be63a83f3dd8 +libLLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/67990d0806ece4f547f1454c81f7dad1 +libLLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/de93f18d38fb07a4a27273ef9bfd2abcef2733d63db72c48f6b7f2d22dbcd63d33ff1f5c4e625f6467160867dd3f63db28ae741131b0c3afd6cd2031e798f85d +libLLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/6416aa0d10dd8912872f85a0a48d7510 +libLLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/cec6b63281b14b30d2ad763558409efa85248116e21b25f4a18cc3b81fe7a1f4dca01fe6c4fbc5b63d1c4bca520d0b97c5a87d64e7cc3ea1ed57ca391a5b89f5 +libLLVM.v11.0.1+1.x86_64-apple-darwin.tar.gz/md5/4a3770cb3bcb52fad0002d8eb6ea81d3 +libLLVM.v11.0.1+1.x86_64-apple-darwin.tar.gz/sha512/a79c451f9802859a40eb9163f2fb1202d47f3422ef024f5935d359953401fa0b7bb803efa2a5d28580a1c40dce0d008283ee996b2eaa3988c758dc54ef50d289 +libLLVM.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/121cc23d1f7c21f72c46033fd69afc2a +libLLVM.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/b0ae33078f61cb7481de09566b3642b28f9cbdd74db664d9f80267c6261fba5df4e934f8988d1cc4c36ab6187b7d1f0d79bed7a7ec8dadd0c5b003a891d65635 +libLLVM.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/5037fb20393bc2a5d8cad3ac05ed5d6c +libLLVM.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/40c7cd78c0327b814d12579df154c69d61146f6ef46daa469aff27bebeb05fa5b99a4a6c9c9b11058612e15dbe822758d7ece39265dfb0e27183bae4928036d8 +libLLVM.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/f92f9a96669af2d90cc28b4f7d1f9c19 +libLLVM.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/6b9312b00a44098cb0bfe2182095eb7d5f93b3906a435159bf73c26c61497a381c38a714d92a36f38e986662f185d31171e28789f8877de4ed86d8be61e6bc42 +libLLVM.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/c85897b5e200ae778cef4d8ad0eeab88 +libLLVM.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/a8eff9c0c3b3c433cd8c08a692e1768c7747f6b4dd090dcbb9b24ccecc3f0012370e5b0d5c08bcf456bc9b6d93d9f60936328b407dc2296c77d24d8742ee6cc1 +libLLVM.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/656661b0993b406f47cc082f10e05fbb +libLLVM.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/90b27206281eaf6e44ff7be00d2fb9601879756e7dcbc1cfc648b097a012383aef2b0817f25e31ff95e92a422aaea2495eb3d186fcf6f8812ee1af96c190126e +libLLVM.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/6a435b420e3632de07a6fd28d014182a +libLLVM.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/f11e2486b861d73577c0a237dfd23a6910322df1e140e5a3bce0fe7e12a3131498bc264057bffb0a42a54cd538887c31b403ab9f3fcce60bc4ec85f44ec0a0fd +libLLVM.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/670204d9d98d85aae9592f1fd82acf33 +libLLVM.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/b115bc8a87aececbee7ece6f9701a3fe07ccb6c06e7732ee9667bc6b1d58586e31f4f400b06d60e066f521f9fa2e6186903fd5ae36917185040bdb941adfb41c llvm-11.0.1.src.tar.xz/md5/6ec7ae9fd43da9b87cda15b3ab9cc7af llvm-11.0.1.src.tar.xz/sha512/b42c67ef88e09dd94171f85cdf49a421a15cfc82ff715c7ce6de22f98cefbe6c7cdf6bf4af7ca017d56ecf6aa3e36df3d823a78cf2dd5312de4301b54b43dbe8 -LLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/md5/5be4edc31ab210cc82ebf1f54b1265ba -LLVM.v11.0.1+0.aarch64-apple-darwin.tar.gz/sha512/80766e9fbabeb917acd73170a5f1efe4c20e56057cb1ef3949e56af17998b9e0df6be2a49158d9a11178f92449ed6cb849024b8ea598d666c492da249863548b -LLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/md5/a30c59e4203473bccc9101de03a2f397 -LLVM.v11.0.1+0.aarch64-linux-gnu-cxx03.tar.gz/sha512/54b18e13d8ce56ee837031df7066cef80779f2c5b5bb6c95842d3263c86b0ac29e995fb96d91f259b7d97b2a6b716da6e12ed8194ddcd0c9320a6e69150a3057 -LLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/md5/a59800f9b6590831294d42799e47e432 -LLVM.v11.0.1+0.aarch64-linux-gnu-cxx11.tar.gz/sha512/edbd8bf8c5dd0b6150d0f092a043296f2c63a1a5ccdb101c2a953eafcd706c110c4791adfa46cc99332e9c67a2ed366289e704a7279fa760ac8af92efbd5fbd8 -LLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/md5/8f0607508601a4c682c8d8dd251f4d2f -LLVM.v11.0.1+0.aarch64-linux-musl-cxx03.tar.gz/sha512/59d5418cc96f14137cb65737e9fbd1846010d724e8af533386fe820a71664992823b772b8dae58258bc911bbfb7e9e3319f7dad3b9fdd527e3f6a1f304578c16 -LLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/md5/6c99ea3f1b0a9bbd04bbc919c9c4fad1 -LLVM.v11.0.1+0.aarch64-linux-musl-cxx11.tar.gz/sha512/8bfd91ae7412028d9d25320deff175d86b3e095bf5e7a2781950cea18d1f3e0ec7ad46ad3a3d3bff721d591828aac4b19af8ae10ec324f49ed092026a3490e67 -LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/6818ad05767ee2a782613125f48dcdf5 -LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/ab7e01257e1182f819bea8de889185e1d87eca4b1b2ca8205c9e7b284005aa498d0941856d15411e844f745bf02df096e2740f66e5630b7d280b215fc3883258 -LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/c58d60a8097b29d9bbbae81331a84683 -LLVM.v11.0.1+0.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/9258c1ccdd0bc135b3b5922a766fc20e5d9522719e10e648d344ac0817f08bcfe253026e18107d281cbd9a6ee98bcdeed5efdb52142adc024e77546c5d280569 -LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/md5/351e7c8bfb2a925ece5811c6e08516a9 -LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/ae4ae45d033e263c8e7ae1f7ba24dc43b4f55c150e77d3d9c643ec3a09f702ef0fb28aa9f840e1c32a6fe5c28d8e45533ea9a25b1a767d78429f78b93c898992 -LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/md5/a97853f6cd8046a5b730dda7b800b3cf -LLVM.v11.0.1+0.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/e63f11f157e08f848d3103c0e807fec5dfae8348de4e854d5fe78e72c5c34f3f387b07feadade05437c84582440fd19322f24b03891b46260d28cf3fd33f2782 -LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/8ca68d4bb2e4076c49da331fea41fdac -LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/8fed9e024b3bd3424816588f5b3ee3566631f3bcb3f32501108d3e60391cb03a606d9c757c778c5850502519899ca1ed334e6b2a5762a8bab5cf64310ebf4c29 -LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/a5ceb1385feb62f5ca3e8a6ad6531ad0 -LLVM.v11.0.1+0.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/13ee40541029344c6f75a674c15aa0205d00dcbd1eca675e11f2ac1fb15a7f9624cfc9f8e26ab792f146b98362e981e63accb3217791b7260bbdb61aa84ef00c -LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/md5/bbb55319cd6163998b6fe36b2eeef4db -LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/398c6a1836bd32467edc6572b409656a675c75917b097095c3d8bb33d13f3fc0b2c2331d7f5d150c4744f68a450fa6a5184f4d662a0cc4a7ef7152c81fd444e2 -LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/md5/1ed476e3ebc4db6fb0b9ea218eb11558 -LLVM.v11.0.1+0.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/e736bf84fe6180fa510a070f7f9591e8fad16300bc4e8dd1d982df2806de7061c31f4d152eb1cba9cdd9e41b074a0e65536e2fbd336a93f493bf1e13a0321016 -LLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/md5/264b00ad61ee082e0ae68243532b9d63 -LLVM.v11.0.1+0.i686-linux-gnu-cxx03.tar.gz/sha512/d5307a36c404d1b8a9164e89eabb220554423960d318c6ccb64feadb9900f1f00a4ba3a3400ea136a5c5b08efab928fbe8e998a896027c1261fcec6fc99ddc1d -LLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/md5/a774e0bb1d7c94dd4e70cb59845979a3 -LLVM.v11.0.1+0.i686-linux-gnu-cxx11.tar.gz/sha512/ff9fb1d986009df355e6c20472e819183fae939a60afcbbab50fb4a047d107ce946ba32aeb55c84079a8cfef92f85c1e0ced3976a715ae1b4f204aa7d69efd8a -LLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/md5/88a0c5300850fbbb9e2be2fe0bcf377b -LLVM.v11.0.1+0.i686-linux-musl-cxx03.tar.gz/sha512/719e23389c70be70f4401cef07fcf1cdc51e670a3d6ae596088fc0c7994c3bf835c73e544e65cd92ac41fb08999fcbe8fa20d89c3b4242fbd65a127ffed3dd31 -LLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/md5/63bd2a87830c152e58e980c27bb8fc9c -LLVM.v11.0.1+0.i686-linux-musl-cxx11.tar.gz/sha512/d7d50e66ff2176ca400910c03d7ddfc34afb7e9b4c7dc785b55fef8b1a49ccc933a2857a5a0315029e878bd0a8840c6043d6d1220a01ef252218ba14ba9c9b54 -LLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/md5/367672d3155efbd4b11aa98ba6ba0c6a -LLVM.v11.0.1+0.i686-w64-mingw32-cxx03.tar.gz/sha512/577ffa7a06fb95b590c4670a02d9e98a3260c407f25e8772b7f8cfb9c9f1cd460535aeab980279145a22b0d8d92eb886ef8229c98fc4b65ca2f665c5cc262391 -LLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/md5/0251f63dec58d97ef2413011c1d48400 -LLVM.v11.0.1+0.i686-w64-mingw32-cxx11.tar.gz/sha512/3c0f9da5b60035ce8465113ec543e4d1cf16ddfa6ed288a4480f3df5f324d96b8a1fb6ea96d79dee1c6de2a886853c2e80968ad07e7316ed74ed55d989438420 -LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/md5/a7030f4c9bd9c10400c76da7171393f9 -LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/26ae774eaed261d8fdce36bf6fe2c6d0ac4e1a4af74b0cf6b26cc474c7c1579746e16a1ce2f0b4e080a9af1ad26bc17bd4e9d87b806d49da58e4947be5cdccf1 -LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/md5/94884b7d1b30a79065e12d096c48f717 -LLVM.v11.0.1+0.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/4bd281cf3a8af6c76436d04dfc3812c3d56d0e69028cffe39111a0389ea7bdb916065d742dfbd7e5268d45591abe3c26682171ee77c254d084167a547c54637b -LLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/md5/a281080d225f0321aa7b9a924064e67d -LLVM.v11.0.1+0.x86_64-apple-darwin.tar.gz/sha512/9fc77ab5a555b86d256e8fd86031d58aaafd38cdcd3d579cd0d7041b529bd7dfa6538fc459568049545cb7f192f6d89eb1b88aa81e4595799895c4284cedb97c -LLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/md5/2f34a3438aa0cd283cb7ad37cc3983d7 -LLVM.v11.0.1+0.x86_64-linux-gnu-cxx03.tar.gz/sha512/1e1854b654784d9a6691e40e222f53e7647ec81e095d4e4263a2824f8cbd00554826a24557684f84c1807d7614c231387a81600a432e1c7580c9e63b6b956ee8 -LLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/md5/174ee46ac15dc748967e11e5c669213f -LLVM.v11.0.1+0.x86_64-linux-gnu-cxx11.tar.gz/sha512/325f4fea92edb982ce0a705ae5113684bcf5ad5d3a8a323edea3885fa6c84a7a668e660a0e24032fe63a2eb8c504128b17488aa2314e6c4fc898ae5907c34824 -LLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/md5/f6a66b26dc73de147ff2f93897250b47 -LLVM.v11.0.1+0.x86_64-linux-musl-cxx03.tar.gz/sha512/403d101e35db30b3afe6f792bc8fd56fe3ca08d2a11b36243afa8f40a3889a8f0428fa0576e35385dc58bc2580163f8fbc00398d1ee82da16028a4c443c2ee2d -LLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/md5/3d728c8e73961909b0af13a40d9e359b -LLVM.v11.0.1+0.x86_64-linux-musl-cxx11.tar.gz/sha512/3284e85e7d382ef857ccb6504d50588f679aebebc96da83b4d9cd37cb15d8c525b36b4772a9b9fea7f25453ca6a75e94084194f1167dbf6337c6bc52a0216d60 -LLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/md5/895006761bc396e2bfc29cb2838e34b7 -LLVM.v11.0.1+0.x86_64-unknown-freebsd.tar.gz/sha512/9b10e02d2089fb48f652d3aad003a1ca0a73f89807baafa2de08c2aba886fc98b13b16ae1e4dcc739d5f697a2e09052a082ed1615d5eee62254a524c2348cffc -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/4f043db38279e19cc34a96a4997cb91f -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/md5/4f043db38279e19cc34a96a4997cb91f -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx03.tar.gz/sha512/cdb8470d8d6100433367f8dec73861a2d9f5bf5570e21ac9fd415a03b9dd8aac33ca8c508dc42a4a36e52f7308370543c06880e80cf3cb33770fe61dbb65a32e -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/9e8c2570ae870165b4febd2cf51077d7 -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/md5/9e8c2570ae870165b4febd2cf51077d7 -LLVM.v11.0.1+0.x86_64-w64-mingw32-cxx11.tar.gz/sha512/56c15ace14d7dceca059ef680873a2fe6a5b889c1d6a0869860d8eddef6f4bc746ffa5996950515717efe2693f3532a95bfbe089b28c0d0edc299bc9dca8a735 +LLVM.v11.0.1+1.aarch64-apple-darwin.tar.gz/md5/db112b592fe170025f2e0df99060703b +LLVM.v11.0.1+1.aarch64-apple-darwin.tar.gz/sha512/c0d196229b42231cb5ef7e4069253eb6a61d6b9cce6455e314f06877461d12f59ba5e797351ac2c039f3f229c746e00ac16a2fa15b70e0dadacb3cbf9fd8280d +LLVM.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/md5/5cb83dab5e2c67168f1c2568a8b12fb5 +LLVM.v11.0.1+1.aarch64-linux-gnu-cxx03.tar.gz/sha512/9d1af9bada5136691305789f5404eefe673f316c474aef682b88023a7bd719337c3fe5e7d376a993842a693f5fb6cbb1edbcd85217dc046a4951c4faad639615 +LLVM.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/md5/5e2f2852b6dcf4ec4c15cf552540cb0a +LLVM.v11.0.1+1.aarch64-linux-gnu-cxx11.tar.gz/sha512/36b4c578f97c32a527469942091fa1d83d5cbcbf10ad275537f6b42a6aff5f02a085c4dbc52067343e2ad40f75bef2a87b67d40779ea0c45f040dbb7e3483f5c +LLVM.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/md5/92d6690a6d048612d07f3ec213dad3cf +LLVM.v11.0.1+1.aarch64-linux-musl-cxx03.tar.gz/sha512/d7f05414a9c7079f0bb36366762e5983834ce78225988c044dc8b2bbe033d6c9ea4f08d64e1bcec3dd4015f48d678329d3d726344cebc03b2f33db1d300b4ed3 +LLVM.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/md5/355282f7a8f65607755ade5420122373 +LLVM.v11.0.1+1.aarch64-linux-musl-cxx11.tar.gz/sha512/35f09da76a326185d9b97c01dbae686ffa5cc3626095a15dc8ae094e1e19d7053c4d4147d39d7f29e0c45cc52c1f24fa0ec1228dca996af7caf435c21def0356 +LLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/md5/fdee554069cc9dae0c1f539b196b3d15 +LLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx03.tar.gz/sha512/6a039ec156049599ce8ee765196f1527c216f2a5c4aaeb7c304777937b4ac7a280d5ad7f5bb717b53925e025c3709065dc656a75193eed4be1a5886cf1076174 +LLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/md5/480a745c2a7e0b6fa0749fa2da8410e5 +LLVM.v11.0.1+1.armv6l-linux-gnueabihf-cxx11.tar.gz/sha512/f2251bd5d14fe701cc2c26a86a54f03a17a8d6c5db2d29834c697223d13dbda664f76cec7ff97d3d8bb9bd1bdd09e782fe81eaf874901f66a2652c71035d7766 +LLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/md5/19451e20a3755a2362efa4bd4e8b449e +LLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx03.tar.gz/sha512/6f661d3e2897af57fd850d91cc21605a1389fc75b2ccc10c980d5f3e4350e0c801168b26bb44466ba3c29870880da64f0a780861530d6315950352c4ad395f1f +LLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/md5/e23ac1cb9c66b9b875fd4eb78831aabb +LLVM.v11.0.1+1.armv6l-linux-musleabihf-cxx11.tar.gz/sha512/ac1ca2b495878e5a5649d7b6e7c14826f5a34281ca043e30bc212c00ac769adf8627deb6f4137548c71774a9a25d4605185d67b259d19ed9c2ea96ca64b88087 +LLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/md5/91c5fe56e8187dffa815ddad9c221bf4 +LLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx03.tar.gz/sha512/744c3eca0b97f2399f4cfb34e7ee03aaad68098b69278235f446e23d616a523ddabcabf84b2f4ad65a5ea8876b56c4b1740160c84b9e56b638a732a078996d9b +LLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/md5/bd97ca229f793ae904e5bbeb2308e6db +LLVM.v11.0.1+1.armv7l-linux-gnueabihf-cxx11.tar.gz/sha512/8b51dc550446b995afceed525c9fd4a979845dbd8842190f90b524903a74591607ed0624eaf78953a769d96953fb3416c69fc4d85d70f1c8bcbc8a3d59c36555 +LLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/md5/48f249ad3d0d4f02fc75f48a8f5b3020 +LLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx03.tar.gz/sha512/d625dc23ee7c73a79947e87790d536423a056c4c5402ebb26c8441c25db29cc19cd49daa92b8cccfb0ed4ff6fa9faa66d40e567c76996ef8d3009921ee86daf8 +LLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/md5/efc11d7b9b5915a9c72fa720bbf9c818 +LLVM.v11.0.1+1.armv7l-linux-musleabihf-cxx11.tar.gz/sha512/fc2f15164fcba7cde67729db349370f713eba8bbe2284383a67880e2a34f5cfb1f3be9332fd62fe9aa2a96b2f5acde0f215705431145f60607f817b3a29c495d +LLVM.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/md5/f46650c56c150855dff102fc4c322cee +LLVM.v11.0.1+1.i686-linux-gnu-cxx03.tar.gz/sha512/d741e942fb895f08cb67fa9638b1a21c1bdc091cc0ff7f25c66dcaf2bbef93d2eebabc97466cfb76a7b5d4658620a99ad5199d9472d013cd565d5af30366cf4f +LLVM.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/md5/c0cf7ebf06134866f1b0eea66b428c06 +LLVM.v11.0.1+1.i686-linux-gnu-cxx11.tar.gz/sha512/58209415739f3b721f18ded6a3d3512dd6b9517a093ba706cb44017e5ec3a7551ce5cf3c80fae62a94d9dfed5c08ca0486adfd4a917a564e59db1f64e09a511c +LLVM.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/md5/9c1632ee1e9abb8163d13ed8162df35f +LLVM.v11.0.1+1.i686-linux-musl-cxx03.tar.gz/sha512/ccfbe98f7ec56ab2416254530eea250101cdeef152956f7a1452e8497700046dfc458df203d86562b4ff28b799f396af11752d600ed0aabfd76af08b8a74da74 +LLVM.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/md5/03e5bcddf8ce4831c030b140afab6d38 +LLVM.v11.0.1+1.i686-linux-musl-cxx11.tar.gz/sha512/df5ddbbba57929d11a8f453eaf14dcd0404378c16e8be4d70ddfe45a012403785f7cf2779912dc171d28f6103d72cdcd777df346a5f37b5abea677df1ccaf516 +LLVM.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/md5/4ceee3e48da605586c88b1ac93a1cce3 +LLVM.v11.0.1+1.i686-w64-mingw32-cxx03.tar.gz/sha512/f81e1f20f200074bc94854798ff8c65850124296d6959fa8270a7cd2318f2d7d4b668af6ef6cb8e876d55eb58eb08bf0cfa3bf723b788813667f1817ae610f98 +LLVM.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/md5/f9486920a662e1062262ee5550786432 +LLVM.v11.0.1+1.i686-w64-mingw32-cxx11.tar.gz/sha512/12ace5f48836c847e9d8736dd01ada8c3279d3482ad9ff6f5b0ef78d642a5c762042ad6b6fc50d951d50c0a0fe32c0fb3cfef100e5209bec76044836396eab80 +LLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/md5/1eaf78f1c43f07e69251c858682dec89 +LLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx03.tar.gz/sha512/1d4d09fc4a7356b7d8931dbac9b1f47de351319c8a29d67e41f32ccc984ea68425aec893b82957d00df43632271566dfd5ddea6f9b505d66d5ce0e67e8aede5e +LLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/md5/7e446672e5221feb33328716d4042c3d +LLVM.v11.0.1+1.powerpc64le-linux-gnu-cxx11.tar.gz/sha512/d024f37674d9966f78c99d0522bfd697b66d3ed790d6da317a1228cff0a2a8e36f2d5fbeed26963af5f6452e1241ae5f646255afdbc841d161e9f27550d0b116 +LLVM.v11.0.1+1.x86_64-apple-darwin.tar.gz/md5/e28994d105e98409204b0afc8798a3c0 +LLVM.v11.0.1+1.x86_64-apple-darwin.tar.gz/sha512/4bab038a0c1227039340b8f3ecce3318d95852dbafec4480337c00e8f4f8f39508da2176f305c5f7ec27893d5656b0522fc000be13a8df243a3e5ed75e6c4c39 +LLVM.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/md5/262d7ad33c60f16206d0f1b4207da58d +LLVM.v11.0.1+1.x86_64-linux-gnu-cxx03.tar.gz/sha512/8c172c66d2dae8021805197134760cc29dbc5159850d038c6c28d946207a1c273170228505e63356f6ce5024a8c8e1860092961ef976bc178c1a2b50cec2c8ee +LLVM.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/md5/1c184178cbc7fcc7cd983541a975d89e +LLVM.v11.0.1+1.x86_64-linux-gnu-cxx11.tar.gz/sha512/d9d0cde52ec807dd29e941c41c05a5ff495d44d59da8f46a4be4a72f5dbc3b21935727e248b75d1cc6b25e27566cb9157f833fbdaeb7028905e696454b321f78 +LLVM.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/md5/778e6605f0ce10e36ada4dcd0207487b +LLVM.v11.0.1+1.x86_64-linux-musl-cxx03.tar.gz/sha512/8594af15afafe954df5142dc5cc63cec6e4d8bd47c4ac35d59f0eea73c7f74a393d5bd24948e892770fad18deaf42e056d261bc60a480bab39c5dba057147ecb +LLVM.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/md5/41f3efdaa1be437f927d39a779c7da50 +LLVM.v11.0.1+1.x86_64-linux-musl-cxx11.tar.gz/sha512/43791b18e6110b4fd1fe269548419a08ebb29ea6fa5267b039f93c74d21552d429ff30b108ab809bd792ef126875ef8c8f7e1c47cd6743614b280b7f7fdb767c +LLVM.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/md5/9d33970b74f6185020c3f1f6ba0a19fb +LLVM.v11.0.1+1.x86_64-unknown-freebsd.tar.gz/sha512/ebcbd9331d667bd8222e5ff6f0665694b5ef20a54b7e969be02f71e39cb0a74e4d5d7148ebc5ba7a0db6e0dbc343de14ea3d85ca67962a1319f21ce77a551041 +LLVM.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/md5/649946149ecea11bece90249b232d37a +LLVM.v11.0.1+1.x86_64-w64-mingw32-cxx03.tar.gz/sha512/a5540be90f3a9544e9f150bc26c55f23e1b1e187244b341fe2bc4f70aed80a06b06d68e05b22789505915c85178eb6b6c9493a1641d103bd1cbc52728ac4c0a4 +LLVM.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/md5/a1d0ca7a0814f98c62c95325f3013e35 +LLVM.v11.0.1+1.x86_64-w64-mingw32-cxx11.tar.gz/sha512/8729f4f20f9b0009f9cd61f8e0a077c264424f828e5929cffe22bd7cd797d158826f7861b853d18aa7ea5460bd9b178ae12bc27ed8e4f0ea848f1dc768fc54b8 diff --git a/deps/checksums/llvm-tools b/deps/checksums/llvm-tools deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml index 3c1ffe0b35e0f..9918256ae64f6 100644 --- a/stdlib/libLLVM_jll/Project.toml +++ b/stdlib/libLLVM_jll/Project.toml @@ -1,6 +1,6 @@ name = "libLLVM_jll" uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" -version = "11.0.1+0" +version = "11.0.1+1" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 0ff17b0193f19459e80ccbb30df69606d0f4b25f Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Wed, 27 Jan 2021 02:59:29 +0000 Subject: [PATCH 183/239] [automated] Bump the Downloads stdlib from 09f18ad to 9d841d9 (#39412) --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/Downloads.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/md5 delete mode 100644 deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/sha512 create mode 100644 deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 create mode 100644 deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 diff --git a/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/md5 b/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/md5 deleted file mode 100644 index 62a725e77f258..0000000000000 --- a/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -1f08c72eace46e1793187c1db8d2135c diff --git a/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/sha512 b/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/sha512 deleted file mode 100644 index 52f6cd67a81be..0000000000000 --- a/deps/checksums/Downloads-09f18ad9872132bf078af22128783dd4ef0f1189.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -2d651af3b01fd1f0024b50c1be7b32d8022f328b1eef5ebb14edc8d0f31a98774475c2aa34dc6b2c27d5069f19f4bfe0a3feb3a1f469add6753a1a46a30269ef diff --git a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 new file mode 100644 index 0000000000000..15346cb1c7020 --- /dev/null +++ b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 @@ -0,0 +1 @@ +b7a380ee522cca6f3f00e4bcd824c398 diff --git a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 new file mode 100644 index 0000000000000..446ba5172ea96 --- /dev/null +++ b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 @@ -0,0 +1 @@ +25dfaa09696dab6f4c12934f403e7bed1428089e1db07484962cbe6d14227b77c1888b08999e319aaf660572ef05f08c890185f8240067489a08ff0f4cd52464 diff --git a/stdlib/Downloads.version b/stdlib/Downloads.version index 9efa853ed1d58..a9effea789e82 100644 --- a/stdlib/Downloads.version +++ b/stdlib/Downloads.version @@ -1,2 +1,2 @@ DOWNLOADS_BRANCH = master -DOWNLOADS_SHA1 = 09f18ad9872132bf078af22128783dd4ef0f1189 +DOWNLOADS_SHA1 = 9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0 From 1eaa1acfd130b636f1591a70515e59ec682f847e Mon Sep 17 00:00:00 2001 From: Kenta Sato Date: Wed, 27 Jan 2021 17:31:23 +0900 Subject: [PATCH 184/239] add Cholesky constructors for triangular matrices (#39352) --- stdlib/LinearAlgebra/src/cholesky.jl | 3 ++- stdlib/LinearAlgebra/test/cholesky.jl | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/stdlib/LinearAlgebra/src/cholesky.jl b/stdlib/LinearAlgebra/src/cholesky.jl index 6c1d87b445f08..7bae5fd36cd01 100644 --- a/stdlib/LinearAlgebra/src/cholesky.jl +++ b/stdlib/LinearAlgebra/src/cholesky.jl @@ -90,7 +90,8 @@ Cholesky(A::AbstractMatrix{T}, uplo::Symbol, info::Integer) where {T} = Cholesky{T,typeof(A)}(A, char_uplo(uplo), info) Cholesky(A::AbstractMatrix{T}, uplo::AbstractChar, info::Integer) where {T} = Cholesky{T,typeof(A)}(A, uplo, info) - +Cholesky(U::UpperTriangular{T}) where {T} = Cholesky{T,typeof(U.data)}(U.data, 'U', 0) +Cholesky(L::LowerTriangular{T}) where {T} = Cholesky{T,typeof(L.data)}(L.data, 'L', 0) # iteration for destructuring into components Base.iterate(C::Cholesky) = (C.L, Val(:U)) diff --git a/stdlib/LinearAlgebra/test/cholesky.jl b/stdlib/LinearAlgebra/test/cholesky.jl index dc9d193aee540..a3f780c047a29 100644 --- a/stdlib/LinearAlgebra/test/cholesky.jl +++ b/stdlib/LinearAlgebra/test/cholesky.jl @@ -457,4 +457,22 @@ end @test Matrix(cholesky(C)) ≈ C end +@testset "constructing a Cholesky factor from a triangular matrix" begin + A = [1.0 2.0; 3.0 4.0] + let + U = UpperTriangular(A) + C = Cholesky(U) + @test C isa Cholesky{Float64} + @test C.U == U + @test C.L == U' + end + let + L = LowerTriangular(A) + C = Cholesky(L) + @test C isa Cholesky{Float64} + @test C.L == L + @test C.U == L' + end +end + end # module TestCholesky From 9c375e24a4a37696ac6496989972a08c1ffbf490 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 27 Jan 2021 09:53:34 -0500 Subject: [PATCH 185/239] fix repr of `(x...)...` (#39413) --- base/show.jl | 6 +++++- test/show.jl | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/base/show.jl b/base/show.jl index 93026fa7e2fe7..336ee5f0be3cc 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1941,8 +1941,12 @@ function show_unquoted(io::IO, ex::Expr, indent::Int, prec::Int, quote_level::In # var-arg declaration or expansion # (i.e. "function f(L...) end" or "f(B...)") elseif head === :(...) && nargs == 1 - show_unquoted(io, args[1], indent, 0, quote_level) + dotsprec = operator_precedence(:(:)) - 1 + parens = dotsprec <= prec + parens && print(io, "(") + show_unquoted(io, args[1], indent, dotsprec, quote_level) print(io, "...") + parens && print(io, ")") elseif (nargs == 0 && head in (:break, :continue)) print(io, head) diff --git a/test/show.jl b/test/show.jl index 65fd558cf9280..c93ad373d195d 100644 --- a/test/show.jl +++ b/test/show.jl @@ -174,6 +174,7 @@ end @test_repr "a => b in c" @test_repr "*(a..., b)" @test_repr "+(a, b, c...)" +@test_repr "f((x...)...)" # precedence tie resolution @test_repr "(a * b) * (c * d)" @@ -237,6 +238,7 @@ end @test repr(:(;)) == ":((;))" @test repr(:(-(;x))) == ":(-(; x))" @test repr(:(+(1, 2;x))) == ":(+(1, 2; x))" +@test repr(:(1:2...)) == ":(1:2...)" for ex in [Expr(:call, :f, Expr(:(=), :x, 1)), Expr(:ref, :f, Expr(:(=), :x, 1)), Expr(:vect, 1, 2, Expr(:kw, :x, 1)), From dd1fcf3b07f02a8c1adb370d9b084e05882d9830 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 27 Jan 2021 09:54:09 -0500 Subject: [PATCH 186/239] fix #39405, saving modules with renamed imports (#39408) --- src/dump.c | 15 ++++++++------- src/staticdata.c | 18 +++++++++++------- test/precompile.jl | 13 +++++++++++++ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/dump.c b/src/dump.c index 591dc3434ec91..4f063cbf10c31 100644 --- a/src/dump.c +++ b/src/dump.c @@ -348,9 +348,10 @@ static void jl_serialize_module(jl_serializer_state *s, jl_module_t *m) write_int8(s->s, 0); jl_serialize_value(s, m->parent); void **table = m->bindings.table; - for (i = 1; i < m->bindings.size; i += 2) { - if (table[i] != HT_NOTFOUND) { - jl_binding_t *b = (jl_binding_t*)table[i]; + for (i = 0; i < m->bindings.size; i += 2) { + if (table[i+1] != HT_NOTFOUND) { + jl_serialize_value(s, (jl_value_t*)table[i]); + jl_binding_t *b = (jl_binding_t*)table[i+1]; jl_serialize_value(s, b->name); jl_value_t *e = b->value; if (!b->constp && e && jl_is_cpointer(e) && jl_unbox_voidpointer(e) != (void*)-1 && jl_unbox_voidpointer(e) != NULL) @@ -1558,12 +1559,12 @@ static jl_value_t *jl_deserialize_value_module(jl_serializer_state *s) JL_GC_DIS jl_gc_wb(m, m->parent); while (1) { - jl_sym_t *name = (jl_sym_t*)jl_deserialize_value(s, NULL); - if (name == NULL) + jl_sym_t *asname = (jl_sym_t*)jl_deserialize_value(s, NULL); + if (asname == NULL) break; - jl_binding_t *b = jl_get_binding_wr(m, name, 1); + jl_binding_t *b = jl_get_binding_wr(m, asname, 1); + b->name = (jl_sym_t*)jl_deserialize_value(s, (jl_value_t**)&b->name); b->value = jl_deserialize_value(s, &b->value); - jl_gc_wb_buf(m, b, sizeof(jl_binding_t)); if (b->value != NULL) jl_gc_wb(m, b->value); b->globalref = jl_deserialize_value(s, &b->globalref); if (b->globalref != NULL) jl_gc_wb(m, b->globalref); diff --git a/src/staticdata.c b/src/staticdata.c index 847a0484c9403..accac56e62090 100644 --- a/src/staticdata.c +++ b/src/staticdata.c @@ -387,9 +387,10 @@ static void jl_serialize_module(jl_serializer_state *s, jl_module_t *m) jl_serialize_value(s, m->parent); size_t i; void **table = m->bindings.table; - for (i = 1; i < m->bindings.size; i += 2) { - if (table[i] != HT_NOTFOUND) { - jl_binding_t *b = (jl_binding_t*)table[i]; + for (i = 0; i < m->bindings.size; i += 2) { + if (table[i+1] != HT_NOTFOUND) { + jl_serialize_value(s, (jl_value_t*)table[i]); + jl_binding_t *b = (jl_binding_t*)table[i+1]; jl_serialize_value(s, b->name); jl_serialize_value(s, b->value); jl_serialize_value(s, b->globalref); @@ -629,9 +630,11 @@ static void jl_write_module(jl_serializer_state *s, uintptr_t item, jl_module_t size_t count = 0; size_t i; void **table = m->bindings.table; - for (i = 1; i < m->bindings.size; i += 2) { - if (table[i] != HT_NOTFOUND) { - jl_binding_t *b = (jl_binding_t*)table[i]; + for (i = 0; i < m->bindings.size; i += 2) { + if (table[i+1] != HT_NOTFOUND) { + jl_binding_t *b = (jl_binding_t*)table[i+1]; + write_pointerfield(s, (jl_value_t*)table[i]); + tot += sizeof(void*); write_gctaggedfield(s, (uintptr_t)BindingRef << RELOC_TAG_OFFSET); tot += sizeof(void*); size_t binding_reloc_offset = ios_pos(s->s); @@ -1383,12 +1386,13 @@ static void jl_reinit_item(jl_value_t *v, int how) JL_GC_DISABLED size_t nbindings = mod->bindings.size; htable_new(&mod->bindings, nbindings); struct binding { + jl_sym_t *asname; uintptr_t tag; jl_binding_t b; } *b; b = (struct binding*)&mod[1]; while (nbindings > 0) { - ptrhash_put(&mod->bindings, (char*)b->b.name, &b->b); + ptrhash_put(&mod->bindings, b->asname, &b->b); b += 1; nbindings -= 1; } diff --git a/test/precompile.jl b/test/precompile.jl index 0b65c2e137619..d3712b6c2dc3e 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -859,3 +859,16 @@ precompile_test_harness("Opaque Closure") do load_path f = (@eval (using OCPrecompile; OCPrecompile)).f @test Base.invokelatest(f, 1)(2) == 3 end + +# issue #39405 +precompile_test_harness("Renamed Imports") do load_path + write(joinpath(load_path, "RenameImports.jl"), + """ + module RenameImports + import Base.Experimental as ex + test() = ex + end + """) + Base.compilecache(Base.PkgId("RenameImports")) + @test (@eval (using RenameImports; RenameImports.test())) isa Module +end From 27eee413cdea851655ebf4dec146b4efb2cef879 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 27 Jan 2021 09:54:54 -0500 Subject: [PATCH 187/239] Revert "Let tmerge form a Union more often (#27843)" (#39406) This reverts commit 6c1824d99769fa79f69eb866ce76df674fd37878. Fixes #39349. The extra inference precision is nice, but seems to carry too much risk of blowup. --- base/compiler/typelimits.jl | 7 +++---- test/compiler/inference.jl | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/base/compiler/typelimits.jl b/base/compiler/typelimits.jl index c4193d94fd525..2e18403982b81 100644 --- a/base/compiler/typelimits.jl +++ b/base/compiler/typelimits.jl @@ -375,10 +375,9 @@ function tmerge(@nospecialize(typea), @nospecialize(typeb)) return Any end typea == typeb && return typea - # it's always ok to form a Union of two Union-free types - u = Union{typea, typeb} - if unioncomplexity(u) <= 1 - return u + # it's always ok to form a Union of two concrete types + if (isconcretetype(typea) || isType(typea)) && (isconcretetype(typeb) || isType(typeb)) + return Union{typea, typeb} end # collect the list of types from past tmerge calls returning Union # and then reduce over that list diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index a7d94629e55f8..0db5716e75e31 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -2041,16 +2041,6 @@ let rt = Base.return_types(splat27434, (NamedTuple{(:x,), Tuple{T}} where T,)) @test !Base.has_free_typevars(rt[1]) end -# PR #27843 -bar27843(x, y::Bool) = fill(x, 0) -bar27843(x, y) = fill(x, ntuple(_ -> 0, y))::Array{typeof(x)} -foo27843(x, y) = bar27843(x, y) -@test Core.Compiler.return_type(foo27843, Tuple{Union{Float64,Int}, Any}) == Union{Array{Float64}, Array{Int}} -let atypes1 = Tuple{Union{IndexCartesian, IndexLinear}, Any, Union{Tuple{}, Tuple{Any,Vararg{Any,N}} where N}, Tuple}, - atypes2 = Tuple{Union{IndexCartesian, IndexLinear}, Any, Tuple, Tuple} - @test Core.Compiler.return_type(SubArray, atypes1) <: Core.Compiler.return_type(SubArray, atypes2) -end - # issue #27078 f27078(T::Type{S}) where {S} = isa(T, UnionAll) ? f27078(T.body) : T T27078 = Vector{Vector{T}} where T From f3e95563921f1a6b806d34bd0075ead7a26f73c2 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 27 Jan 2021 09:55:47 -0500 Subject: [PATCH 188/239] fix `isknownlength` for new Vararg representation (#39407) --- base/compiler/typeutils.jl | 3 ++- test/compiler/inference.jl | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/base/compiler/typeutils.jl b/base/compiler/typeutils.jl index d5db2ab70ef1f..10f4a8b949da5 100644 --- a/base/compiler/typeutils.jl +++ b/base/compiler/typeutils.jl @@ -49,7 +49,8 @@ argtypes_to_type(argtypes::Array{Any,1}) = Tuple{anymap(widenconst, argtypes)... function isknownlength(t::DataType) isvatuple(t) || return true - return length(t.parameters) > 0 && isa(unwrap_unionall(t.parameters[end]).parameters[2], Int) + va = t.parameters[end] + return isdefined(va, :N) && va.N isa Int end # test if non-Type, non-TypeVar `x` can be used to parameterize a type diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 0db5716e75e31..05c72f032c5af 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3013,3 +3013,11 @@ f_aggressive(x) = g_aggressive(x, 1) # render the annotation effectless. @test Base.return_types(f_nonaggressive, Tuple{Int})[1] == Val @test Base.return_types(f_aggressive, Tuple{Int})[1] == Val{1} + +function splat_lotta_unions() + a = Union{Tuple{Int},Tuple{String,Vararg{Int}},Tuple{Int,Vararg{Int}}}[(2,)][1] + b = Union{Int8,Int16,Int32,Int64,Int128}[1][1] + c = Union{Int8,Int16,Int32,Int64,Int128}[1][1] + (a...,b...,c...) +end +@test Core.Compiler.return_type(splat_lotta_unions, Tuple{}) >: Tuple{Int,Int,Int} From 5cd1e3e1f2e6d79bdeeb2b1bfbdbe9081074bd23 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 27 Jan 2021 17:13:57 -0500 Subject: [PATCH 189/239] implement with fewer afoldl methods (#39414) With constant-propagation, inference (and Varargs runtime) is likely better able to handle this version now (and it removes the n^2 behavior definitions for semi-low argument counts). Now we also need to force Vararg specialization up to 16 arguments manually, so we do that explicitly (and slightly hack-y). Fixes regression in #39175 --- base/operators.jl | 38 +++++++++++++++++++++++++++++--------- test/operators.jl | 2 ++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/base/operators.jl b/base/operators.jl index a35c44276a2e4..a91122e72dd31 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -577,17 +577,37 @@ xor(x::Integer) = x const ⊻ = xor -# foldl for argument lists. expand recursively up to a point, then -# switch to a loop. this allows small cases like `a+b+c+d` to be inlined +# foldl for argument lists. expand fully up to a point, then +# switch to a loop. this allows small cases like `a+b+c+d` to be managed # efficiently, without a major slowdown for `+(x...)` when `x` is big. -afoldl(op,a) = a -afoldl(op,a,b) = op(a,b) -afoldl(op,a,b,c...) = afoldl(op, op(a,b), c...) -function afoldl(op,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,qs...) - y = op(op(op(op(op(op(op(op(op(op(op(op(op(op(op(a,b),c),d),e),f),g),h),i),j),k),l),m),n),o),p) - for x in qs; y = op(y,x); end - y +# n.b.: keep this method count small, so it can be inferred without hitting the +# method count limit in inference +afoldl(op, a) = a +function afoldl(op, a, bs...) + l = length(bs) + i = 0; y = a; l == i && return y + #@nexprs 15 i -> (y = op(y, bs[i]); l == i && return y) + i = 1; y = op(y, bs[i]); l == i && return y + i = 2; y = op(y, bs[i]); l == i && return y + i = 3; y = op(y, bs[i]); l == i && return y + i = 4; y = op(y, bs[i]); l == i && return y + i = 5; y = op(y, bs[i]); l == i && return y + i = 6; y = op(y, bs[i]); l == i && return y + i = 7; y = op(y, bs[i]); l == i && return y + i = 8; y = op(y, bs[i]); l == i && return y + i = 9; y = op(y, bs[i]); l == i && return y + i = 10; y = op(y, bs[i]); l == i && return y + i = 11; y = op(y, bs[i]); l == i && return y + i = 12; y = op(y, bs[i]); l == i && return y + i = 13; y = op(y, bs[i]); l == i && return y + i = 14; y = op(y, bs[i]); l == i && return y + i = 15; y = op(y, bs[i]); l == i && return y + for i in (i + 1):l + y = op(y, bs[i]) + end + return y end +typeof(afoldl).name.mt.max_args = 18 for op in (:+, :*, :&, :|, :xor, :min, :max, :kron) @eval begin diff --git a/test/operators.jl b/test/operators.jl index c14858657ce3b..7b7711037cfb7 100644 --- a/test/operators.jl +++ b/test/operators.jl @@ -277,3 +277,5 @@ end a = rand(3, 3) @test transpose(a) === a'ᵀ + +@test [Base.afoldl(+, 1:i...) for i = 1:40] == [i * (i + 1) ÷ 2 for i = 1:40] From 70d6573294ad300b514d1577451d5307d423f43d Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Thu, 28 Jan 2021 20:30:07 +0100 Subject: [PATCH 190/239] add hint when showing function types in the REPL (#39176) This prints function types in the REPL like this, which will hopefully make it a bit less confusing to newcomers: ``` julia> typeof(sin) typeof(sin) (singleton type of function sin, subtype of Function) ``` In its current state, this does not address the case for `summary` brought up in #39173, as I was not sure we wanted to have verbose printing like this outside the REPL. I could also change that and have it just depend on `io[:compact]` though. --- base/docs/basedocs.jl | 2 +- base/show.jl | 39 +++++++++++++++++++++++---------------- test/show.jl | 23 ++++++++++++++++++----- 3 files changed, 42 insertions(+), 22 deletions(-) diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index 1151d7423a018..32e16ae4da5de 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -1242,7 +1242,7 @@ julia> isa(+, Function) true julia> typeof(sin) -typeof(sin) +typeof(sin) (singleton type of function sin, subtype of Function) julia> ans <: Function true diff --git a/base/show.jl b/base/show.jl index 336ee5f0be3cc..5d8d0e83cf628 100644 --- a/base/show.jl +++ b/base/show.jl @@ -798,13 +798,16 @@ function show(io::IO, ::MIME"text/plain", @nospecialize(x::Type)) print(io, ")") end end - - #s1 = sprint(show, x, context = io) - #s2 = sprint(show, x, context = IOContext(io, :compact => false)) - #print(io, s1) - #if s1 != s2 - # print(io, " = ", s2) - #end + # give a helpful hint for function types + if x isa DataType && x !== UnionAll && !(get(io, :compact, false)::Bool) + tn = x.name::Core.TypeName + globname = isdefined(tn, :mt) ? tn.mt.name : nothing + if is_global_function(tn, globname) + print(io, " (singleton type of function ") + show_sym(io, globname) + print(io, ", subtype of Function)") + end + end end function show(io::IO, @nospecialize(x::Type)) @@ -864,22 +867,26 @@ function isvisible(sym::Symbol, parent::Module, from::Module) isdefined(from, sym) # if we're going to return true, force binding resolution end -function show_type_name(io::IO, tn::Core.TypeName) - if tn === UnionAll.name - # by coincidence, `typeof(Type)` is a valid representation of the UnionAll type. - # intercept this case and print `UnionAll` instead. - return print(io, "UnionAll") - end - globname = isdefined(tn, :mt) ? tn.mt.name : nothing - globfunc = false +function is_global_function(tn::Core.TypeName, globname::Union{Symbol,Nothing}) if globname !== nothing globname_str = string(globname::Symbol) if ('#' ∉ globname_str && '@' ∉ globname_str && isdefined(tn, :module) && isbindingresolved(tn.module, globname) && isdefined(tn.module, globname) && isconcretetype(tn.wrapper) && isa(getfield(tn.module, globname), tn.wrapper)) - globfunc = true + return true end end + return false +end + +function show_type_name(io::IO, tn::Core.TypeName) + if tn === UnionAll.name + # by coincidence, `typeof(Type)` is a valid representation of the UnionAll type. + # intercept this case and print `UnionAll` instead. + return print(io, "UnionAll") + end + globname = isdefined(tn, :mt) ? tn.mt.name : nothing + globfunc = is_global_function(tn, globname) sym = (globfunc ? globname : tn.name)::Symbol globfunc && print(io, "typeof(") quo = false diff --git a/test/show.jl b/test/show.jl index c93ad373d195d..54f0fb3e29505 100644 --- a/test/show.jl +++ b/test/show.jl @@ -1404,14 +1404,14 @@ let fname = tempname() end end -struct f_with_params{t} <: Function -end - +module ModFWithParams +struct f_with_params{t} <: Function end (::f_with_params)(x) = 2x +end let io = IOBuffer() - show(io, MIME"text/html"(), f_with_params.body.name.mt) - @test occursin("f_with_params", String(take!(io))) + show(io, MIME"text/html"(), ModFWithParams.f_with_params.body.name.mt) + @test occursin("ModFWithParams.f_with_params", String(take!(io))) end @testset "printing of Val's" begin @@ -2131,3 +2131,16 @@ end @test sprint(show, :?) == ":?" @test sprint(show, :(var"?" + var"::" + var"'")) == ":(var\"?\" + var\"::\" + var\"'\")" end + +@testset "printing of function types" begin + s = sprint(show, MIME("text/plain"), typeof(sin)) + @test s == "typeof(sin) (singleton type of function sin, subtype of Function)" + s = sprint(show, MIME("text/plain"), ModFWithParams.f_with_params) + @test endswith(s, "ModFWithParams.f_with_params") + s = sprint(show, MIME("text/plain"), ModFWithParams.f_with_params{2}) + @test endswith(s, "ModFWithParams.f_with_params{2}") + s = sprint(show, MIME("text/plain"), UnionAll) + @test s == "UnionAll" + s = sprint(show, MIME("text/plain"), Function) + @test s == "Function" +end From 9de107a63a56f9ca922497991a7eb9dcd027dc06 Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Thu, 28 Jan 2021 14:51:35 -0500 Subject: [PATCH 191/239] =?UTF-8?q?fix=20#39379,=20use=20first=E2=88=98Lin?= =?UTF-8?q?earIndices=20instead=20of=201=20(#39393)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/abstractarray.jl | 2 +- test/offsetarray.jl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index 383814ff38ddc..a880b4eecfd3f 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1193,7 +1193,7 @@ function _getindex(::IndexLinear, A::AbstractArray, I::Vararg{Int,M}) where M end _to_linear_index(A::AbstractArray, i::Integer) = i _to_linear_index(A::AbstractVector, i::Integer, I::Integer...) = i -_to_linear_index(A::AbstractArray) = 1 +_to_linear_index(A::AbstractArray) = first(LinearIndices(A)) _to_linear_index(A::AbstractArray, I::Integer...) = (@_inline_meta; _sub2ind(A, I...)) ## IndexCartesian Scalar indexing: Canonical method is full dimensionality of Ints diff --git a/test/offsetarray.jl b/test/offsetarray.jl index bb0b4b13b8da4..07f2e12999f90 100644 --- a/test/offsetarray.jl +++ b/test/offsetarray.jl @@ -715,6 +715,15 @@ end @test axes(S) == (OffsetArrays.IdOffsetRange(0:1), Base.OneTo(2), OffsetArrays.IdOffsetRange(2:5)) end +@testset "Zero-index indexing" begin + @test OffsetArray([6], 2:2)[] == 6 + @test OffsetArray(fill(6, 1, 1), 2:2, 3:3)[] == 6 + @test OffsetArray(fill(6))[] == 6 + @test_throws BoundsError OffsetArray([6,7], 2:3)[] + @test_throws BoundsError OffsetArray([6 7], 2:2, 2:3)[] + @test_throws BoundsError OffsetArray([], 2:1)[] +end + @testset "IdentityUnitRange indexing" begin a = OffsetVector(3:4, 2:3) ax = IdentityUnitRange(2:3) From f0e8ee6281372c91c0cb08bae0435f5529a800a8 Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Fri, 29 Jan 2021 07:17:54 +0000 Subject: [PATCH 192/239] [automated] Bump the Downloads stdlib from 9d841d9 to 4e55241 (#39445) Co-authored-by: Dilum Aluthge --- .../md5 | 1 + .../sha512 | 1 + .../md5 | 1 - .../sha512 | 1 - stdlib/Downloads.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 create mode 100644 deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 delete mode 100644 deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 delete mode 100644 deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 diff --git a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 new file mode 100644 index 0000000000000..fe7ca5582969c --- /dev/null +++ b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 @@ -0,0 +1 @@ +7e7a92138a053f4f65265821714d0919 diff --git a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 new file mode 100644 index 0000000000000..e16064534e7ef --- /dev/null +++ b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 @@ -0,0 +1 @@ +31628f766030e5ab46de78d4da458944f37fbe460a60a9f8969a9eab6be105373f7a57230e70b22ac66a72a85a46b0f7e215d084f9e5141b215a5271b26c6162 diff --git a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 deleted file mode 100644 index 15346cb1c7020..0000000000000 --- a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -b7a380ee522cca6f3f00e4bcd824c398 diff --git a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 b/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 deleted file mode 100644 index 446ba5172ea96..0000000000000 --- a/deps/checksums/Downloads-9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -25dfaa09696dab6f4c12934f403e7bed1428089e1db07484962cbe6d14227b77c1888b08999e319aaf660572ef05f08c890185f8240067489a08ff0f4cd52464 diff --git a/stdlib/Downloads.version b/stdlib/Downloads.version index a9effea789e82..b6dd897b63dd3 100644 --- a/stdlib/Downloads.version +++ b/stdlib/Downloads.version @@ -1,2 +1,2 @@ DOWNLOADS_BRANCH = master -DOWNLOADS_SHA1 = 9d841d9ac6fa7aacf3a5d031773d6b64f5512bd0 +DOWNLOADS_SHA1 = 4e55241413c95551c54fc5c9bfdf5f48cb02fc4c From b9f8b8b864717bf766ef08da57642fc42a30fb30 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 29 Jan 2021 02:33:07 -0500 Subject: [PATCH 193/239] remove bad method specialization from cache (#39429) This was inserting a method with signature [Int, Int], rather than Tuple{typeof(+), Int, Int}. Fix that and add a test for it so it doesn't happen again. --- base/Base.jl | 61 ++++++++++++++++++++++++++-------------------------- src/gf.c | 4 +++- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/base/Base.jl b/base/Base.jl index 878448c3e3964..d1a549f897d4f 100644 --- a/base/Base.jl +++ b/base/Base.jl @@ -394,37 +394,36 @@ in_sysimage(pkgid::PkgId) = pkgid in _sysimage_modules # Precompiles for Revise # TODO: move these to contrib/generate_precompile.jl # The problem is they don't work there -let m = which(+, (Int, Int)) - while true # defeat interpreter heuristic to force compilation - delete!(push!(Set{Method}(), m), m) - copy(Core.Compiler.retrieve_code_info(Core.Compiler.specialize_method(m, [Int, Int], Core.svec()))) - - empty!(Set()) - push!(push!(Set{Union{GlobalRef,Symbol}}(), :two), GlobalRef(Base, :two)) - (setindex!(Dict{String,Base.PkgId}(), Base.PkgId(Base), "file.jl"))["file.jl"] - (setindex!(Dict{Symbol,Vector{Int}}(), [1], :two))[:two] - (setindex!(Dict{Base.PkgId,String}(), "file.jl", Base.PkgId(Base)))[Base.PkgId(Base)] - (setindex!(Dict{Union{GlobalRef,Symbol}, Vector{Int}}(), [1], :two))[:two] - (setindex!(IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing, Int))[Int] - Dict{Symbol, Union{Nothing, Bool, Symbol}}(:one => false)[:one] - Dict(Base => [:(1+1)])[Base] - Dict(:one => [1])[:one] - Dict("abc" => Set())["abc"] - pushfirst!([], sum) - get(Base.pkgorigins, Base.PkgId(Base), nothing) - sort!([1,2,3]) - unique!([1,2,3]) - cumsum([1,2,3]) - append!(Int[], BitSet()) - isempty(BitSet()) - delete!(BitSet([1,2]), 3) - deleteat!(Int32[1,2,3], [1,3]) - deleteat!(Any[1,2,3], [1,3]) - Core.svec(1, 2) == Core.svec(3, 4) - any(t->t[1].line > 1, [(LineNumberNode(2,:none), :(1+1))]) - - break # end defeat interpreter heuristic - end +for match = _methods(+, (Int, Int), -1, get_world_counter()) + m = match.method + delete!(push!(Set{Method}(), m), m) + copy(Core.Compiler.retrieve_code_info(Core.Compiler.specialize_method(match))) + + empty!(Set()) + push!(push!(Set{Union{GlobalRef,Symbol}}(), :two), GlobalRef(Base, :two)) + (setindex!(Dict{String,Base.PkgId}(), Base.PkgId(Base), "file.jl"))["file.jl"] + (setindex!(Dict{Symbol,Vector{Int}}(), [1], :two))[:two] + (setindex!(Dict{Base.PkgId,String}(), "file.jl", Base.PkgId(Base)))[Base.PkgId(Base)] + (setindex!(Dict{Union{GlobalRef,Symbol}, Vector{Int}}(), [1], :two))[:two] + (setindex!(IdDict{Type, Union{Missing, Vector{Tuple{LineNumberNode, Expr}}}}(), missing, Int))[Int] + Dict{Symbol, Union{Nothing, Bool, Symbol}}(:one => false)[:one] + Dict(Base => [:(1+1)])[Base] + Dict(:one => [1])[:one] + Dict("abc" => Set())["abc"] + pushfirst!([], sum) + get(Base.pkgorigins, Base.PkgId(Base), nothing) + sort!([1,2,3]) + unique!([1,2,3]) + cumsum([1,2,3]) + append!(Int[], BitSet()) + isempty(BitSet()) + delete!(BitSet([1,2]), 3) + deleteat!(Int32[1,2,3], [1,3]) + deleteat!(Any[1,2,3], [1,3]) + Core.svec(1, 2) == Core.svec(3, 4) + any(t->t[1].line > 1, [(LineNumberNode(2,:none), :(1+1))]) + + break # only actually need to do this once end if is_primary_base_module diff --git a/src/gf.c b/src/gf.c index 63a9a6dbc0494..27a7d85e5a4c4 100644 --- a/src/gf.c +++ b/src/gf.c @@ -104,7 +104,9 @@ static int speccache_eq(size_t idx, const void *ty, jl_svec_t *data, uint_t hv) // get or create the MethodInstance for a specialization JL_DLLEXPORT jl_method_instance_t *jl_specializations_get_linfo(jl_method_t *m JL_PROPAGATES_ROOT, jl_value_t *type, jl_svec_t *sparams) { - uint_t hv = ((jl_datatype_t*)(jl_is_unionall(type) ? jl_unwrap_unionall(type) : type))->hash; + jl_value_t *ut = jl_is_unionall(type) ? jl_unwrap_unionall(type) : type; + JL_TYPECHK(specializations, datatype, ut); + uint_t hv = ((jl_datatype_t*)ut)->hash; for (int locked = 0; ; locked++) { jl_array_t *speckeyset = jl_atomic_load_acquire(&m->speckeyset); jl_svec_t *specializations = jl_atomic_load_acquire(&m->specializations); From 3ee63a68df11ca3875885723be5084ca74bcfa6e Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Fri, 29 Jan 2021 01:33:33 -0600 Subject: [PATCH 194/239] Fix ~700 PyPlot invalidations (#39420) PyCall specializes a lot of low-level methods like `convert(::Type{Symbol}, arg)`, and this triggers a lot of invalidations. The worst are for keyword-argument functions, but there are quite a few others. This drops the number from ~1100 to ~400. It's quite likely that additional improvements could be made, but this is major progress. Related: #39419. --- base/binaryplatforms.jl | 2 +- base/docs/Docs.jl | 15 ++++++++------- base/errorshow.jl | 7 ++----- base/file.jl | 6 ++++-- base/namedtuple.jl | 3 ++- base/stacktraces.jl | 16 ++++++++-------- stdlib/Markdown/src/parse/parse.jl | 2 +- 7 files changed, 26 insertions(+), 25 deletions(-) diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index e93494fac0f7e..8c9c6768090e0 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -71,7 +71,7 @@ struct Platform <: AbstractPlatform if isa(value, VersionNumber) value = string(value) elseif isa(value, AbstractString) - v = tryparse(VersionNumber, value) + v = tryparse(VersionNumber, String(value)) if isa(v, VersionNumber) value = string(v) end diff --git a/base/docs/Docs.jl b/base/docs/Docs.jl index d2696e499b4a5..473070114b0a2 100644 --- a/base/docs/Docs.jl +++ b/base/docs/Docs.jl @@ -291,14 +291,15 @@ end uncurly(@nospecialize ex) = isexpr(ex, :curly) ? ex.args[1] : ex -namify(@nospecialize x) = astname(x, isexpr(x, :macro)) +namify(@nospecialize x) = astname(x, isexpr(x, :macro))::Union{Symbol,Expr,GlobalRef} function astname(x::Expr, ismacro::Bool) - if isexpr(x, :.) + head = x.head + if head === :. ismacro ? macroname(x) : x # Call overloading, e.g. `(a::A)(b) = b` or `function (a::A)(b) b end` should document `A(b)` - elseif (isexpr(x, :function) || isexpr(x, :(=))) && isexpr(x.args[1], :call) && isexpr(x.args[1].args[1], :(::)) - return astname(x.args[1].args[1].args[end], ismacro) + elseif (head === :function || head === :(=)) && isexpr(x.args[1], :call) && isexpr((x.args[1]::Expr).args[1], :(::)) + return astname(((x.args[1]::Expr).args[1]::Expr).args[end], ismacro) else n = isexpr(x, (:module, :struct)) ? 2 : 1 astname(x.args[n], ismacro) @@ -347,11 +348,11 @@ function metadata(__source__, __module__, expr, ismodule) P = Pair{Symbol,Any} fields = P[] last_docstr = nothing - for each in expr.args[3].args + for each in (expr.args[3]::Expr).args if isa(each, Symbol) || isexpr(each, :(::)) # a field declaration if last_docstr !== nothing - push!(fields, P(namify(each), last_docstr)) + push!(fields, P(namify(each::Union{Symbol,Expr}), last_docstr)) last_docstr = nothing end elseif isexpr(each, :function) || isexpr(each, :(=)) @@ -359,7 +360,7 @@ function metadata(__source__, __module__, expr, ismodule) elseif isa(each, String) || isexpr(each, :string) || isexpr(each, :call) || (isexpr(each, :macrocall) && each.args[1] === Symbol("@doc_str")) # forms that might be doc strings - last_docstr = each + last_docstr = each::Union{String,Expr} end end dict = :($(Dict{Symbol,Any})($([(:($(P)($(quot(f)), $d)))::Expr for (f, d) in fields]...))) diff --git a/base/errorshow.jl b/base/errorshow.jl index 50325be8354e5..34f29f2a4aeaf 100644 --- a/base/errorshow.jl +++ b/base/errorshow.jl @@ -281,14 +281,11 @@ function showerror(io::IO, ex::MethodError) if any(x -> x <: AbstractArray{<:Number}, arg_types_param) && any(x -> x <: Number, arg_types_param) - nouns = Dict{Any,String}( - Base.:+ => "addition", - Base.:- => "subtraction", - ) + nounf = f === Base.:+ ? "addition" : "subtraction" varnames = ("scalar", "array") first, second = arg_types_param[1] <: Number ? varnames : reverse(varnames) fstring = f === Base.:+ ? "+" : "-" # avoid depending on show_default for functions (invalidation) - print(io, "\nFor element-wise $(nouns[f]), use broadcasting with dot syntax: $first .$fstring $second") + print(io, "\nFor element-wise $nounf, use broadcasting with dot syntax: $first .$fstring $second") end end if ft <: AbstractArray diff --git a/base/file.jl b/base/file.jl index 7d0211693d25b..a6bfee6f6a461 100644 --- a/base/file.jl +++ b/base/file.jl @@ -318,8 +318,8 @@ function checkfor_mv_cp_cptree(src::AbstractString, dst::AbstractString, txt::Ab end end -function cptree(src::AbstractString, dst::AbstractString; force::Bool=false, - follow_symlinks::Bool=false) +function cptree(src::String, dst::String; force::Bool=false, + follow_symlinks::Bool=false) isdir(src) || throw(ArgumentError("'$src' is not a directory. Use `cp(src, dst)`")) checkfor_mv_cp_cptree(src, dst, "copying"; force=force) mkdir(dst) @@ -335,6 +335,8 @@ function cptree(src::AbstractString, dst::AbstractString; force::Bool=false, end end end +cptree(src::AbstractString, dst::AbstractString; kwargs...) = + cptree(String(src)::String, String(dst)::String; kwargs...) """ cp(src::AbstractString, dst::AbstractString; force::Bool=false, follow_symlinks::Bool=false) diff --git a/base/namedtuple.jl b/base/namedtuple.jl index ac38f0b1ec2d4..c825dbcca5c8c 100644 --- a/base/namedtuple.jl +++ b/base/namedtuple.jl @@ -286,7 +286,8 @@ function merge(a::NamedTuple, itr) names = Symbol[] vals = Any[] inds = IdDict{Symbol,Int}() - for (k::Symbol, v) in itr + for (k, v) in itr + k = k::Symbol oldind = get(inds, k, 0) if oldind > 0 vals[oldind] = v diff --git a/base/stacktraces.jl b/base/stacktraces.jl index da4058b3dcb41..64cc6b289e809 100644 --- a/base/stacktraces.jl +++ b/base/stacktraces.jl @@ -111,7 +111,7 @@ function lookup(pointer::Ptr{Cvoid}) for i in 1:length(infos) info = infos[i]::Core.SimpleVector @assert(length(info) == 6) - res[i] = StackFrame(info[1], info[2], info[3], info[4], info[5], info[6], pointer) + res[i] = StackFrame(info[1]::Symbol, info[2]::Symbol, info[3]::Int, info[4], info[5]::Bool, info[6]::Bool, pointer) end return res end @@ -126,10 +126,10 @@ function lookup(ip::Union{Base.InterpreterIP,Core.Compiler.InterpreterIP}) end codeinfo = (code isa MethodInstance ? code.uninferred : code)::CodeInfo # prepare approximate code info - if code isa MethodInstance && code.def isa Method - func = code.def.name - file = code.def.file - line = code.def.line + if code isa MethodInstance && (meth = code.def; meth isa Method) + func = meth.name + file = meth.file + line = meth.line else func = top_level_scope_sym file = empty_sym @@ -139,13 +139,13 @@ function lookup(ip::Union{Base.InterpreterIP,Core.Compiler.InterpreterIP}) if i > length(codeinfo.codelocs) || codeinfo.codelocs[i] == 0 return [StackFrame(func, file, line, code, false, false, 0)] end - lineinfo = codeinfo.linetable[codeinfo.codelocs[i]] + lineinfo = codeinfo.linetable[codeinfo.codelocs[i]]::Core.LineInfoNode scopes = StackFrame[] while true inlined = lineinfo.inlined_at != 0 - push!(scopes, StackFrame(lineinfo.method, lineinfo.file, lineinfo.line, inlined ? nothing : code, false, inlined, 0)) + push!(scopes, StackFrame(Base.IRShow.method_name(lineinfo)::Symbol, lineinfo.file, lineinfo.line, inlined ? nothing : code, false, inlined, 0)) inlined || break - lineinfo = codeinfo.linetable[lineinfo.inlined_at] + lineinfo = codeinfo.linetable[lineinfo.inlined_at]::Core.LineInfoNode end return scopes end diff --git a/stdlib/Markdown/src/parse/parse.jl b/stdlib/Markdown/src/parse/parse.jl index 9ecd7bdd5307d..452d90d1176e1 100644 --- a/stdlib/Markdown/src/parse/parse.jl +++ b/stdlib/Markdown/src/parse/parse.jl @@ -2,7 +2,7 @@ mutable struct MD content::Vector{Any} - meta::Dict{Any, Any} + meta::Dict{Symbol, Any} MD(content::AbstractVector, meta::Dict = Dict()) = new(content, meta) From c8cc69b854a4160fa58aec6129ac6150b3b5c219 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 29 Jan 2021 02:36:59 -0500 Subject: [PATCH 195/239] make compact type alias output more compact (#39256) --- base/show.jl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/base/show.jl b/base/show.jl index 5d8d0e83cf628..311292c448523 100644 --- a/base/show.jl +++ b/base/show.jl @@ -789,15 +789,19 @@ function show_unionaliases(io::IO, x::Union) end function show(io::IO, ::MIME"text/plain", @nospecialize(x::Type)) - show(io, x) - if !print_without_params(x) && get(io, :compact, true) + if !print_without_params(x) properx = makeproper(io, x) if make_typealias(properx) !== nothing || (unwrap_unionall(x) isa Union && x <: make_typealiases(properx)[2]) - print(io, " (alias for ") - show(IOContext(io, :compact => false), x) - print(io, ")") + show(IOContext(io, :compact => true), x) + if !(get(io, :compact, false)::Bool) + print(io, " (alias for ") + show(IOContext(io, :compact => false), x) + print(io, ")") + end + return end end + show(io, x) # give a helpful hint for function types if x isa DataType && x !== UnionAll && !(get(io, :compact, false)::Bool) tn = x.name::Core.TypeName From 750f42aac2ad09b9ccd79408ee4e19941f668fa4 Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Fri, 29 Jan 2021 14:19:02 +0100 Subject: [PATCH 196/239] Fix broadcast error when eltype is inconsistent with getindex (#39185) * Fix broadcast error when eltype is inconsistent with getindex In that case we can infer the return type as `Union{}`, which triggers a type assertion error. This used to work in Julia 1.5. * whitespace Co-authored-by: Simeon Schaub * Update test/broadcast.jl Co-authored-by: Matt Bauman Co-authored-by: Matt Bauman Co-authored-by: Simeon Schaub --- base/broadcast.jl | 2 +- test/broadcast.jl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index d7f9e0cdff6e1..0477adcce5b45 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -924,7 +924,7 @@ const NonleafHandlingStyles = Union{DefaultArrayStyle,ArrayConflict} # Now handle the remaining values # The typeassert gives inference a helping hand on the element type and dimensionality # (work-around for #28382) - ElType′ = ElType <: Type ? Type : ElType + ElType′ = ElType === Union{} ? Any : ElType <: Type ? Type : ElType RT = dest isa AbstractArray ? AbstractArray{<:ElType′, ndims(dest)} : Any return copyto_nonleaf!(dest, bc′, iter, state, 1)::RT end diff --git a/test/broadcast.jl b/test/broadcast.jl index 1ac247e50f5b8..dff306ee27c11 100644 --- a/test/broadcast.jl +++ b/test/broadcast.jl @@ -990,3 +990,15 @@ p0 = copy(p) @test isequal(identity.(Vector{<:Union{Int, Missing}}[[1, 2],[missing, 1]]), [[1, 2],[missing, 1]]) end + +@testset "Issue #28382: eltype inconsistent with getindex" begin + struct Cyclotomic <: Number + end + + Base.eltype(::Type{<:Cyclotomic}) = Tuple{Int,Int} + + Base.:*(c::T, x::Cyclotomic) where {T<:Real} = [1, 2] + Base.:*(x::Cyclotomic, c::T) where {T<:Real} = [1, 2] + + @test Cyclotomic() .* [2, 3] == [[1, 2], [1, 2]] +end From da3f41c48d907c5b01b1268df08884f9f0c24486 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 28 Jan 2021 15:53:25 -0500 Subject: [PATCH 197/239] inference: constant prop more cases Improves #28671 somewhat, by permitting Int32(x::Char) to be constant folded away. --- base/compiler/abstractinterpretation.jl | 27 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 63ea8bba739d8..4526e58d328dd 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -266,7 +266,8 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, @nosp end end haveconst || improvable_via_constant_propagation(rettype) || return Any - if nargs > 1 + force_inference = method.aggressive_constprop || InferenceParams(interp).aggressive_constant_propagation + if !force_inference && nargs > 1 if istopfunction(f, :getindex) || istopfunction(f, :setindex!) arrty = argtypes[2] # don't propagate constant index into indexing of non-constant array @@ -282,16 +283,28 @@ function abstract_call_method_with_const_args(interp::AbstractInterpreter, @nosp end end end - if !allconst && (istopfunction(f, :+) || istopfunction(f, :-) || istopfunction(f, :*) || - istopfunction(f, :(==)) || istopfunction(f, :!=) || - istopfunction(f, :<=) || istopfunction(f, :>=) || istopfunction(f, :<) || istopfunction(f, :>) || - istopfunction(f, :<<) || istopfunction(f, :>>)) - return Any + if !force_inference && !allconst && + (istopfunction(f, :+) || istopfunction(f, :-) || istopfunction(f, :*) || + istopfunction(f, :(==)) || istopfunction(f, :!=) || + istopfunction(f, :<=) || istopfunction(f, :>=) || istopfunction(f, :<) || istopfunction(f, :>) || + istopfunction(f, :<<) || istopfunction(f, :>>)) + # it is almost useless to inline the op of when all the same type, + # but highly worthwhile to inline promote of a constant + length(argtypes) > 2 || return Any + t1 = widenconst(argtypes[2]) + all_same = true + for i in 3:length(argtypes) + if widenconst(argtypes[i]) !== t1 + all_same = false + break + end + end + all_same && return Any end - force_inference = allconst || method.aggressive_constprop || InferenceParams(interp).aggressive_constant_propagation if istopfunction(f, :getproperty) || istopfunction(f, :setproperty!) force_inference = true end + force_inference |= allconst mi = specialize_method(match, !force_inference) mi === nothing && return Any mi = mi::MethodInstance From ca526bccde86390143cf2715755d0cded94c1982 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 28 Jan 2021 16:32:28 -0500 Subject: [PATCH 198/239] Char: optimize arithmetic and number conversions This may not be obvious, but the actual improvement is entirely due to defining `UInt32_cold` (and thus inlining of the hot path), and not at all related to the other changes (which do however simplify the generated code). Fixes #28671 --- base/char.jl | 75 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/base/char.jl b/base/char.jl index 99f46988fc75f..a4071d37e41b2 100644 --- a/base/char.jl +++ b/base/char.jl @@ -45,9 +45,10 @@ represents a valid Unicode character. """ Char -(::Type{T})(x::Number) where {T<:AbstractChar} = T(UInt32(x)) -AbstractChar(x::Number) = Char(x) -(::Type{T})(x::AbstractChar) where {T<:Union{Number,AbstractChar}} = T(codepoint(x)) +@aggressive_constprop (::Type{T})(x::Number) where {T<:AbstractChar} = T(UInt32(x)) +@aggressive_constprop AbstractChar(x::Number) = Char(x) +@aggressive_constprop (::Type{T})(x::AbstractChar) where {T<:Union{Number,AbstractChar}} = T(codepoint(x)) +@aggressive_constprop (::Type{T})(x::AbstractChar) where {T<:Union{Int32,Int64}} = codepoint(x) % T (::Type{T})(x::T) where {T<:AbstractChar} = x """ @@ -74,7 +75,7 @@ return a different-sized integer (e.g. `UInt8`). """ function codepoint end -codepoint(c::Char) = UInt32(c) +@aggressive_constprop codepoint(c::Char) = UInt32(c) struct InvalidCharError{T<:AbstractChar} <: Exception char::T @@ -86,7 +87,7 @@ end @noinline throw_code_point_err(u::Integer) = throw(CodePointError(u)) function ismalformed(c::Char) - u = reinterpret(UInt32, c) + u = bitcast(UInt32, c) l1 = leading_ones(u) << 3 t0 = trailing_zeros(u) & 56 (l1 == 8) | (l1 + t0 > 32) | @@ -96,7 +97,7 @@ end @inline is_overlong_enc(u::UInt32) = (u >> 24 == 0xc0) | (u >> 24 == 0xc1) | (u >> 21 == 0x0704) | (u >> 20 == 0x0f08) function isoverlong(c::Char) - u = reinterpret(UInt32, c) + u = bitcast(UInt32, c) is_overlong_enc(u) end @@ -121,9 +122,9 @@ and [`show_invalid`](@ref). """ isoverlong(c::AbstractChar) = false -function UInt32(c::Char) +@aggressive_constprop function UInt32(c::Char) # TODO: use optimized inline LLVM - u = reinterpret(UInt32, c) + u = bitcast(UInt32, c) u < 0x80000000 && return u >> 24 l1 = leading_ones(u) t0 = trailing_zeros(u) & 56 @@ -145,8 +146,8 @@ that support overlong encodings should implement `Base.decode_overlong`. """ function decode_overlong end -function decode_overlong(c::Char) - u = reinterpret(UInt32, c) +@aggressive_constprop function decode_overlong(c::Char) + u = bitcast(UInt32, c) l1 = leading_ones(u) t0 = trailing_zeros(u) & 56 u &= 0xffffffff >> l1 @@ -155,24 +156,26 @@ function decode_overlong(c::Char) ((u & 0x007f0000) >> 4) | ((u & 0x7f000000) >> 6) end -function Char(u::UInt32) - u < 0x80 && return reinterpret(Char, u << 24) +@aggressive_constprop function Char(u::UInt32) + u < 0x80 && return bitcast(Char, u << 24) u < 0x00200000 || throw_code_point_err(u) c = ((u << 0) & 0x0000003f) | ((u << 2) & 0x00003f00) | ((u << 4) & 0x003f0000) | ((u << 6) & 0x3f000000) c = u < 0x00000800 ? (c << 16) | 0xc0800000 : u < 0x00010000 ? (c << 08) | 0xe0808000 : (c << 00) | 0xf0808080 - reinterpret(Char, c) + bitcast(Char, c) end -function (T::Union{Type{Int8},Type{UInt8}})(c::Char) - i = reinterpret(Int32, c) - i ≥ 0 ? ((i >>> 24) % T) : T(UInt32(c)) +@aggressive_constprop @noinline UInt32_cold(c::Char) = UInt32(c) +@aggressive_constprop function (T::Union{Type{Int8},Type{UInt8}})(c::Char) + i = bitcast(Int32, c) + i ≥ 0 ? ((i >>> 24) % T) : T(UInt32_cold(c)) end -function Char(b::Union{Int8,UInt8}) - 0 ≤ b ≤ 0x7f ? reinterpret(Char, (b % UInt32) << 24) : Char(UInt32(b)) +@aggressive_constprop @noinline Char_cold(b::UInt32) = Char(b) +@aggressive_constprop function Char(b::Union{Int8,UInt8}) + 0 ≤ b ≤ 0x7f ? bitcast(Char, (b % UInt32) << 24) : Char_cold(UInt32(b)) end convert(::Type{AbstractChar}, x::Number) = Char(x) # default to Char @@ -183,8 +186,8 @@ convert(::Type{T}, c::T) where {T<:AbstractChar} = c rem(x::AbstractChar, ::Type{T}) where {T<:Number} = rem(codepoint(x), T) -typemax(::Type{Char}) = reinterpret(Char, typemax(UInt32)) -typemin(::Type{Char}) = reinterpret(Char, typemin(UInt32)) +typemax(::Type{Char}) = bitcast(Char, typemax(UInt32)) +typemin(::Type{Char}) = bitcast(Char, typemin(UInt32)) size(c::AbstractChar) = () size(c::AbstractChar, d::Integer) = d < 1 ? throw(BoundsError()) : 1 @@ -205,12 +208,12 @@ iterate(c::AbstractChar, done=false) = done ? nothing : (c, true) isempty(c::AbstractChar) = false in(x::AbstractChar, y::AbstractChar) = x == y -==(x::Char, y::Char) = reinterpret(UInt32, x) == reinterpret(UInt32, y) -isless(x::Char, y::Char) = reinterpret(UInt32, x) < reinterpret(UInt32, y) +==(x::Char, y::Char) = bitcast(UInt32, x) == bitcast(UInt32, y) +isless(x::Char, y::Char) = bitcast(UInt32, x) < bitcast(UInt32, y) hash(x::Char, h::UInt) = - hash_uint64(((reinterpret(UInt32, x) + UInt64(0xd4d64234)) << 32) ⊻ UInt64(h)) + hash_uint64(((bitcast(UInt32, x) + UInt64(0xd4d64234)) << 32) ⊻ UInt64(h)) -first_utf8_byte(c::Char) = (reinterpret(UInt32, c) >> 24) % UInt8 +first_utf8_byte(c::Char) = (bitcast(UInt32, c) >> 24) % UInt8 # fallbacks: isless(x::AbstractChar, y::AbstractChar) = isless(Char(x), Char(y)) @@ -219,8 +222,26 @@ hash(x::AbstractChar, h::UInt) = hash(Char(x), h) widen(::Type{T}) where {T<:AbstractChar} = T @inline -(x::AbstractChar, y::AbstractChar) = Int(x) - Int(y) -@inline -(x::T, y::Integer) where {T<:AbstractChar} = T(Int32(x) - Int32(y)) -@inline +(x::T, y::Integer) where {T<:AbstractChar} = T(Int32(x) + Int32(y)) +@inline function -(x::T, y::Integer) where {T<:AbstractChar} + if x isa Char + u = Int32((bitcast(UInt32, x) >> 24) % Int8) + if u >= 0 # inline the runtime fast path + z = u - y + return 0 <= z < 0x80 ? bitcast(Char, (z % UInt32) << 24) : Char(UInt32(z)) + end + end + return T(Int32(x) - Int32(y)) +end +@inline function +(x::T, y::Integer) where {T<:AbstractChar} + if x isa Char + u = Int32((bitcast(UInt32, x) >> 24) % Int8) + if u >= 0 # inline the runtime fast path + z = u + y + return 0 <= z < 0x80 ? bitcast(Char, (z % UInt32) << 24) : Char(UInt32(z)) + end + end + return T(Int32(x) + Int32(y)) +end @inline +(x::Integer, y::AbstractChar) = y + x # `print` should output UTF-8 by default for all AbstractChar types. @@ -236,7 +257,7 @@ const hex_chars = UInt8['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', function show_invalid(io::IO, c::Char) write(io, 0x27) - u = reinterpret(UInt32, c) + u = bitcast(UInt32, c) while true a = hex_chars[((u >> 28) & 0xf) + 1] b = hex_chars[((u >> 24) & 0xf) + 1] From 26fd3c82408230995d8d493830b9137a013400bf Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 29 Jan 2021 13:34:10 -0500 Subject: [PATCH 199/239] render Regex and SubstitionString correctly for repr (#39422) Fixes #29580 --- base/regex.jl | 10 ++++++---- base/strings/io.jl | 10 ---------- test/regex.jl | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/base/regex.jl b/base/regex.jl index 9d5b9e169b66d..ca285de4a1f6d 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -119,8 +119,9 @@ function show(io::IO, re::Regex) imsxa = PCRE.CASELESS|PCRE.MULTILINE|PCRE.DOTALL|PCRE.EXTENDED|PCRE.UCP opts = re.compile_options if (opts & ~imsxa) == (DEFAULT_COMPILER_OPTS & ~imsxa) - print(io, 'r') - print_quoted_literal(io, re.pattern) + print(io, "r\"") + escape_raw_string(io, re.pattern) + print(io, "\"") if (opts & PCRE.CASELESS ) != 0; print(io, 'i'); end if (opts & PCRE.MULTILINE) != 0; print(io, 'm'); end if (opts & PCRE.DOTALL ) != 0; print(io, 's'); end @@ -485,8 +486,9 @@ isvalid(s::SubstitutionString, i::Integer) = isvalid(s.string, i)::Bool iterate(s::SubstitutionString, i::Integer...) = iterate(s.string, i...)::Union{Nothing,Tuple{AbstractChar,Int}} function show(io::IO, s::SubstitutionString) - print(io, "s") - print_quoted_literal(io, s.string) + print(io, "s\"") + escape_raw_string(io, s.string) + print(io, "\"") end """ diff --git a/base/strings/io.jl b/base/strings/io.jl index 984c00408a597..30ffe03354604 100644 --- a/base/strings/io.jl +++ b/base/strings/io.jl @@ -186,16 +186,6 @@ write(io::IO, s::Union{String,SubString{String}}) = GC.@preserve s Int(unsafe_write(io, pointer(s), reinterpret(UInt, sizeof(s))))::Int print(io::IO, s::Union{String,SubString{String}}) = (write(io, s); nothing) -## printing literal quoted string data ## - -# this is the inverse of print_unescaped_chars(io, s, "\\\") - -function print_quoted_literal(io, s::AbstractString) - print(io, '"') - for c = s; c == '"' ? print(io, "\\\"") : print(io, c); end - print(io, '"') -end - """ repr(x; context=nothing) diff --git a/test/regex.jl b/test/regex.jl index f18f03fd08114..0a28d3464579d 100644 --- a/test/regex.jl +++ b/test/regex.jl @@ -34,11 +34,6 @@ @test map(m -> m.match, eachmatch(r"(\p{L}+)", "Tú lees.")) == ["Tú", "lees"] @test map(m -> m.match, eachmatch(r"(\p{L}+)", "¿Cuál es tu pregunta?")) == ["Cuál", "es", "tu", "pregunta"] - # Issue 9545 (32 bit) - buf = PipeBuffer() - show(buf, r"") - @test read(buf, String) == "r\"\"" - # see #10994, #11447: PCRE2 allows NUL chars in the pattern @test occursin(Regex("^a\0b\$"), "a\0b") @@ -52,12 +47,17 @@ subst = s"FROM: \g\n MESSAGE: \1" @test replace(msg, re => subst) == "FROM: Julia\n MESSAGE: Hello" + # Issue #9545 (32 bit) + @test repr(r"") == "r\"\"" # Issue #36550 - @test repr(s"\x") == "s\"\\x\"" - @test repr(s"\\x") == "s\"\\\\x\"" - @test repr(s"\\\x") == "s\"\\\\\\x\"" - @test repr(s"x\\") == "s\"x\\\"" - @test repr(s"a\1b") == "s\"a\\1b\"" + @test repr(s"\x") == raw"s\"\x\"" + @test repr(s"\\x") == raw"s\"\\x\"" + @test repr(s"\\\x") == raw"s\"\\\x\"" + @test repr(s"x\\") == raw"s\"x\\\\\"" + @test repr(s"a\1b") == raw"s\"a\1b\"" + # Issue #29580 + @test repr(r"\\\"") == raw"r\"\\\\\\\"\"" + @test repr(s"\\\"\\") == raw"s\"\\\\\\\"\\\\\"" # findall @test findall(r"\w+", "foo bar") == [1:3, 5:7] From 2a0368e8dc06bd48e7faabb1702b6c308b801c38 Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Sat, 30 Jan 2021 01:59:33 +0000 Subject: [PATCH 200/239] [automated] Bump the Downloads stdlib from 4e55241 to 64368fb (#39453) Co-authored-by: Dilum Aluthge --- .../md5 | 1 - .../sha512 | 1 - .../md5 | 1 + .../sha512 | 1 + stdlib/Downloads.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 delete mode 100644 deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 create mode 100644 deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 create mode 100644 deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 diff --git a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 deleted file mode 100644 index fe7ca5582969c..0000000000000 --- a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -7e7a92138a053f4f65265821714d0919 diff --git a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 b/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 deleted file mode 100644 index e16064534e7ef..0000000000000 --- a/deps/checksums/Downloads-4e55241413c95551c54fc5c9bfdf5f48cb02fc4c.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -31628f766030e5ab46de78d4da458944f37fbe460a60a9f8969a9eab6be105373f7a57230e70b22ac66a72a85a46b0f7e215d084f9e5141b215a5271b26c6162 diff --git a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 new file mode 100644 index 0000000000000..8deead0b2caf7 --- /dev/null +++ b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 @@ -0,0 +1 @@ +f918de3b1acfb82c6c8fefbab05bbd16 diff --git a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 new file mode 100644 index 0000000000000..306521571f29b --- /dev/null +++ b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 @@ -0,0 +1 @@ +2742d31b6a7afcebffea4e826fb0d91af1e4696a4574731c47884fb63a9df658a3dae813462049898c04f7f9b94b6921574e48794e5b06e93f78bc2d40067cd2 diff --git a/stdlib/Downloads.version b/stdlib/Downloads.version index b6dd897b63dd3..c6068afd9ebf4 100644 --- a/stdlib/Downloads.version +++ b/stdlib/Downloads.version @@ -1,2 +1,2 @@ DOWNLOADS_BRANCH = master -DOWNLOADS_SHA1 = 4e55241413c95551c54fc5c9bfdf5f48cb02fc4c +DOWNLOADS_SHA1 = 64368fb67d9da687a89da580aaa3b6f3fa2d6e40 From 08db65daeca55ea32f1eb9c82b76f0ed82b53a77 Mon Sep 17 00:00:00 2001 From: Omar Elrefaei <17922991+Omar-Elrefaei@users.noreply.github.com> Date: Fri, 29 Jan 2021 21:35:36 -0500 Subject: [PATCH 201/239] Fixing subheadings in faq slurping/splatting (#39451) --- doc/src/manual/faq.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/manual/faq.md b/doc/src/manual/faq.md index f1afbef677482..b79982a704091 100644 --- a/doc/src/manual/faq.md +++ b/doc/src/manual/faq.md @@ -207,12 +207,12 @@ have two options: ### What does the `...` operator do? -### The two uses of the `...` operator: slurping and splatting +#### The two uses of the `...` operator: slurping and splatting Many newcomers to Julia find the use of `...` operator confusing. Part of what makes the `...` operator confusing is that it means two different things depending on context. -### `...` combines many arguments into one argument in function definitions +#### `...` combines many arguments into one argument in function definitions In the context of function definitions, the `...` operator is used to combine many different arguments into a single argument. This use of `...` for combining many different arguments into a single @@ -237,7 +237,7 @@ Arg #3 = 3 If Julia were a language that made more liberal use of ASCII characters, the slurping operator might have been written as `<-...` instead of `...`. -### `...` splits one argument into many different arguments in function calls +#### `...` splits one argument into many different arguments in function calls In contrast to the use of the `...` operator to denote slurping many different arguments into one argument when defining a function, the `...` operator is also used to cause a single function From 0f72497ca3c7d9efcd41393d86d66b3925631391 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 29 Jan 2021 22:53:53 -0500 Subject: [PATCH 202/239] InteractiveUtils: add more info to code_warntype (#39428) Show the method it came from and the static-parameter values for it --- base/methodshow.jl | 2 +- base/show.jl | 4 ++ stdlib/InteractiveUtils/src/codeview.jl | 73 ++++++++++++++++---- stdlib/InteractiveUtils/test/highlighting.jl | 25 +++++++ stdlib/InteractiveUtils/test/runtests.jl | 1 + stdlib/Test/src/Test.jl | 5 +- 6 files changed, 93 insertions(+), 17 deletions(-) diff --git a/base/methodshow.jl b/base/methodshow.jl index ccab29cca16f8..275632dff391f 100644 --- a/base/methodshow.jl +++ b/base/methodshow.jl @@ -4,7 +4,7 @@ const empty_sym = Symbol("") function strip_gensym(sym) - if sym === Symbol("#self#") || sym === Symbol("#unused#") + if sym === :var"#self#" || sym === :var"#unused#" return empty_sym end return Symbol(replace(String(sym), r"^(.*)#(.*#)?\d+$" => s"\1")) diff --git a/base/show.jl b/base/show.jl index 311292c448523..cfe0abce9a8ac 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1030,6 +1030,10 @@ function sourceinfo_slotnames(src::CodeInfo) names = Dict{String,Int}() printnames = Vector{String}(undef, length(slotnames)) for i in eachindex(slotnames) + if slotnames[i] == :var"#unused#" + printnames[i] = "_" + continue + end name = string(slotnames[i]) idx = get!(names, name, i) if idx != i || isempty(name) diff --git a/stdlib/InteractiveUtils/src/codeview.jl b/stdlib/InteractiveUtils/src/codeview.jl index 5aee664d95669..3920a1e2ee8de 100644 --- a/stdlib/InteractiveUtils/src/codeview.jl +++ b/stdlib/InteractiveUtils/src/codeview.jl @@ -29,18 +29,15 @@ end function warntype_type_printer(io::IO, @nospecialize(ty), used::Bool) used || return - if ty isa Type && (!Base.isdispatchelem(ty) || ty == Core.Box) - if highlighting[:warntype] && ty isa Union && Base.is_expected_union(ty) - Base.emphasize(io, "::$ty", Base.warn_color()) # more mild user notification - else - Base.emphasize(io, "::$ty") - end + str = "::$ty" + if !highlighting[:warntype] + print(io, str) + elseif ty isa Union && Base.is_expected_union(ty) + Base.emphasize(io, str, Base.warn_color()) # more mild user notification + elseif ty isa Type && (!Base.isdispatchelem(ty) || ty == Core.Box) + Base.emphasize(io, str) else - if highlighting[:warntype] - Base.printstyled(io, "::$ty", color=:cyan) # show the "good" type - else - Base.print(io, "::$ty") - end + Base.printstyled(io, str, color=:cyan) # show the "good" type end nothing end @@ -65,25 +62,73 @@ function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); debuginfo::Sy lineprinter = Base.IRShow.__debuginfo[debuginfo] for (src, rettype) in code_typed(f, t, optimize=optimize) lambda_io::IOContext = io + p = src.parent + nargs::Int = 0 + if p isa Core.MethodInstance + println(io, p) + print(io, " from ") + println(io, p.def) + p.def isa Method && (nargs = p.def.nargs) + if !isempty(p.sparam_vals) + println(io, "Static Parameters") + sig = p.def.sig + warn_color = Base.warn_color() # more mild user notification + for i = 1:length(p.sparam_vals) + sig = sig::UnionAll + name = sig.var.name + val = p.sparam_vals[i] + print_highlighted(io::IO, v::String, color::Symbol) = + if highlighting[:warntype] + Base.printstyled(io, v; color) + else + Base.print(io, v) + end + if val isa TypeVar + if val.lb === Union{} + print(io, " ", name, " <: ") + print_highlighted(io, "$(val.ub)", warn_color) + elseif val.ub === Any + print(io, " ", sig.var.name, " >: ") + print_highlighted(io, "$(val.lb)", warn_color) + else + print(io, " ") + print_highlighted(io, "$(val.lb)", warn_color) + print(io, " <: ", sig.var.name, " <: ") + print_highlighted(io, "$(val.ub)", warn_color) + end + elseif val isa typeof(Vararg) + print(io, " ", name, "::") + print_highlighted(io, "Int", warn_color) + else + print(io, " ", sig.var.name, " = ") + print_highlighted(io, "$(val)", :cyan) # show the "good" type + end + println(io) + sig = sig.body + end + end + end if src.slotnames !== nothing slotnames = Base.sourceinfo_slotnames(src) lambda_io = IOContext(lambda_io, :SOURCE_SLOTNAMES => slotnames) - println(io, "Variables") slottypes = src.slottypes + nargs > 0 && println(io, "Arguments") for i = 1:length(slotnames) + if i == nargs + 1 + println(io, "Locals") + end print(io, " ", slotnames[i]) if isa(slottypes, Vector{Any}) warntype_type_printer(io, slottypes[i], true) end println(io) end - println(io) end print(io, "Body") warntype_type_printer(io, rettype, true) println(io) - # TODO: static parameter values Base.IRShow.show_ir(lambda_io, src, lineprinter(src), warntype_type_printer) + println(io) end nothing end diff --git a/stdlib/InteractiveUtils/test/highlighting.jl b/stdlib/InteractiveUtils/test/highlighting.jl index 32ac2912759c6..1ab7dc4292ced 100644 --- a/stdlib/InteractiveUtils/test/highlighting.jl +++ b/stdlib/InteractiveUtils/test/highlighting.jl @@ -2,6 +2,31 @@ using InteractiveUtils, Test +myzeros(::Type{T}, ::Type{S}, ::Type{R}, dims::Tuple{Vararg{Integer, N}}, dims2::Tuple{Vararg{Integer, M}}) where {T, R, S, M, N} = (x = 1) +@testset "warntype content" begin + io = IOBuffer() + code_warntype(IOContext(io, :color => true), myzeros, + Tuple{Type{<:Integer}, Type{>:String}, Type{T} where Signed<:T<:Real, Tuple{Vararg{Int}}, NTuple{4,Int}}) + seekstart(io) + @test startswith(readline(io), "MethodInstance for ") + @test startswith(readline(io), " from myzeros(::Type{T}, ::") + @test occursin(r"^Static Parameters$", readline(io)) + @test occursin(r"^ T <: .*Integer", readline(io)) + @test occursin(r"^ .*Signed.* <: R <: .*Real", readline(io)) + @test occursin(r"^ S >: .*String", readline(io)) + @test occursin(r"^ M = .*4", readline(io)) + @test occursin(r"^ N::.*Int", readline(io)) + @test occursin(r"^Arguments$", readline(io)) + @test occursin(r"^ #self#.*::Core.Const", readline(io)) + while readline(io) != "Locals" + eof(io) && throw(EOFError()) + end + @test occursin(r"^ x.*::Int", readline(io)) + @test occursin(r"^Body.*::Int", readline(io)) + code = read(io, String) + @test endswith(code, "\n\n") +end + @testset "warntype highlighting" begin # Make sure that "expected" unions are highlighted with warning color instead of error color io = IOBuffer() diff --git a/stdlib/InteractiveUtils/test/runtests.jl b/stdlib/InteractiveUtils/test/runtests.jl index 6df0670f1ddd0..8f977cb0cc0d0 100644 --- a/stdlib/InteractiveUtils/test/runtests.jl +++ b/stdlib/InteractiveUtils/test/runtests.jl @@ -106,6 +106,7 @@ end # module ImportIntrinsics15819 foo11122(x) = @fastmath x - 1.0 # issue #11122, #13568 and #15819 +tag = "ANY" @test !warntype_hastag(+, Tuple{Int,Int}, tag) @test !warntype_hastag(-, Tuple{Int,Int}, tag) @test !warntype_hastag(*, Tuple{Int,Int}, tag) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index c2332c67d58c7..d657b80ddff05 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1358,10 +1358,11 @@ julia> typeof(f(2)) Int64 julia> @code_warntype f(2) -Variables +MethodInstance for f(::Int64) + from f(a) in Main at none:1 +Arguments #self#::Core.Const(f) a::Int64 - Body::UNION{FLOAT64, INT64} 1 ─ %1 = (a > 1)::Bool └── goto #3 if not %1 From b4b964334278a4f0c002100f387fe9f98b7e254d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Sun, 31 Jan 2021 08:39:25 +0000 Subject: [PATCH 203/239] Module-qualify references to LibGit2.{map,count} (#39461) Reading the documentation is very confusing, because these functions don't extend the corresponding `Base` functions and they aren't exported. Ref: https://github.com/JuliaLang/julia/pull/22654#discussion_r125169408. --- stdlib/LibGit2/src/walker.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stdlib/LibGit2/src/walker.jl b/stdlib/LibGit2/src/walker.jl index e977590eafb88..468e6899a7aa8 100644 --- a/stdlib/LibGit2/src/walker.jl +++ b/stdlib/LibGit2/src/walker.jl @@ -5,17 +5,17 @@ A `GitRevWalker` *walks* through the *revisions* (i.e. commits) of a git repository `repo`. It is a collection of the commits -in the repository, and supports iteration and calls to [`map`](@ref LibGit2.map) -and [`count`](@ref LibGit2.count) (for instance, `count` could be used to determine +in the repository, and supports iteration and calls to [`LibGit2.map`](@ref) +and [`LibGit2.count`](@ref) (for instance, `LibGit2.count` could be used to determine what percentage of commits in a repository were made by a certain author). ```julia cnt = LibGit2.with(LibGit2.GitRevWalker(repo)) do walker - count((oid,repo)->(oid == commit_oid1), walker, oid=commit_oid1, by=LibGit2.Consts.SORT_TIME) + LibGit2.count((oid,repo)->(oid == commit_oid1), walker, oid=commit_oid1, by=LibGit2.Consts.SORT_TIME) end ``` -Here, `count` finds the number of commits along the walk with a certain `GitHash`. +Here, `LibGit2.count` finds the number of commits along the walk with a certain `GitHash`. Since the `GitHash` is unique to a commit, `cnt` will be `1`. """ function GitRevWalker(repo::GitRepo) @@ -60,7 +60,7 @@ end Start the [`GitRevWalker`](@ref) `walker` at commit `cid`. This function can be used to apply a function to all commits since a certain year, by passing the first commit -of that year as `cid` and then passing the resulting `w` to [`map`](@ref LibGit2.map). +of that year as `cid` and then passing the resulting `w` to [`LibGit2.map`](@ref). """ function push!(w::GitRevWalker, cid::GitHash) ensure_initialized() @@ -104,7 +104,7 @@ oids = LibGit2.with(LibGit2.GitRevWalker(repo)) do walker LibGit2.map((oid, repo)->string(oid), walker, by=LibGit2.Consts.SORT_TIME) end ``` -Here, `map` visits each commit using the `GitRevWalker` and finds its `GitHash`. +Here, `LibGit2.map` visits each commit using the `GitRevWalker` and finds its `GitHash`. """ function map(f::Function, walker::GitRevWalker; oid::GitHash=GitHash(), @@ -146,10 +146,10 @@ are: # Examples ```julia cnt = LibGit2.with(LibGit2.GitRevWalker(repo)) do walker - count((oid, repo)->(oid == commit_oid1), walker, oid=commit_oid1, by=LibGit2.Consts.SORT_TIME) + LibGit2.count((oid, repo)->(oid == commit_oid1), walker, oid=commit_oid1, by=LibGit2.Consts.SORT_TIME) end ``` -`count` finds the number of commits along the walk with a certain `GitHash` `commit_oid1`, starting +`LibGit2.count` finds the number of commits along the walk with a certain `GitHash` `commit_oid1`, starting the walk from that commit and moving forwards in time from it. Since the `GitHash` is unique to a commit, `cnt` will be `1`. """ From aad4fec79da6aa5bdacb501d6d80d0a4f9f091ac Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Sun, 31 Jan 2021 14:52:29 -0500 Subject: [PATCH 204/239] Add missing intialization for aggressive_constprop flag (#39466) --- src/method.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/method.c b/src/method.c index a582a6468a620..96eafd1acaa2e 100644 --- a/src/method.c +++ b/src/method.c @@ -361,6 +361,7 @@ JL_DLLEXPORT jl_code_info_t *jl_new_code_info_uninit(void) src->propagate_inbounds = 0; src->pure = 0; src->edges = jl_nothing; + src->aggressive_constprop = 0; return src; } @@ -644,6 +645,7 @@ JL_DLLEXPORT jl_method_t *jl_new_method_uninit(jl_module_t *module) m->primary_world = 1; m->deleted_world = ~(size_t)0; m->is_for_opaque_closure = 0; + m->aggressive_constprop = 0; JL_MUTEX_INIT(&m->writelock); return m; } From b78bd0aead74b8e95491ac8d02885c5a6977a350 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 22 Jan 2021 14:16:38 -0500 Subject: [PATCH 205/239] Fix OpaqueClosure show method This file moved into Base.Experimental late in the PR cycle, which doesn't have Base.show imported. Just move the show methods to show.jl, since OpaqueClosure is defined in Core anyway - might as well. --- base/opaque_closure.jl | 11 ----------- base/show.jl | 12 ++++++++++++ test/opaque_closure.jl | 3 +++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/base/opaque_closure.jl b/base/opaque_closure.jl index 1df89454d569f..d14e72db57213 100644 --- a/base/opaque_closure.jl +++ b/base/opaque_closure.jl @@ -1,14 +1,3 @@ -function show(io::IO, oc::Core.OpaqueClosure) - A, R = typeof(oc).parameters - show_tuple_as_call(io, Symbol(""), A; hasfirst=false) - print(io, "::", R) - print(io, "->◌") -end - -function show(io::IO, ::MIME"text/plain", oc::Core.OpaqueClosure{A, R}) where {A, R} - show(io, oc) -end - """ @opaque (args...) -> body diff --git a/base/show.jl b/base/show.jl index cfe0abce9a8ac..a971293bfa850 100644 --- a/base/show.jl +++ b/base/show.jl @@ -2848,3 +2848,15 @@ end bitshow(B::BitArray) = bitshow(stdout, B) bitstring(B::BitArray) = sprint(bitshow, B) + +# printing OpaqueClosure +function show(io::IO, oc::Core.OpaqueClosure) + A, R = typeof(oc).parameters + show_tuple_as_call(io, Symbol(""), A; hasfirst=false) + print(io, "::", R) + print(io, "->◌") +end + +function show(io::IO, ::MIME"text/plain", oc::Core.OpaqueClosure{A, R}) where {A, R} + show(io, oc) +end diff --git a/test/opaque_closure.jl b/test/opaque_closure.jl index 492b1db47e618..2dd676d4d8951 100644 --- a/test/opaque_closure.jl +++ b/test/opaque_closure.jl @@ -150,3 +150,6 @@ end mk_va_opaque() = @opaque (x...)->x @test mk_va_opaque()(1) == (1,) @test mk_va_opaque()(1,2) == (1,2) + +# OpaqueClosure show method +@test repr(@opaque x->1) == "(::Any)::Any->◌" From 7ecdcc5340037f979a789c702ea9f12827e86036 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 1 Feb 2021 00:53:51 +0100 Subject: [PATCH 206/239] Fix bullet list formatting in Logging docs. (#39469) --- stdlib/Logging/docs/src/index.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/Logging/docs/src/index.md b/stdlib/Logging/docs/src/index.md index e1d60223615ef..0bb1a9c5e89ce 100644 --- a/stdlib/Logging/docs/src/index.md +++ b/stdlib/Logging/docs/src/index.md @@ -60,15 +60,15 @@ automatically extracted. Let's examine the user-defined data first: user-defined levels are also possible. Each is distinct in purpose: - `Debug` is information intended for the developer of the program. - These events are disabled by default. + These events are disabled by default. - `Info` is for general information to the user. - Think of it as an alternative to using `println` directly. + Think of it as an alternative to using `println` directly. - `Warn` means something is wrong and action is likely required - but that for now the program is still working. + but that for now the program is still working. - `Error` means something is wrong and it is unlikely to be recovered, - at least by this part of the code. - Often this log-level is unneeded as throwing an exception can convey - all the required information. + at least by this part of the code. + Often this log-level is unneeded as throwing an exception can convey + all the required information. * The *message* is an object describing the event. By convention `AbstractString`s passed as messages are assumed to be in markdown format. From 5794c606d6cdd5f135c371ccb6c041c407f2abdd Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 22 Jan 2021 14:17:49 -0500 Subject: [PATCH 207/239] Handle Vararg in signature in methodshow The parameters of `sig` are not guaranteed to match the arguments that were passed on method construction, since the type may have been normalized. This will become more pronounced after #31681, but with OpaqueClosure we now have some method whose sig is Tuple{Vararg{Any}}, so we might as well make this change now. Of course, we may want to print OpaqueClosure methods differently in general, but that's a question for another time, once we've worked out exactly what the sig fields of OpaqueClosure methods should look like. --- base/methodshow.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/base/methodshow.jl b/base/methodshow.jl index 275632dff391f..961328c7c9684 100644 --- a/base/methodshow.jl +++ b/base/methodshow.jl @@ -11,9 +11,16 @@ function strip_gensym(sym) end function argtype_decl(env, n, @nospecialize(sig::DataType), i::Int, nargs, isva::Bool) # -> (argname, argtype) - t = sig.parameters[i] - if i == nargs && isva && !isvarargtype(t) - t = Vararg{t,length(sig.parameters)-nargs+1} + t = sig.parameters[unwrapva(min(i, end))] + if i == nargs && isva + va = sig.parameters[end] + if isvarargtype(va) && (!isdefined(va, :N) || !isa(va.N, Int)) + t = va + else + ntotal = length(sig.parameters) + isvarargtype(va) && (ntotal += va.N - 1) + t = Vararg{t,ntotal-nargs+1} + end end if isa(n,Expr) n = n.args[1] # handle n::T in arg list @@ -62,7 +69,7 @@ function arg_decl_parts(m::Method, html=false) end decls = Tuple{String,String}[argtype_decl(show_env, argnames[i], sig, i, m.nargs, m.isva) for i = 1:m.nargs] - decls[1] = ("", sprint(show_signature_function, sig.parameters[1], false, decls[1][1], html, + decls[1] = ("", sprint(show_signature_function, unwrapva(sig.parameters[1]), false, decls[1][1], html, context = show_env)) else decls = Tuple{String,String}[("", "") for i = 1:length(sig.parameters::SimpleVector)] From b0b61d4753c6936645fa7108b9f7154081ed9bf5 Mon Sep 17 00:00:00 2001 From: DilumAluthgeBot <43731525+DilumAluthgeBot@users.noreply.github.com> Date: Mon, 1 Feb 2021 16:27:42 +0000 Subject: [PATCH 208/239] [automated] Bump the Downloads stdlib from 64368fb to 0d798cf (#39459) Co-authored-by: Dilum Aluthge --- .../md5 | 1 + .../sha512 | 1 + .../md5 | 1 - .../sha512 | 1 - stdlib/Downloads.version | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/md5 create mode 100644 deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/sha512 delete mode 100644 deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 delete mode 100644 deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 diff --git a/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/md5 b/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/md5 new file mode 100644 index 0000000000000..4a1d720b1d763 --- /dev/null +++ b/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/md5 @@ -0,0 +1 @@ +258aee97c44956a2ef94525b24899b66 diff --git a/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/sha512 b/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/sha512 new file mode 100644 index 0000000000000..bd810322f68bd --- /dev/null +++ b/deps/checksums/Downloads-0d798cfe2c06c304833dde913552fe13559a0c20.tar.gz/sha512 @@ -0,0 +1 @@ +882a552472b1023eed52ffbeeafd320a178dcb54f1dc36a5cc8c8c8f06c1038e13e8cd257784851532deaa3faaf9809146a0873c3dff28219b9ee6492366ee2c diff --git a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 deleted file mode 100644 index 8deead0b2caf7..0000000000000 --- a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/md5 +++ /dev/null @@ -1 +0,0 @@ -f918de3b1acfb82c6c8fefbab05bbd16 diff --git a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 b/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 deleted file mode 100644 index 306521571f29b..0000000000000 --- a/deps/checksums/Downloads-64368fb67d9da687a89da580aaa3b6f3fa2d6e40.tar.gz/sha512 +++ /dev/null @@ -1 +0,0 @@ -2742d31b6a7afcebffea4e826fb0d91af1e4696a4574731c47884fb63a9df658a3dae813462049898c04f7f9b94b6921574e48794e5b06e93f78bc2d40067cd2 diff --git a/stdlib/Downloads.version b/stdlib/Downloads.version index c6068afd9ebf4..4d5a67afafcad 100644 --- a/stdlib/Downloads.version +++ b/stdlib/Downloads.version @@ -1,2 +1,2 @@ DOWNLOADS_BRANCH = master -DOWNLOADS_SHA1 = 64368fb67d9da687a89da580aaa3b6f3fa2d6e40 +DOWNLOADS_SHA1 = 0d798cfe2c06c304833dde913552fe13559a0c20 From f2a2637f351cc908f248a0cb7b12be1bde9ed86a Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Mon, 1 Feb 2021 21:55:33 +0400 Subject: [PATCH 209/239] Fix linear indexing for 0D views of OffsetVectors (#39404) * Fix linear indexing for views of OffsetVectors * update comments Co-authored-by: Matt Bauman --- base/subarray.jl | 6 +++--- test/offsetarray.jl | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/base/subarray.jl b/base/subarray.jl index d1207ec094037..7b705be82a31f 100644 --- a/base/subarray.jl +++ b/base/subarray.jl @@ -380,7 +380,7 @@ compute_offset1(parent::AbstractVector, stride1::Integer, I::Tuple{AbstractRange # indexing uses the indices along the given dimension. # If the result is one-dimensional and it's a range, then linear # indexing might be offset if the index itself is offset -# Otherwise linear indexing always starts with 1. +# Otherwise linear indexing always matches the parent. compute_offset1(parent, stride1::Integer, I::Tuple) = (@_inline_meta; compute_offset1(parent, stride1, find_extended_dims(1, I...), find_extended_inds(I...), I)) compute_offset1(parent, stride1::Integer, dims::Tuple{Int}, inds::Tuple{Slice}, I::Tuple) = @@ -388,11 +388,11 @@ compute_offset1(parent, stride1::Integer, dims::Tuple{Int}, inds::Tuple{Slice}, compute_offset1(parent, stride1::Integer, dims, inds::Tuple{AbstractRange}, I::Tuple) = (@_inline_meta; compute_linindex(parent, I) - stride1*first(axes1(inds[1]))) # potentially index-offsetting case compute_offset1(parent, stride1::Integer, dims, inds, I::Tuple) = - (@_inline_meta; compute_linindex(parent, I) - stride1) # linear indexing starts with 1 + (@_inline_meta; compute_linindex(parent, I) - stride1) function compute_linindex(parent, I::NTuple{N,Any}) where N @_inline_meta IP = fill_to_length(axes(parent), OneTo(1), Val(N)) - compute_linindex(1, 1, IP, I) + compute_linindex(first(LinearIndices(parent)), 1, IP, I) end function compute_linindex(f, s, IP::Tuple, I::Tuple{ScalarIndex, Vararg{Any}}) @_inline_meta diff --git a/test/offsetarray.jl b/test/offsetarray.jl index 07f2e12999f90..ee75623e7a7c8 100644 --- a/test/offsetarray.jl +++ b/test/offsetarray.jl @@ -110,6 +110,15 @@ let a1 = [11,12,13], a2 = [1 2; 3 4] @test_throws BoundsError i2[1:2:5] end +# issue #37274 +let a = 1:3 + oa = OffsetArray(a, 0:2) + b = @view oa[0] + @test b[] == b[1] == b[1,1] == 1 + @test_throws BoundsError b[0] + @test_throws BoundsError b[2] +end + # logical indexing @test A[A .> 2] == [3,4] @test_throws BoundsError h[trues(2)] From ae8a7e81747595a7690fe407f04b3bb1e2da9953 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 1 Feb 2021 17:16:59 -0500 Subject: [PATCH 210/239] Drop redundant `sptypes` argument (#39477) When this code was written `IRCode` did not contain the sptypes, so it had to be passed separately. That is now changed, so the argument is redundant. Drop it. --- base/compiler/ssair/driver.jl | 2 +- base/compiler/ssair/slot2ssa.jl | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/compiler/ssair/driver.jl b/base/compiler/ssair/driver.jl index 83205033342d6..230cd5d90cc79 100644 --- a/base/compiler/ssair/driver.jl +++ b/base/compiler/ssair/driver.jl @@ -114,7 +114,7 @@ function slot2reg(ir::IRCode, ci::CodeInfo, nargs::Int, sv::OptimizationState) # need `ci` for the slot metadata, IR for the code @timeit "domtree 1" domtree = construct_domtree(ir.cfg.blocks) defuse_insts = scan_slot_def_use(nargs, ci, ir.stmts.inst) - @timeit "construct_ssa" ir = construct_ssa!(ci, ir, domtree, defuse_insts, nargs, sv.sptypes, sv.slottypes) # consumes `ir` + @timeit "construct_ssa" ir = construct_ssa!(ci, ir, domtree, defuse_insts, nargs, sv.slottypes) # consumes `ir` return ir end diff --git a/base/compiler/ssair/slot2ssa.jl b/base/compiler/ssair/slot2ssa.jl index 057bb72ff1152..a604b7ef39526 100644 --- a/base/compiler/ssair/slot2ssa.jl +++ b/base/compiler/ssair/slot2ssa.jl @@ -581,7 +581,7 @@ function recompute_type(node::Union{PhiNode, PhiCNode}, ci::CodeInfo, ir::IRCode return new_typ end -function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, nargs::Int, sptypes::Vector{Any}, +function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, nargs::Int, slottypes::Vector{Any}) code = ir.stmts.inst cfg = ir.cfg @@ -629,7 +629,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg fixup_uses!(ir, ci, code, slot.uses, idx, nothing) else val = code[slot.defs[]].args[2] - typ = typ_for_val(val, ci, sptypes, slot.defs[], slottypes) + typ = typ_for_val(val, ci, ir.sptypes, slot.defs[], slottypes) ssaval = SSAValue(make_ssa!(ci, code, slot.defs[], idx, typ)) fixup_uses!(ir, ci, code, slot.uses, idx, ssaval) end @@ -712,7 +712,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg if isa(incoming_val, NewSSAValue) push!(type_refine_phi, ssaval.id) end - typ = incoming_val === undef_token ? MaybeUndef(Union{}) : typ_for_val(incoming_val, ci, sptypes, -1, slottypes) + typ = incoming_val === undef_token ? MaybeUndef(Union{}) : typ_for_val(incoming_val, ci, ir.sptypes, -1, slottypes) old_entry = new_nodes.stmts[ssaval.id] if isa(typ, DelayedTyp) push!(type_refine_phi, ssaval.id) @@ -736,7 +736,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg ival = incoming_vals[slot_id(slot)] ivalundef = ival === undef_token unode = ivalundef ? UpsilonNode() : UpsilonNode(ival) - typ = ivalundef ? MaybeUndef(Union{}) : typ_for_val(ival, ci, sptypes, -1, slottypes) + typ = ivalundef ? MaybeUndef(Union{}) : typ_for_val(ival, ci, ir.sptypes, -1, slottypes) push!(node.values, NewSSAValue(insert_node!(ir, first_insert_for_bb(code, cfg, item), typ, unode, true).id - length(ir.stmts))) @@ -760,7 +760,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg if isexpr(stmt, :(=)) && isa(stmt.args[1], SlotNumber) id = slot_id(stmt.args[1]) val = stmt.args[2] - typ = typ_for_val(val, ci, sptypes, idx, slottypes) + typ = typ_for_val(val, ci, ir.sptypes, idx, slottypes) # Having undef_token appear on the RHS is possible if we're on a dead branch. # Do something reasonable here, by marking the LHS as undef as well. if val !== undef_token @@ -845,7 +845,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg node = new_nodes.stmts[new_idx] phic_values = (node[:inst]::PhiCNode).values for i = 1:length(phic_values) - orig_typ = typ = typ_for_val(phic_values[i], ci, sptypes, -1, slottypes) + orig_typ = typ = typ_for_val(phic_values[i], ci, ir.sptypes, -1, slottypes) @assert !isa(typ, MaybeUndef) while isa(typ, DelayedTyp) typ = types(ir)[typ.phi::NewSSAValue] @@ -863,7 +863,7 @@ function construct_ssa!(ci::CodeInfo, ir::IRCode, domtree::DomTree, defuse, narg changed = false for new_idx in type_refine_phi node = new_nodes.stmts[new_idx] - new_typ = recompute_type(node[:inst], ci, ir, sptypes, slottypes) + new_typ = recompute_type(node[:inst], ci, ir, ir.sptypes, slottypes) if !(node[:type] ⊑ new_typ) || !(new_typ ⊑ node[:type]) node[:type] = new_typ changed = true From 5bf86b5bf7a9a823dd9b64ab02ea9b7bfb87f3d9 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 1 Feb 2021 18:20:18 -0500 Subject: [PATCH 211/239] Fix inference of `Argument` (#39478) I was pretty sure I had made this commit already, but I guess it never made it onto master. Regardless, in d6d5208, we switched Argument to be a legal value in CodeInfo and gave it semantics equivalent to `Slot`. This is useful to avoid back-and-forth conversion. However, we missed one place in inference which assumed that literal arguments would just end up as Consts, which is of course wrong - causing crashes. Now usually we don't end up with literal `Argument`s in CodeInfos, since the frontend doesn't produce them, but they can come in when trying to generate SSA code in an external package and then converting back to `CodeInfo` (which after the above commit no longer turns the `Argument`s into Slots). --- base/compiler/abstractinterpretation.jl | 2 +- test/compiler/inference.jl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 4526e58d328dd..5d2ba91e5d9e5 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -1138,7 +1138,7 @@ function abstract_eval_special_value(interp::AbstractInterpreter, @nospecialize( return Const((e::QuoteNode).value) elseif isa(e, SSAValue) return abstract_eval_ssavalue(e::SSAValue, sv.src) - elseif isa(e, Slot) + elseif isa(e, Slot) || isa(e, Argument) return (vtypes[slot_id(e)]::VarState).typ elseif isa(e, GlobalRef) return abstract_eval_global(e.mod, e.name) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index 05c72f032c5af..eb44d20b46456 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -3021,3 +3021,7 @@ function splat_lotta_unions() (a...,b...,c...) end @test Core.Compiler.return_type(splat_lotta_unions, Tuple{}) >: Tuple{Int,Int,Int} + +# Bare Core.Argument in IR +@eval f_bare_argument(x) = $(Core.Argument(2)) +@test Base.return_types(f_bare_argument, (Int,))[1] == Int From 927c24f900130fb7d27a353cd22b4654c1d6336b Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 1 Feb 2021 20:39:18 -0500 Subject: [PATCH 212/239] fix #39426, at-which not working with `..` function (#39446) --- stdlib/InteractiveUtils/src/macros.jl | 2 +- stdlib/InteractiveUtils/test/runtests.jl | 4 ++++ stdlib/Test/src/Test.jl | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/stdlib/InteractiveUtils/src/macros.jl b/stdlib/InteractiveUtils/src/macros.jl index 3805e2e97832b..011a0034378b2 100644 --- a/stdlib/InteractiveUtils/src/macros.jl +++ b/stdlib/InteractiveUtils/src/macros.jl @@ -42,7 +42,7 @@ function gen_call_with_extracted_types(__module__, fcn, ex0, kws=Expr[]) insert!(args, (isnothing(i) ? 2 : i+1), ex0.args[2]) ex0 = Expr(:call, args...) end - if ex0.head === :. || (ex0.head === :call && string(ex0.args[1])[1] == '.') + if ex0.head === :. || (ex0.head === :call && ex0.args[1] !== :.. && string(ex0.args[1])[1] == '.') codemacro = startswith(string(fcn), "code_") if codemacro && ex0.args[2] isa Expr # Manually wrap a dot call in a function diff --git a/stdlib/InteractiveUtils/test/runtests.jl b/stdlib/InteractiveUtils/test/runtests.jl index 8f977cb0cc0d0..b272f46f14794 100644 --- a/stdlib/InteractiveUtils/test/runtests.jl +++ b/stdlib/InteractiveUtils/test/runtests.jl @@ -253,6 +253,10 @@ const curmod_str = curmod === Main ? "Main" : join(curmod_name, ".") @test (@which Int[1; 2]).name === :typed_vcat @test (@which [1 2;3 4]).name === :hvcat @test (@which Int[1 2;3 4]).name === :typed_hvcat +# issue #39426 +let x..y = 0 + @test (@which 1..2).name === :.. +end # issue #13464 try diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index d657b80ddff05..82e5c23e2be84 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1406,7 +1406,7 @@ function _inferred(ex, mod, allow = :(Union{})) end Meta.isexpr(ex, :call)|| error("@inferred requires a call expression") farg = ex.args[1] - if isa(farg, Symbol) && first(string(farg)) == '.' + if isa(farg, Symbol) && farg !== :.. && first(string(farg)) == '.' farg = Symbol(string(farg)[2:end]) ex = Expr(:call, GlobalRef(Test, :_materialize_broadcasted), farg, ex.args[2:end]...) From 2497ad1022dcbd16b00f22c4b7fe192480b147da Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 1 Feb 2021 16:57:33 -0500 Subject: [PATCH 213/239] REPL,test: add stdout monitor task Might help aarch64bot test deadlock on CI Refs #38996 --- stdlib/REPL/test/repl.jl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index b1e0feccd4b50..6f772c560c4f7 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -104,9 +104,20 @@ fake_repl(options = REPL.Options(confirm_exit=false,hascolor=true)) do stdin_wri let cmd = "\"Hello REPL\"" write(stdin_write, "$(curmod_prefix)inc || wait($(curmod_prefix)b); r = $cmd; notify($(curmod_prefix)c); r\r") end - inc = true - notify(b) - wait(c) + let t = @async begin + inc = true + notify(b) + wait(c) + end + while (d = readline(stdout_read)) != "" + # first line [optional]: until 80th char of input + # second line: until end of input + # third line: "Hello REPL" + # last line: blank + # last+1 line: next prompt + end + wait(t) + end # Latex completions write(stdin_write, "\x32\\alpha\t") From 9eccd33384b358d87be281ad7202b569467b5c9a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 1 Feb 2021 21:26:32 -0500 Subject: [PATCH 214/239] REPL,test: read output before adding more input Might help aarch64bot test deadlock on CI Refs #38996 --- stdlib/REPL/test/repl.jl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 6f772c560c4f7..340fcb0ef8359 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -120,6 +120,7 @@ fake_repl(options = REPL.Options(confirm_exit=false,hascolor=true)) do stdin_wri end # Latex completions + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, "\x32\\alpha\t") readuntil(stdout_read, "α") # Bracketed paste in search mode @@ -1038,13 +1039,16 @@ fake_repl() do stdin_write, stdout_read, repl write(stdin_write, "TestShowTypeREPL.TypeA\n") @test endswith(readline(stdout_read), "\r\e[7CTestShowTypeREPL.TypeA\r\e[29C") readline(stdout_read) - readline(stdout_read) + @test readline(stdout_read) == "" @eval Main using .TestShowTypeREPL + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, "TypeA\n") @test endswith(readline(stdout_read), "\r\e[7CTypeA\r\e[12C") readline(stdout_read) + @test readline(stdout_read) == "" # Close REPL ^D + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, '\x04') Base.wait(repltask) end @@ -1163,10 +1167,13 @@ fake_repl() do stdin_write, stdout_read, repl write(stdin_write, "Expr(:call, GlobalRef(Base.Math, :float), Core.SlotNumber(1))\n") readline(stdout_read) @test readline(stdout_read) == "\e[0m:(Base.Math.float(_1))" + @test readline(stdout_read) == "" + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, "ans\n") readline(stdout_read) - readline(stdout_read) @test readline(stdout_read) == "\e[0m:(Base.Math.float(_1))" + @test readline(stdout_read) == "" + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, '\x04') Base.wait(repltask) end @@ -1179,10 +1186,15 @@ fake_repl() do stdin_write, stdout_read, repl write(stdin_write, "struct Errs end\n") readline(stdout_read) readline(stdout_read) + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, "Base.show(io::IO, ::Errs) = throw(Errs())\n") readline(stdout_read) readline(stdout_read) + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, "Errs()\n") + readline(stdout_read) + readline(stdout_read) + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, '\x04') wait(repltask) @test istaskdone(repltask) @@ -1195,7 +1207,8 @@ fake_repl() do stdin_write, stdout_read, repl end write(stdin_write, "?;\n") readline(stdout_read) - @test endswith(readline(stdout_read),";") + @test endswith(readline(stdout_read), "search: ;") + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, '\x04') Base.wait(repltask) end @@ -1208,6 +1221,7 @@ fake_repl() do stdin_write, stdout_read, repl write(stdin_write, "global x\n") readline(stdout_read) @test !occursin("ERROR", readline(stdout_read)) + readuntil(stdout_read, "julia> ", keep=true) write(stdin_write, '\x04') Base.wait(repltask) end From d3012d7b6c2b28291a3c280ffcc032cea4050982 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Wed, 3 Feb 2021 04:01:49 -0500 Subject: [PATCH 215/239] A few missing trig tests (#39494) --- test/math.jl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/math.jl b/test/math.jl index bfe584ed5d340..6424cb1b6e57d 100644 --- a/test/math.jl +++ b/test/math.jl @@ -532,6 +532,25 @@ end end end +@testset "half-integer and nan/infs for sincospi" begin + @testset for T in (ComplexF32, ComplexF64) + @test sincospi(T(0.5, 0.0)) == (T(1.0,0.0), T(0.0, -0.0)) + @test sincospi(T(1.5, 0.0)) == (T(-1.0,0.0), T(0.0, 0.0)) + s, c = sincospi(T(Inf64, 0.0)) + @test isnan(real(s)) && imag(s) == zero(real(T)) + @test isnan(real(c)) && imag(c) == -zero(real(T)) + s, c = sincospi(T(NaN, 0.0)) + @test isnan(real(s)) && imag(s) == zero(real(T)) + @test isnan(real(c)) && imag(c) == zero(real(T)) + s, c = sincospi(T(NaN, Inf64)) + @test isnan(real(s)) && isinf(imag(s)) + @test isinf(real(c)) && isnan(imag(c)) + s, c = sincospi(T(NaN, 2)) + @test isnan(real(s)) && isnan(imag(s)) + @test isnan(real(c)) && isnan(imag(c)) + end +end + @testset "trig function type stability" begin @testset "$T $f" for T = (Float32,Float64,BigFloat,Rational{Int16},Complex{Int32},ComplexF16), f = (sind,cosd,sinpi,cospi) @test Base.return_types(f,Tuple{T}) == [float(T)] @@ -720,6 +739,8 @@ end @test sincos(big(1.0)) == (sin(big(1.0)), cos(big(1.0))) @test sincos(NaN) === (NaN, NaN) @test sincos(NaN32) === (NaN32, NaN32) + @test_throws DomainError sincos(Inf32) + @test_throws DomainError sincos(Inf64) end @testset "test fallback definitions" begin From 8964b93bcf5ebffff0894f36d78187df4896ff59 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Wed, 3 Feb 2021 11:47:41 +0100 Subject: [PATCH 216/239] Bump openlibm to v0.7.4. --- deps/checksums/openlibm | 68 ++++++++++++++++---------------- deps/openlibm.version | 4 +- stdlib/OpenLibm_jll/Project.toml | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/deps/checksums/openlibm b/deps/checksums/openlibm index 9c44209536cf7..2a07b7c01679e 100644 --- a/deps/checksums/openlibm +++ b/deps/checksums/openlibm @@ -1,34 +1,34 @@ -OpenLibm.v0.7.3+0.aarch64-apple-darwin.tar.gz/md5/952aa82f7f68d2194f7d11d4350ffd72 -OpenLibm.v0.7.3+0.aarch64-apple-darwin.tar.gz/sha512/21df2e0ef62ed0a8643da0a2e0433397c176b813cd65dad5edfc87949670cb5824c5885adc8d46356d85856ce6ce341c46e7b0ebb03cc196701d42412bbcd3e1 -OpenLibm.v0.7.3+0.aarch64-linux-gnu.tar.gz/md5/cacae0b3983eb8e826d81ce3075b70de -OpenLibm.v0.7.3+0.aarch64-linux-gnu.tar.gz/sha512/14cb022e4830089f74c842fb24eb3109aec1fca69063dc6eaa1189f36e2f9f66549832372920d1b31f68e2a2ab2cc2da6b266f06bb3fe2bf726ae05f87e4bd82 -OpenLibm.v0.7.3+0.aarch64-linux-musl.tar.gz/md5/8573d2cb3449e027b4ccc26a8a4ec921 -OpenLibm.v0.7.3+0.aarch64-linux-musl.tar.gz/sha512/cc5ce6613ba3d91fc83ee063855e1866db6d294f9d3142097ad294848dc92965d5bc32194aea74850dd497ff10d3b61a1736cea0c26e99759940b72ea976b845 -OpenLibm.v0.7.3+0.armv6l-linux-gnueabihf.tar.gz/md5/4299ab7e86ac68fd808c738a75eeec09 -OpenLibm.v0.7.3+0.armv6l-linux-gnueabihf.tar.gz/sha512/498a136258b7a09af92d1c97b0cbd90e1a660b170506e430edf836b334cfecaedc5b1925eac449ab662ced36757a191caef116a3ca06616155554190b4186598 -OpenLibm.v0.7.3+0.armv6l-linux-musleabihf.tar.gz/md5/5b4ec47298490ca651ff68c1c8b18228 -OpenLibm.v0.7.3+0.armv6l-linux-musleabihf.tar.gz/sha512/1454bd5fb8b16f524681e452584abd4688a769e35403b86a106c52b7bd8f20dc3ee63e732b188a4e65f002b1dd547d26b5897864b4f384830e0d9f5203ba6c35 -OpenLibm.v0.7.3+0.armv7l-linux-gnueabihf.tar.gz/md5/4f9860af01bf463d95a8d5fefce9e0b2 -OpenLibm.v0.7.3+0.armv7l-linux-gnueabihf.tar.gz/sha512/4fc4d9ba0831ab149762afd09fe92315370bb80961261dc7680a54dce53e8c6114de90ae0e893512dd67cccf345ef3713d6ec9c2426f726ef0b1d95dbbb8e852 -OpenLibm.v0.7.3+0.armv7l-linux-musleabihf.tar.gz/md5/72c137dc71bdd8a39229c7df73090aed -OpenLibm.v0.7.3+0.armv7l-linux-musleabihf.tar.gz/sha512/ac43b49865e9cc6fbc298e41e505a8c67c56ec89574540b30d48a8f84aa52d11318ea6d39e6437ee121e2d13efbdcd2ca683141f4e5fab169626e2872f80afe4 -OpenLibm.v0.7.3+0.i686-linux-gnu.tar.gz/md5/c4009c37047824c1ffee601d68dbe6a1 -OpenLibm.v0.7.3+0.i686-linux-gnu.tar.gz/sha512/4b98c3ad95ee9b571e99f9c014623af3441dcc092ad348ecdc9a5a6fa6b8951da159b33991680cf58126209615bbf47f02691c3c99927e2e236c09801368b6cf -OpenLibm.v0.7.3+0.i686-linux-musl.tar.gz/md5/57100992a834cc72011db730d2565c84 -OpenLibm.v0.7.3+0.i686-linux-musl.tar.gz/sha512/28dd41f2b90239b432981734409a6834b06bd189e54fed4eeebf40c9264a392e4449110936192b2116b98aa3122b3896bdec7b8ad22bc4eaa5e12e4b2b231f1d -OpenLibm.v0.7.3+0.i686-w64-mingw32.tar.gz/md5/655ba5c08eedf6f24fbbf992adbe9bb0 -OpenLibm.v0.7.3+0.i686-w64-mingw32.tar.gz/sha512/660b73e5426c44522a90a56b972ee2506810c808874407567e0f92dbc9bd5d04f4ca907738053e2cec92ee69ad63cf2471baf258e20b1369fe96b363f21b28ab -OpenLibm.v0.7.3+0.powerpc64le-linux-gnu.tar.gz/md5/14c034d365382369ee40a47a8d9e75ec -OpenLibm.v0.7.3+0.powerpc64le-linux-gnu.tar.gz/sha512/4d08990885e085475587309423d38bfc7f78d0e38f16a7d373159cded644a3761a2496d3b25300c04ee394a8e108a8df791366ad6dcf6154df1ba44b7f9f5ecf -OpenLibm.v0.7.3+0.x86_64-apple-darwin.tar.gz/md5/6f0f23f859ebbb9e5c1c84fb6cddf4cf -OpenLibm.v0.7.3+0.x86_64-apple-darwin.tar.gz/sha512/07225ea47276a0ce539f39c1a9a5b924b27521e445db5ba7cbe1338c32fbc8854a40776b85ae9c0a47c6e5f245c42ed81d52cd2680c488a0dd006864f9ca8b92 -OpenLibm.v0.7.3+0.x86_64-linux-gnu.tar.gz/md5/472f1cf73a4d27a3d770a77fe781f24e -OpenLibm.v0.7.3+0.x86_64-linux-gnu.tar.gz/sha512/3b030ba7fc7ef5f5fa04a3928d954ff093a72f3875ef080e1960bbf704638bc94d666db07e43c1e9ba073d865c6831a02b9e855426a04a37b1d8aa827a56cce5 -OpenLibm.v0.7.3+0.x86_64-linux-musl.tar.gz/md5/696312e71b4bf387857b95069e8dcba7 -OpenLibm.v0.7.3+0.x86_64-linux-musl.tar.gz/sha512/2175cfdc901adb0b7802dbe83a2ef0fea29c412a746594a9a535822f3379343d6379042525b5af5b67c304dc031f938f17a2aa5ed6ed319241e17b852898b5fe -OpenLibm.v0.7.3+0.x86_64-unknown-freebsd.tar.gz/md5/19873569033a4c7e8c168247ac831f61 -OpenLibm.v0.7.3+0.x86_64-unknown-freebsd.tar.gz/sha512/d72ac9326cc8b27ae3ba0a3209fc202cf2eb879fff88b0c44c0fe89e261d0d6d1aa1acf36956d82938935c5e235ff6b0703f179338646a03ee969997f862744b -OpenLibm.v0.7.3+0.x86_64-w64-mingw32.tar.gz/md5/e8b030a663a2bef5b8d0607c2d3dc13c -OpenLibm.v0.7.3+0.x86_64-w64-mingw32.tar.gz/sha512/bab38a06d105a37c7b4ed4232942c3c9c0a4b21c4c6c7144e083f1a6a32cc7cabc6f418f7aa0633f6b8b9cd36739740e58a2274183c75f198fa72421bd032762 -openlibm-c8561015a4376352ece5c02677b19c1af0832300.tar.gz/md5/b54f86f9c6715460e16f289658e05395 -openlibm-c8561015a4376352ece5c02677b19c1af0832300.tar.gz/sha512/de35efdef221591c1d1245f63743a016ba455607482bfa4bc7febcee75dd33d7b3ccdf1ced193c822e027c75019a62e4bfaa656753bd418f20b0d71bec1d4db9 +OpenLibm.v0.7.4+0.aarch64-apple-darwin.tar.gz/md5/fe64fe3e2f82c9db0144b008417b9a84 +OpenLibm.v0.7.4+0.aarch64-apple-darwin.tar.gz/sha512/693f2f98c69ef188e6abef2739c10c13441e58cc6de8561f07e38eba2c08d2220e167b546e537335bbf2a378c33ef150e202fc2fa3d8d832bfa9791b9fa500e6 +OpenLibm.v0.7.4+0.aarch64-linux-gnu.tar.gz/md5/a22114a1ebd68743329408f9d9d4357e +OpenLibm.v0.7.4+0.aarch64-linux-gnu.tar.gz/sha512/0217ca0e67bee12155d4999a6793e519ef785e7e7e4b467254fe3729366b0994793329517b9de5548549676a20b3b25d7a0846ec3979b41ea69dbebd5218466d +OpenLibm.v0.7.4+0.aarch64-linux-musl.tar.gz/md5/fc784223d17a0206e36edf99ada29675 +OpenLibm.v0.7.4+0.aarch64-linux-musl.tar.gz/sha512/c950f84fcb2646118e41062c64c3830caee011da5bf1fa8fc2b93ccfe417662472575354c42c7ac3288625888a204099c14d37b49bddb9a71f4d05585595ed45 +OpenLibm.v0.7.4+0.armv6l-linux-gnueabihf.tar.gz/md5/f4fd32b7b093bbb96d3a890809e78b70 +OpenLibm.v0.7.4+0.armv6l-linux-gnueabihf.tar.gz/sha512/a7dd69d1fb81ab90c833efd60db00717d492431a2d383d33b84ca975d67c002f07d78af1d049454fc692bbbaa7cb89d7ba10588534ceb42fbdb9469f5754e62f +OpenLibm.v0.7.4+0.armv6l-linux-musleabihf.tar.gz/md5/05e97bc68ac51519996fa5028f4fcc7c +OpenLibm.v0.7.4+0.armv6l-linux-musleabihf.tar.gz/sha512/1a0f98a1f8ef225fcea49bd0513047a5580499748d97650261873244b42feabca2e5c35e9467255832b5769c98a048013e5d6fb48441a5063acdeade799998ad +OpenLibm.v0.7.4+0.armv7l-linux-gnueabihf.tar.gz/md5/ef43927de56d031e48678e97e7dfa8e0 +OpenLibm.v0.7.4+0.armv7l-linux-gnueabihf.tar.gz/sha512/1232fb753cd504bbbc04dca6ba91c1c1b136a51182f5cd40878bf00089d8bbcdf4d1820960aa9872da61ea17c98c006a90ad7cfeea0554c93703b885140f2927 +OpenLibm.v0.7.4+0.armv7l-linux-musleabihf.tar.gz/md5/becba2d7ee97d24c7bee5086573c9813 +OpenLibm.v0.7.4+0.armv7l-linux-musleabihf.tar.gz/sha512/288e7e41ad827edbbe780d7a05a254190939fecaac768050f67d8f64213429a114cf9fdfa2f3b7972609cd0085d53053f8e8b78c1432ee36ebea7d1679c4fcf9 +OpenLibm.v0.7.4+0.i686-linux-gnu.tar.gz/md5/d97b5cfe2c664cb8a045cc136dc41f85 +OpenLibm.v0.7.4+0.i686-linux-gnu.tar.gz/sha512/06d8d885bff12ba3e9b1a2f4875abe256c9e73d5a625f1202809b1905e487e28395ef932d2cff69844f1f6d41f91c4160fe621ef5ec31da158ee3ddabd917b57 +OpenLibm.v0.7.4+0.i686-linux-musl.tar.gz/md5/80915321cd10bd21778df3b54a38c4e4 +OpenLibm.v0.7.4+0.i686-linux-musl.tar.gz/sha512/28ef561c849a8d98d128875a85c21f6b030905bf903da979fcaa83924b683ac532eedc1710a411fa62649c53ad38959360d40506dda6061fb963be1062a8deb2 +OpenLibm.v0.7.4+0.i686-w64-mingw32.tar.gz/md5/24bff0323984d38817b3b916200004fb +OpenLibm.v0.7.4+0.i686-w64-mingw32.tar.gz/sha512/a9f4c865a9a2c679c42230627ffd5987abc6cb9d08ac18fc54edd36abe99e7b8bdf09377299de503a9075d5255aaadb1517f05066fc2dd38e34db55f3ee1cb8f +OpenLibm.v0.7.4+0.powerpc64le-linux-gnu.tar.gz/md5/aaa240cdb07d45d4cc320c669e29b633 +OpenLibm.v0.7.4+0.powerpc64le-linux-gnu.tar.gz/sha512/1e618436aed2d14d5cbe2e1ea1a0dae04a18e7817a20eb90a14c01bf230f35ed6f97c0a2328d916d886c0fcfbc34568e267c8143caa08a7ad5edaf78ff0081ae +OpenLibm.v0.7.4+0.x86_64-apple-darwin.tar.gz/md5/03ef39fbffa2dfcef6cd757cbdf57d8b +OpenLibm.v0.7.4+0.x86_64-apple-darwin.tar.gz/sha512/12ec68cd0d789a4ce70cc44e6d8a9ed5af826bfb51a302758c7c4db93e80542194532027d44304c9f56c11b8918e4c9307f800f192100e685e1270dd12649370 +OpenLibm.v0.7.4+0.x86_64-linux-gnu.tar.gz/md5/a86f06c3ec0bef46f1a228f9b038bf37 +OpenLibm.v0.7.4+0.x86_64-linux-gnu.tar.gz/sha512/048cec2a4df9a0dc0fe488609b011e81997bc5fd8a535f78c1280b843ae568c1f2483a4b1a74991d8cb7a30cc99c18b7b5cd1a93031588e7e45648161198581e +OpenLibm.v0.7.4+0.x86_64-linux-musl.tar.gz/md5/b5c723b30534548d3856bd22665296bd +OpenLibm.v0.7.4+0.x86_64-linux-musl.tar.gz/sha512/ef262e1bbf1382bfb1b72f26a3e3b5870fd1d5bfe5719bca81d018ab2e635fb1e8872d2ba4f1f37535c1a00bbc6328ec0dea6a6ff7955b68a44d1cf8950ab786 +OpenLibm.v0.7.4+0.x86_64-unknown-freebsd.tar.gz/md5/b16527789074783bb09f54514a1bf741 +OpenLibm.v0.7.4+0.x86_64-unknown-freebsd.tar.gz/sha512/1625ac0af48f348bb34291e5d59975939df4d1b9ba9082d98a2bf88e847e140844226c26c67111382d83fc314faa2aa0d5bf6bcae535eac9fa426558ee3f5225 +OpenLibm.v0.7.4+0.x86_64-w64-mingw32.tar.gz/md5/b5edecd67e9836e6374a1615a90f9f71 +OpenLibm.v0.7.4+0.x86_64-w64-mingw32.tar.gz/sha512/2ccbece5e80a6167362bafea51fdeb94fdef609fdba49577faff8393700b16fcb2eb382797bb2e3cb70d750442ffa30e6ade76297937420f9be2da5d1d04f8cb +openlibm-5d70ac564c13847d02f8ab4aaada64a1f0856791.tar.gz/md5/d2181cb7af430a7b2c7f8419fbfe6b4f +openlibm-5d70ac564c13847d02f8ab4aaada64a1f0856791.tar.gz/sha512/727b4b9f3bd01d60d43a76dd5270c1bac0fe99acb713cb79bfd67952a0a315a0cabfed29640d38c96a0ed85c59978418912dd1d44989134a957aa6b6e1c90579 diff --git a/deps/openlibm.version b/deps/openlibm.version index e3af3f7e9298e..f8b38405ef6b5 100644 --- a/deps/openlibm.version +++ b/deps/openlibm.version @@ -1,2 +1,2 @@ -OPENLIBM_BRANCH=v0.7.3 -OPENLIBM_SHA1=c8561015a4376352ece5c02677b19c1af0832300 +OPENLIBM_BRANCH=v0.7.4 +OPENLIBM_SHA1=5d70ac564c13847d02f8ab4aaada64a1f0856791 diff --git a/stdlib/OpenLibm_jll/Project.toml b/stdlib/OpenLibm_jll/Project.toml index 6d85159f83f3e..827f31cd79a39 100644 --- a/stdlib/OpenLibm_jll/Project.toml +++ b/stdlib/OpenLibm_jll/Project.toml @@ -1,6 +1,6 @@ name = "OpenLibm_jll" uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.7.3+0" +version = "0.7.4+0" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" From 658ee46cb7130a86693a55777b37dac14a940ad1 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 3 Feb 2021 10:36:19 -0800 Subject: [PATCH 217/239] Fill out `LIBPATH_list` and `PATH_list` in fake JLLs (#39507) Yet another minor tweak to the JLLWrappers-conformance of these packages to make them look a little bit more like "normal" JLLs. --- .../src/CompilerSupportLibraries_jll.jl | 1 + stdlib/GMP_jll/src/GMP_jll.jl | 1 + stdlib/LibCURL_jll/src/LibCURL_jll.jl | 1 + stdlib/LibGit2_jll/src/LibGit2_jll.jl | 1 + stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl | 1 + stdlib/LibSSH2_jll/src/LibSSH2_jll.jl | 1 + stdlib/LibUV_jll/src/LibUV_jll.jl | 1 + stdlib/LibUnwind_jll/src/LibUnwind_jll.jl | 1 + stdlib/MPFR_jll/src/MPFR_jll.jl | 1 + stdlib/MbedTLS_jll/src/MbedTLS_jll.jl | 1 + stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl | 4 ++++ stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl | 1 + stdlib/OpenLibm_jll/src/OpenLibm_jll.jl | 1 + stdlib/PCRE2_jll/src/PCRE2_jll.jl | 1 + stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl | 1 + stdlib/Zlib_jll/src/Zlib_jll.jl | 1 + stdlib/dSFMT_jll/src/dSFMT_jll.jl | 1 + stdlib/libLLVM_jll/src/libLLVM_jll.jl | 2 ++ stdlib/nghttp2_jll/src/nghttp2_jll.jl | 1 + stdlib/p7zip_jll/src/p7zip_jll.jl | 3 +++ 20 files changed, 26 insertions(+) diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index 72f80a053ba61..21a26d460f35c 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -50,6 +50,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libgcc_s_handle = dlopen(libgcc_s) global libgcc_s_path = dlpath(libgcc_s_handle) global libgfortran_handle = dlopen(libgfortran) diff --git a/stdlib/GMP_jll/src/GMP_jll.jl b/stdlib/GMP_jll/src/GMP_jll.jl index d266636884a2c..1674a1f16b528 100644 --- a/stdlib/GMP_jll/src/GMP_jll.jl +++ b/stdlib/GMP_jll/src/GMP_jll.jl @@ -33,6 +33,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libgmp_handle = dlopen(libgmp) global libgmp_path = dlpath(libgmp_handle) global libgmpxx_handle = dlopen(libgmpxx) diff --git a/stdlib/LibCURL_jll/src/LibCURL_jll.jl b/stdlib/LibCURL_jll/src/LibCURL_jll.jl index 935e571ed5bac..51921fd4421fc 100644 --- a/stdlib/LibCURL_jll/src/LibCURL_jll.jl +++ b/stdlib/LibCURL_jll/src/LibCURL_jll.jl @@ -29,6 +29,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libcurl_handle = dlopen(libcurl) global libcurl_path = dlpath(libcurl_handle) end diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl index eb7f460634979..4074c8880a3e9 100644 --- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl +++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl @@ -29,6 +29,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libgit2_handle = dlopen(libgit2) global libgit2_path = dlpath(libgit2_handle) end diff --git a/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl index 5840caa2fb377..2bf028957fa3f 100644 --- a/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl +++ b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl @@ -23,6 +23,7 @@ const libosxunwind = "@rpath/libosxunwind.dylib" function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) # We only dlopen something on MacOS @static if Sys.isapple() global libosxunwind_handle = dlopen(libosxunwind) diff --git a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl index f5a122b197208..8007857ea0b0d 100644 --- a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl +++ b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl @@ -29,6 +29,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libssh2_handle = dlopen(libssh2) global libssh2_path = dlpath(libssh2_handle) end diff --git a/stdlib/LibUV_jll/src/LibUV_jll.jl b/stdlib/LibUV_jll/src/LibUV_jll.jl index e5a82ef1f6ea1..d321af59b3f79 100644 --- a/stdlib/LibUV_jll/src/LibUV_jll.jl +++ b/stdlib/LibUV_jll/src/LibUV_jll.jl @@ -29,6 +29,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libuv_handle = dlopen(libuv) global libuv_path = dlpath(libuv_handle) end diff --git a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl index 3f863d9beac4d..44694c7f4a531 100644 --- a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl +++ b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl @@ -23,6 +23,7 @@ const libunwind = "libunwind.so.8" function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) # We only do something on Linux/FreeBSD @static if Sys.islinux() || Sys.isfreebsd() global libunwind_handle = dlopen(libunwind) diff --git a/stdlib/MPFR_jll/src/MPFR_jll.jl b/stdlib/MPFR_jll/src/MPFR_jll.jl index 157882ea78243..a63aa190c96a0 100644 --- a/stdlib/MPFR_jll/src/MPFR_jll.jl +++ b/stdlib/MPFR_jll/src/MPFR_jll.jl @@ -28,6 +28,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libmpfr_handle = dlopen(libmpfr) global libmpfr_path = dlpath(libmpfr_handle) end diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl index c79695320bc02..3c83ac84a9a96 100644 --- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl +++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl @@ -39,6 +39,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libmbedcrypto_handle = dlopen(libmbedcrypto) global libmbedcrypto_path = dlpath(libmbedcrypto_handle) global libmbedtls_handle = dlopen(libmbedtls) diff --git a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl index 566efd818f20a..14445396a73f7 100644 --- a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl +++ b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl @@ -6,6 +6,9 @@ baremodule MozillaCACerts_jll using Base Base.Experimental.@compiler_options compile=min optimize=0 infer=false +const PATH_list = String[] +const LIBPATH_list = String[] + # These get calculated in __init__() PATH = Ref("") LIBPATH = Ref("") @@ -15,6 +18,7 @@ cacert = "" function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem") end diff --git a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl index 4eb44bd516eac..60475faf4eccf 100644 --- a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl +++ b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl @@ -34,6 +34,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libopenblas_handle = dlopen(libopenblas) global libopenblas_path = dlpath(libopenblas_handle) end diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl index 0b478072b01cd..e61c134463e6d 100644 --- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl +++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl @@ -28,6 +28,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libopenlibm_handle = dlopen(libopenlibm) global libopenlibm_path = dlpath(libopenlibm_handle) end diff --git a/stdlib/PCRE2_jll/src/PCRE2_jll.jl b/stdlib/PCRE2_jll/src/PCRE2_jll.jl index 5a365c00bcb9b..06c6e92fc37b2 100644 --- a/stdlib/PCRE2_jll/src/PCRE2_jll.jl +++ b/stdlib/PCRE2_jll/src/PCRE2_jll.jl @@ -28,6 +28,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libpcre2_8_handle = dlopen(libpcre2_8) global libpcre2_8_path = dlpath(libpcre2_8_handle) end diff --git a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl index 0d856b07a4a6f..f27f39c6a8e53 100644 --- a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl +++ b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl @@ -89,6 +89,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libamd_handle = dlopen(libamd) global libamd_path = dlpath(libamd_handle) global libbtf_handle = dlopen(libbtf) diff --git a/stdlib/Zlib_jll/src/Zlib_jll.jl b/stdlib/Zlib_jll/src/Zlib_jll.jl index da0c7d89d49f2..50e5a33b7ce69 100644 --- a/stdlib/Zlib_jll/src/Zlib_jll.jl +++ b/stdlib/Zlib_jll/src/Zlib_jll.jl @@ -28,6 +28,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libz_handle = dlopen(libz) global libz_path = dlpath(libz_handle) end diff --git a/stdlib/dSFMT_jll/src/dSFMT_jll.jl b/stdlib/dSFMT_jll/src/dSFMT_jll.jl index 1c2e04f3c7114..04cfb17e6fc22 100644 --- a/stdlib/dSFMT_jll/src/dSFMT_jll.jl +++ b/stdlib/dSFMT_jll/src/dSFMT_jll.jl @@ -29,6 +29,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libdSFMT_handle = dlopen(libdSFMT) global libdSFMT_path = dlpath(libdSFMT_handle) end diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl index e456715f85442..abc955e716510 100644 --- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl +++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl @@ -29,7 +29,9 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libLLVM_handle = dlopen(libLLVM) global libLLVM_path = dlpath(libLLVM_handle) end diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index 23f0a2cccb1f2..50a34786133be 100644 --- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl +++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl @@ -28,6 +28,7 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) global libnghttp2_handle = dlopen(libnghttp2) global libnghttp2_path = dlpath(libnghttp2_handle) end diff --git a/stdlib/p7zip_jll/src/p7zip_jll.jl b/stdlib/p7zip_jll/src/p7zip_jll.jl index c3b31cee68435..16c059ac4d50a 100644 --- a/stdlib/p7zip_jll/src/p7zip_jll.jl +++ b/stdlib/p7zip_jll/src/p7zip_jll.jl @@ -83,7 +83,10 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") + push!(LIBPATH_list, LIBPATH[]) init_p7zip_path() + global PATH[] = dirname(p7zip_path) + push!(PATH_list, PATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. From 6b91bbba6f6394c12223e1e98c265f2ad289d221 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 3 Feb 2021 11:59:00 -0800 Subject: [PATCH 218/239] Allow building without gfortran if we're just using everything from BB (#39338) On systems where we don't have `gfortran` installed, there's no reason to require it, because nowadays we get everything from Yggdrasil anyway. Simply soldier on and assume that the user wants the latest support libraries, unless they are trying to build from source. --- Make.inc | 12 +++++++++++- contrib/normalize_triplet.py | 25 ++++++++++++++----------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/Make.inc b/Make.inc index f272bedca956c..f238c3b9f15c2 100644 --- a/Make.inc +++ b/Make.inc @@ -1173,7 +1173,9 @@ USE_BINARYBUILDER ?= 0 endif # Auto-detect triplet once, create different versions that we use as defaults below for each BB install target -BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(shell $(FC) --version | head -1)" "$(or $(shell echo '\#include ' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)") +FC_VERSION := $(shell $(FC) --version 2>/dev/null | head -1) +FC_OR_CC_VERISON := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1)) +BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(FC_OR_CC_VERSION)" "$(or $(shell echo '\#include ' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)") BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))) @@ -1196,6 +1198,14 @@ endef $(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj)))) +# Warn if the user tries to build something that requires `gfortran` but they don't have it installed. +ifeq ($(FC_VERSION),) +ifneq ($(USE_BINARYBUILDER_OPENBLAS)$(USE_BINARYBUILDER_SUITESPARSE),11) +$(error "Attempting to build OpenBLAS or SuiteSparse without a functioning fortran compiler!") +endif +endif + + # OS specific stuff # install_name_tool diff --git a/contrib/normalize_triplet.py b/contrib/normalize_triplet.py index 88849e9e6f91f..43c9d492a4b2e 100755 --- a/contrib/normalize_triplet.py +++ b/contrib/normalize_triplet.py @@ -106,19 +106,22 @@ def p(x): # If the user passes in a GCC version (like 8.2.0) use that to force a # "-libgfortran5" tag at the end of the triplet, but only if it has otherwise -# not been specified +# not been specified. if libgfortran_version == "blank_libgfortran": if len(sys.argv) >= 3: - libgfortran_version = { - "4": "libgfortran3", - "5": "libgfortran3", - "6": "libgfortran3", - "7": "libgfortran4", - "8": "libgfortran5", - "9": "libgfortran5", - "10": "libgfortran5", - "11": "libgfortran5", - }[list(filter(lambda x: re.match("\d+\.\d+(\.\d+)?", x), sys.argv[2].split()))[-1].split('.')[0]] + # If there was no gfortran/gcc version passed in, default to the latest libgfortran version + if not sys.argv[2]: + libgfortran_version = "libgfortran5" + else: + # Take the last thing that looks like a version number, and extract its major component + version_numbers = list(filter(lambda x: re.match("\d+\.\d+(\.\d+)?", x), sys.argv[2].split())) + major_ver = int(version_numbers[-1].split('.')[0]) + if major_ver <= 6: + libgfortran_version = "libgfortran3" + elif major_ver <= 7: + libgfortran_version = "libgfortran4" + else: + libgfortran_version = "libgfortran5" if cxx_abi == "blank_cxx_abi": if len(sys.argv) == 4: From 7b19e09729462e5df2dfa8f6b81f052a174c0598 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Wed, 3 Feb 2021 18:43:14 -0500 Subject: [PATCH 219/239] Clean direct ccalls to jl_specializations_get_linfo (#39490) Many of these were using an incorrect (outdated) signature for this ccall. We now wrap this method in Core.Compiler.specialize_method, so clean up all the places that were using it directly. --- base/compiler/methodtable.jl | 4 ++-- base/reflection.jl | 29 +++++++++++++++++++------ src/gf.c | 2 +- stdlib/InteractiveUtils/src/codeview.jl | 8 ++----- test/compiler/contextual.jl | 7 ++---- test/compiler/inference.jl | 11 +++------- test/precompile.jl | 9 +++----- test/show.jl | 3 +-- 8 files changed, 36 insertions(+), 37 deletions(-) diff --git a/base/compiler/methodtable.jl b/base/compiler/methodtable.jl index 050dc0fb9b8c1..1a0b4076f3ed9 100644 --- a/base/compiler/methodtable.jl +++ b/base/compiler/methodtable.jl @@ -86,9 +86,9 @@ function findsup(@nospecialize(sig::Type{<:Tuple}), table::InternalMethodTable) min_valid = RefValue{UInt}(typemin(UInt)) max_valid = RefValue{UInt}(typemax(UInt)) result = ccall(:jl_gf_invoke_lookup_worlds, Any, (Any, UInt, Ptr{Csize_t}, Ptr{Csize_t}), - sig, table.world, min_valid, max_valid)::Union{Method, Nothing} + sig, table.world, min_valid, max_valid)::Union{MethodMatch, Nothing} result === nothing && return nothing - (result, WorldRange(min_valid[], max_valid[])) + (result.method, WorldRange(min_valid[], max_valid[])) end # This query is not cached diff --git a/base/reflection.jl b/base/reflection.jl index 5e905a2fd103f..d4ca118bb5aa2 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -887,6 +887,14 @@ function _methods_by_ftype(@nospecialize(t), lim::Int, world::UInt, ambig::Bool, return ccall(:jl_matching_methods, Any, (Any, Cint, Cint, UInt, Ptr{UInt}, Ptr{UInt}, Ptr{Int32}), t, lim, ambig, world, min, max, has_ambig)::Union{Array{Any,1}, Bool} end +function _method_by_ftype(args...) + matches = _methods_by_ftype(args...) + if length(matches) != 1 + error("no unique matching method found for the specified argument types") + end + return matches[1] +end + # high-level, more convenient method lookup functions # type for reflecting and pretty-printing a subset of methods @@ -1019,8 +1027,7 @@ function method_instances(@nospecialize(f), @nospecialize(t), world::UInt = type tt = signature_type(f, t) results = Core.MethodInstance[] for match in _methods_by_ftype(tt, -1, world)::Vector - instance = ccall(:jl_specializations_get_linfo, Ref{MethodInstance}, - (Any, Any, Any), match.method, match.spec_types, match.sparams) + instance = Core.Compiler.specialize_method(match) push!(results, instance) end return results @@ -1259,6 +1266,18 @@ end print_statement_costs(args...; kwargs...) = print_statement_costs(stdout, args...; kwargs...) +function _which(@nospecialize(tt::Type), world=typemax(UInt)) + min_valid = RefValue{UInt}(typemin(UInt)) + max_valid = RefValue{UInt}(typemax(UInt)) + match = ccall(:jl_gf_invoke_lookup_worlds, Any, + (Any, UInt, Ptr{Csize_t}, Ptr{Csize_t}), + tt, typemax(UInt), min_valid, max_valid) + if match === nothing + error("no unique matching method found for the specified argument types") + end + return match::Core.MethodMatch +end + """ which(f, types) @@ -1281,11 +1300,7 @@ end Returns the method that would be called by the given type signature (as a tuple type). """ function which(@nospecialize(tt::Type)) - m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, typemax(UInt)) - if m === nothing - error("no unique matching method found for the specified argument types") - end - return m::Method + return _which(tt).method end """ diff --git a/src/gf.c b/src/gf.c index 27a7d85e5a4c4..43694a25bdb6b 100644 --- a/src/gf.c +++ b/src/gf.c @@ -2459,7 +2459,7 @@ JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup_worlds(jl_value_t *types, size_t wo jl_method_match_t *matc = _gf_invoke_lookup(types, world, min_world, max_world); if (matc == NULL) return jl_nothing; - return (jl_value_t*)matc->method; + return (jl_value_t*)matc; } // invoke() diff --git a/stdlib/InteractiveUtils/src/codeview.jl b/stdlib/InteractiveUtils/src/codeview.jl index 3920a1e2ee8de..da72fae8daeb0 100644 --- a/stdlib/InteractiveUtils/src/codeview.jl +++ b/stdlib/InteractiveUtils/src/codeview.jl @@ -148,12 +148,8 @@ function _dump_function(@nospecialize(f), @nospecialize(t), native::Bool, wrappe end # get the MethodInstance for the method match world = typemax(UInt) - meth = which(f, t) - t = to_tuple_type(t) - tt = signature_type(f, t) - (ti, env) = ccall(:jl_type_intersection_with_env, Any, (Any, Any), tt, meth.sig)::Core.SimpleVector - meth = Base.func_for_method_checked(meth, ti, env) - linfo = ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, (Any, Any, Any, UInt), meth, ti, env, world) + match = Base._which(signature_type(f, t), world) + linfo = Core.Compiler.specialize_method(match) # get the code for it if native str = _dump_function_linfo_native(linfo, world, wrapper, syntax, debuginfo) diff --git a/test/compiler/contextual.jl b/test/compiler/contextual.jl index 9386c66cfbf00..bce782d73df87 100644 --- a/test/compiler/contextual.jl +++ b/test/compiler/contextual.jl @@ -71,11 +71,8 @@ module MiniCassette end tt = Tuple{f, args...} - mthds = _methods_by_ftype(tt, -1, typemax(UInt)) - @assert length(mthds) == 1 - match = mthds[1] - mi = ccall(:jl_specializations_get_linfo, Ref{MethodInstance}, - (Any, Any, Any), match.method, match.spec_types, match.sparams) + match = Base._method_by_ftype(tt, -1, typemax(UInt)) + mi = Core.Compiler.specialize_method(match) # Unsupported in this mini-cassette @assert !mi.def.isva code_info = retrieve_code_info(mi) diff --git a/test/compiler/inference.jl b/test/compiler/inference.jl index eb44d20b46456..cd005d7f39d43 100644 --- a/test/compiler/inference.jl +++ b/test/compiler/inference.jl @@ -1165,14 +1165,9 @@ function get_linfo(@nospecialize(f), @nospecialize(t)) throw(ArgumentError("argument is not a generic function")) end # get the MethodInstance for the method match - meth = which(f, t) - t = Base.to_tuple_type(t) - ft = isa(f, Type) ? Type{f} : typeof(f) - tt = Tuple{ft, t.parameters...} - precompile(tt) # does inference (calls jl_type_infer) on this signature - (ti, env) = ccall(:jl_type_intersection_with_env, Ref{Core.SimpleVector}, (Any, Any), tt, meth.sig) - return ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, - (Any, Any, Any), meth, tt, env) + match = Base._which(Base.signature_type(f, t), typemax(UInt)) + precompile(match.spec_types) + return Core.Compiler.specialize_method(match) end function test_const_return(@nospecialize(f), @nospecialize(t), @nospecialize(val)) diff --git a/test/precompile.jl b/test/precompile.jl index d3712b6c2dc3e..90019ad04b447 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -165,9 +165,8 @@ precompile_test_harness(false) do dir let some_method = which(Base.include, (Module, String,)) # global const some_method // FIXME: support for serializing a direct reference to an external Method not implemented - global const some_linfo = - ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, (Any, Any, Any, UInt), - some_method, Tuple{typeof(Base.include), Module, String}, Core.svec(), typemax(UInt)) + global const some_linfo = Core.Compiler.specialize_method(some_method, + Tuple{typeof(Base.include), Module, String}, Core.svec()) end g() = override(1.0) @@ -347,9 +346,7 @@ precompile_test_harness(false) do dir Val{nothing}}, 0:25) some_method = which(Base.include, (Module, String,)) - some_linfo = - ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, (Any, Any, Any, UInt), - some_method, Tuple{typeof(Base.include), Module, String}, Core.svec(), typemax(UInt)) + some_linfo = Core.Compiler.specialize_method(some_method, Tuple{typeof(Base.include), Module, String}, Core.svec()) @test Foo.some_linfo::Core.MethodInstance === some_linfo ft = Base.datatype_fieldtypes diff --git a/test/show.jl b/test/show.jl index 54f0fb3e29505..bf820734c809b 100644 --- a/test/show.jl +++ b/test/show.jl @@ -1321,8 +1321,7 @@ end (::T20332{T})(x) where T = 0 let m = which(T20332{Int}(), (Int,)), - mi = ccall(:jl_specializations_get_linfo, Ref{Core.MethodInstance}, (Any, Any, Any, UInt), - m, Tuple{T20332{T}, Int} where T, Core.svec(), typemax(UInt)) + mi = Core.Compiler.specialize_method(m, Tuple{T20332{T}, Int} where T, Core.svec()) # test that this doesn't throw an error @test occursin("MethodInstance for", repr(mi)) end From 20224a66866aaec17aa8c8c8a344fb83c4df71d0 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 3 Feb 2021 17:33:35 -0800 Subject: [PATCH 220/239] [JLLs] Use `dirname(product_path)` to properly deal with Windows (#39511) These paths weren't getting set quite right on Windows, since it stores its libraries in `bin` --- .../src/CompilerSupportLibraries_jll.jl | 6 +++--- stdlib/GMP_jll/src/GMP_jll.jl | 6 +++--- stdlib/LibCURL_jll/src/LibCURL_jll.jl | 6 +++--- stdlib/LibGit2_jll/src/LibGit2_jll.jl | 6 +++--- stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl | 6 +++--- stdlib/LibSSH2_jll/src/LibSSH2_jll.jl | 6 +++--- stdlib/LibUV_jll/src/LibUV_jll.jl | 6 +++--- stdlib/LibUnwind_jll/src/LibUnwind_jll.jl | 6 +++--- stdlib/MPFR_jll/src/MPFR_jll.jl | 6 +++--- stdlib/MbedTLS_jll/src/MbedTLS_jll.jl | 6 +++--- stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl | 2 -- stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl | 6 +++--- stdlib/OpenLibm_jll/src/OpenLibm_jll.jl | 6 +++--- stdlib/PCRE2_jll/src/PCRE2_jll.jl | 6 +++--- stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl | 6 +++--- stdlib/Zlib_jll/src/Zlib_jll.jl | 6 +++--- stdlib/dSFMT_jll/src/dSFMT_jll.jl | 6 +++--- stdlib/libLLVM_jll/src/libLLVM_jll.jl | 8 +++----- stdlib/nghttp2_jll/src/nghttp2_jll.jl | 6 +++--- stdlib/p7zip_jll/src/p7zip_jll.jl | 2 -- 20 files changed, 54 insertions(+), 60 deletions(-) diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl index 21a26d460f35c..a9177229fcdc1 100644 --- a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -48,9 +48,6 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libgcc_s_handle = dlopen(libgcc_s) global libgcc_s_path = dlpath(libgcc_s_handle) global libgfortran_handle = dlopen(libgfortran) @@ -59,6 +56,9 @@ function __init__() global libstdcxx_path = dlpath(libstdcxx_handle) global libgomp_handle = dlopen(libgomp) global libgomp_path = dlpath(libgomp_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libgcc_s_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/GMP_jll/src/GMP_jll.jl b/stdlib/GMP_jll/src/GMP_jll.jl index 1674a1f16b528..7a731cb025fe8 100644 --- a/stdlib/GMP_jll/src/GMP_jll.jl +++ b/stdlib/GMP_jll/src/GMP_jll.jl @@ -31,13 +31,13 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libgmp_handle = dlopen(libgmp) global libgmp_path = dlpath(libgmp_handle) global libgmpxx_handle = dlopen(libgmpxx) global libgmpxx_path = dlpath(libgmpxx_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libgmp_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/LibCURL_jll/src/LibCURL_jll.jl b/stdlib/LibCURL_jll/src/LibCURL_jll.jl index 51921fd4421fc..925c5cb285b38 100644 --- a/stdlib/LibCURL_jll/src/LibCURL_jll.jl +++ b/stdlib/LibCURL_jll/src/LibCURL_jll.jl @@ -27,11 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libcurl_handle = dlopen(libcurl) global libcurl_path = dlpath(libcurl_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libcurl_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl index 4074c8880a3e9..8d1629ed51668 100644 --- a/stdlib/LibGit2_jll/src/LibGit2_jll.jl +++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl @@ -27,11 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libgit2_handle = dlopen(libgit2) global libgit2_path = dlpath(libgit2_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libgit2_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl index 2bf028957fa3f..b063a76f21776 100644 --- a/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl +++ b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl @@ -21,13 +21,13 @@ libosxunwind_path = "" const libosxunwind = "@rpath/libosxunwind.dylib" function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) # We only dlopen something on MacOS @static if Sys.isapple() global libosxunwind_handle = dlopen(libosxunwind) global libosxunwind_path = dlpath(libosxunwind_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libosxunwind_path) + push!(LIBPATH_list, LIBPATH[]) end end diff --git a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl index 8007857ea0b0d..69a2fe6e5d472 100644 --- a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl +++ b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl @@ -27,11 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libssh2_handle = dlopen(libssh2) global libssh2_path = dlpath(libssh2_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libssh2_path) + push!(LIBPATH_list, LIBPATH[]) end diff --git a/stdlib/LibUV_jll/src/LibUV_jll.jl b/stdlib/LibUV_jll/src/LibUV_jll.jl index d321af59b3f79..45f240a78873f 100644 --- a/stdlib/LibUV_jll/src/LibUV_jll.jl +++ b/stdlib/LibUV_jll/src/LibUV_jll.jl @@ -27,11 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libuv_handle = dlopen(libuv) global libuv_path = dlpath(libuv_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libuv_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl index 44694c7f4a531..844a11422f21b 100644 --- a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl +++ b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl @@ -21,13 +21,13 @@ libunwind_path = "" const libunwind = "libunwind.so.8" function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) # We only do something on Linux/FreeBSD @static if Sys.islinux() || Sys.isfreebsd() global libunwind_handle = dlopen(libunwind) global libunwind_path = dlpath(libunwind_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libunwind_path) + push!(LIBPATH_list, LIBPATH[]) end end diff --git a/stdlib/MPFR_jll/src/MPFR_jll.jl b/stdlib/MPFR_jll/src/MPFR_jll.jl index a63aa190c96a0..b93c927189c7d 100644 --- a/stdlib/MPFR_jll/src/MPFR_jll.jl +++ b/stdlib/MPFR_jll/src/MPFR_jll.jl @@ -26,11 +26,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libmpfr_handle = dlopen(libmpfr) global libmpfr_path = dlpath(libmpfr_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libmpfr_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl index 3c83ac84a9a96..a7ca666b23e47 100644 --- a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl +++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl @@ -37,15 +37,15 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libmbedcrypto_handle = dlopen(libmbedcrypto) global libmbedcrypto_path = dlpath(libmbedcrypto_handle) global libmbedtls_handle = dlopen(libmbedtls) global libmbedtls_path = dlpath(libmbedtls_handle) global libmbedx509_handle = dlopen(libmbedx509) global libmbedx509_path = dlpath(libmbedx509_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libmbedtls_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl index 14445396a73f7..08562587bebba 100644 --- a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl +++ b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl @@ -17,8 +17,6 @@ cacert = "" function __init__() global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem") end diff --git a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl index 60475faf4eccf..4bed970f385b5 100644 --- a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl +++ b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl @@ -32,11 +32,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libopenblas_handle = dlopen(libopenblas) global libopenblas_path = dlpath(libopenblas_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libopenblas_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl index e61c134463e6d..e0ac190d256c0 100644 --- a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl +++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl @@ -26,11 +26,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libopenlibm_handle = dlopen(libopenlibm) global libopenlibm_path = dlpath(libopenlibm_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libopenlibm_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/PCRE2_jll/src/PCRE2_jll.jl b/stdlib/PCRE2_jll/src/PCRE2_jll.jl index 06c6e92fc37b2..ad0eb10006e4b 100644 --- a/stdlib/PCRE2_jll/src/PCRE2_jll.jl +++ b/stdlib/PCRE2_jll/src/PCRE2_jll.jl @@ -26,11 +26,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libpcre2_8_handle = dlopen(libpcre2_8) global libpcre2_8_path = dlpath(libpcre2_8_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libpcre2_8_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl index f27f39c6a8e53..66c4a482af894 100644 --- a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl +++ b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl @@ -87,9 +87,6 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libamd_handle = dlopen(libamd) global libamd_path = dlpath(libamd_handle) global libbtf_handle = dlopen(libbtf) @@ -116,6 +113,9 @@ function __init__() global libsuitesparseconfig_path = dlpath(libsuitesparseconfig_handle) global libumfpack_handle = dlopen(libumfpack) global libumfpack_path = dlpath(libumfpack_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libsuitesparse_wrapper_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/Zlib_jll/src/Zlib_jll.jl b/stdlib/Zlib_jll/src/Zlib_jll.jl index 50e5a33b7ce69..310264fb1f428 100644 --- a/stdlib/Zlib_jll/src/Zlib_jll.jl +++ b/stdlib/Zlib_jll/src/Zlib_jll.jl @@ -26,11 +26,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libz_handle = dlopen(libz) global libz_path = dlpath(libz_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libz_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/dSFMT_jll/src/dSFMT_jll.jl b/stdlib/dSFMT_jll/src/dSFMT_jll.jl index 04cfb17e6fc22..f13b66fcbf222 100644 --- a/stdlib/dSFMT_jll/src/dSFMT_jll.jl +++ b/stdlib/dSFMT_jll/src/dSFMT_jll.jl @@ -27,11 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libdSFMT_handle = dlopen(libdSFMT) global libdSFMT_path = dlpath(libdSFMT_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libdSFMT_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl index abc955e716510..fa45e754e5ebd 100644 --- a/stdlib/libLLVM_jll/src/libLLVM_jll.jl +++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl @@ -27,13 +27,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libLLVM_handle = dlopen(libLLVM) global libLLVM_path = dlpath(libLLVM_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libLLVM_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl index 50a34786133be..8b98c76ac5b14 100644 --- a/stdlib/nghttp2_jll/src/nghttp2_jll.jl +++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl @@ -26,11 +26,11 @@ else end function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) global libnghttp2_handle = dlopen(libnghttp2) global libnghttp2_path = dlpath(libnghttp2_handle) + global artifact_dir = dirname(Sys.BINDIR) + global LIBPATH[] = dirname(libnghttp2_path) + push!(LIBPATH_list, LIBPATH[]) end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/p7zip_jll/src/p7zip_jll.jl b/stdlib/p7zip_jll/src/p7zip_jll.jl index 16c059ac4d50a..d1761813e859e 100644 --- a/stdlib/p7zip_jll/src/p7zip_jll.jl +++ b/stdlib/p7zip_jll/src/p7zip_jll.jl @@ -82,8 +82,6 @@ end function __init__() global artifact_dir = dirname(Sys.BINDIR) - global LIBPATH[] = joinpath(Sys.BINDIR, Base.LIBDIR, "julia") - push!(LIBPATH_list, LIBPATH[]) init_p7zip_path() global PATH[] = dirname(p7zip_path) push!(PATH_list, PATH[]) From 3dcb49bdb47629d5a74cc69d8b2cb8888e06682a Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Wed, 3 Feb 2021 22:50:19 -0500 Subject: [PATCH 221/239] REPL,test: add dummy reader for output Refs #38996 --- stdlib/REPL/test/repl.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 340fcb0ef8359..ecca91b1cf196 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -453,6 +453,7 @@ for prompt = ["TestΠ", () -> randstring(rand(1:10))] # In the future if we want we can add a test that the right object # gets displayed by intercepting the display repl.specialdisplay = REPL.REPLDisplay(repl) + @async write(devnull, stdout_read) # redirect stdout to devnull so we drain the output pipe repl.interface = REPL.setup_interface(repl) repl_mode = repl.interface.modes[1] From ccbdb9120a9371aab0e3d3b00896922a1b591879 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 4 Feb 2021 00:12:11 -0500 Subject: [PATCH 222/239] test: silence `@time` macro test Also move to a more appropriate file and fix `s/@time/@test` typo. --- test/core.jl | 13 ------------- test/misc.jl | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/test/core.jl b/test/core.jl index bd16867527240..75b6ffd20fb01 100644 --- a/test/core.jl +++ b/test/core.jl @@ -5080,19 +5080,6 @@ end @test f17255(10000)[1] GC.enable(true) -# PR #39133, ensure that @time evaluates in the same scope -function time_macro_scope() - @time time_macro_local_var = 1 - time_macro_local_var -end -@test time_macro_scope() == 1 - -function timev_macro_scope() - @timev timev_macro_local_var = 1 - timev_macro_local_var -end -@time timev_macro_scope() == 1 - # issue #18710 bad_tvars() where {T} = 1 @test isa(which(bad_tvars, ()), Method) diff --git a/test/misc.jl b/test/misc.jl index 76be4e036dd5c..d30bc3d75e628 100644 --- a/test/misc.jl +++ b/test/misc.jl @@ -231,6 +231,27 @@ v11801, t11801 = @timed sin(1) @test names(@__MODULE__, all = true) == names_before_timing +# PR #39133, ensure that @time evaluates in the same scope +function time_macro_scope() + try # try/throw/catch bypasses printing + @time (time_macro_local_var = 1; throw("expected")) + return time_macro_local_var + catch ex + ex === "expected" || rethrow() + end +end +@test time_macro_scope() == 1 + +function timev_macro_scope() + try # try/throw/catch bypasses printing + @timev (time_macro_local_var = 1; throw("expected")) + return time_macro_local_var + catch ex + ex === "expected" || rethrow() + end +end +@test timev_macro_scope() == 1 + # interactive utilities struct ambigconvert; end # inject a problematic `convert` method to ensure it still works From 62f1be5bc1f5edf42b8ba97497c856fd6989db88 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Thu, 4 Feb 2021 11:30:12 +0100 Subject: [PATCH 223/239] Fix formatting of compat notes (#39519) --- stdlib/REPL/src/TerminalMenus/config.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/REPL/src/TerminalMenus/config.jl b/stdlib/REPL/src/TerminalMenus/config.jl index 9c8f001be6c5f..8ff6fccb0b9bd 100644 --- a/stdlib/REPL/src/TerminalMenus/config.jl +++ b/stdlib/REPL/src/TerminalMenus/config.jl @@ -39,7 +39,7 @@ Configure behavior for selection menus via keyword arguments: Subtypes of `ConfiguredMenu` will print `cursor`, `up_arrow`, and `down_arrow` automatically as needed, your `writeline` method should not print them. -!!! compat Julia 1.6 +!!! compat "Julia 1.6" `Config` is available as of Julia 1.6. On older releases use the global `CONFIG`. """ function Config(; @@ -81,7 +81,7 @@ All other keyword arguments are as described for [`TerminalMenus.Config`](@ref). `checked` and `unchecked` are not printed automatically, and should be printed by your `writeline` method. -!!! compat Julia 1.6 +!!! compat "Julia 1.6" `MultiSelectConfig` is available as of Julia 1.6. On older releases use the global `CONFIG`. """ function MultiSelectConfig(; @@ -109,7 +109,7 @@ end Global menu configuration parameters -!!! compat Julia 1.6 +!!! compat "Julia 1.6" `CONFIG` is deprecated, instead configure menus via their constructors. """ const CONFIG = Dict{Symbol,Union{Char,String,Bool}}() @@ -130,7 +130,7 @@ Keyword-only function to configure global menu parameters - `supress_output::Bool=false`: Ignored legacy argument, pass `suppress_output` as a keyword argument to `request` instead. - `ctrl_c_interrupt::Bool=true`: If `false`, return empty on ^C, if `true` throw InterruptException() on ^C -!!! compat Julia 1.6 +!!! compat "Julia 1.6" As of Julia 1.6, `config` is deprecated. Use `Config` or `MultiSelectConfig` instead. """ function config(;charset::Symbol = :na, From 0b7ce284589ce879fe90f0e87b9bf48e6a527902 Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Thu, 4 Feb 2021 17:47:24 +0100 Subject: [PATCH 224/239] Add compat note (#39503) --- base/reinterpretarray.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/reinterpretarray.jl b/base/reinterpretarray.jl index e2990bafcd086..c49c566ae65e5 100644 --- a/base/reinterpretarray.jl +++ b/base/reinterpretarray.jl @@ -90,6 +90,9 @@ If `sizeof(T) = n*sizeof(S)` for `n>1`, `A`'s first dimension must be of size `n` and `B` lacks `A`'s first dimension. Conversely, if `sizeof(S) = n*sizeof(T)` for `n>1`, `B` gets a new first dimension of size `n`. The dimensionality is unchanged if `sizeof(T) == sizeof(S)`. +!!! compat "Julia 1.6" + This method requires at least Julia 1.6. + # Examples ```jldoctest From a07089e040ec1b918470859aa64f4e66ffb47be8 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 4 Feb 2021 14:03:37 -0500 Subject: [PATCH 225/239] fix 'error during bootstrap' printing (#39515) --- src/jlapi.c | 41 ++++++++++++++++++++++------------------- src/julia.h | 12 ++++++------ 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/jlapi.c b/src/jlapi.c index 1c14232fb8f8f..9d41f1066b99e 100644 --- a/src/jlapi.c +++ b/src/jlapi.c @@ -163,15 +163,16 @@ JL_DLLEXPORT const char *jl_string_ptr(jl_value_t *s) JL_DLLEXPORT jl_value_t *jl_call(jl_function_t *f, jl_value_t **args, int32_t nargs) { jl_value_t *v; + nargs++; // add f to args JL_TRY { jl_value_t **argv; - JL_GC_PUSHARGS(argv, nargs+1); + JL_GC_PUSHARGS(argv, nargs); argv[0] = (jl_value_t*)f; - for(int i=1; iworld_age; jl_get_ptls_states()->world_age = jl_get_world_counter(); - v = jl_apply(argv, nargs+1); + v = jl_apply(argv, nargs); jl_get_ptls_states()->world_age = last_age; JL_GC_POP(); jl_exception_clear(); @@ -190,7 +191,7 @@ JL_DLLEXPORT jl_value_t *jl_call0(jl_function_t *f) JL_GC_PUSH1(&f); size_t last_age = jl_get_ptls_states()->world_age; jl_get_ptls_states()->world_age = jl_get_world_counter(); - v = jl_apply(&f, 1); + v = jl_apply_generic(f, NULL, 0); jl_get_ptls_states()->world_age = last_age; JL_GC_POP(); jl_exception_clear(); @@ -208,7 +209,8 @@ JL_DLLEXPORT jl_value_t *jl_call1(jl_function_t *f, jl_value_t *a) JL_TRY { jl_value_t **argv; JL_GC_PUSHARGS(argv, 2); - argv[0] = f; argv[1] = a; + argv[0] = f; + argv[1] = a; size_t last_age = jl_get_ptls_states()->world_age; jl_get_ptls_states()->world_age = jl_get_world_counter(); v = jl_apply(argv, 2); @@ -229,7 +231,9 @@ JL_DLLEXPORT jl_value_t *jl_call2(jl_function_t *f, jl_value_t *a, jl_value_t *b JL_TRY { jl_value_t **argv; JL_GC_PUSHARGS(argv, 3); - argv[0] = f; argv[1] = a; argv[2] = b; + argv[0] = f; + argv[1] = a; + argv[2] = b; size_t last_age = jl_get_ptls_states()->world_age; jl_get_ptls_states()->world_age = jl_get_world_counter(); v = jl_apply(argv, 3); @@ -251,7 +255,10 @@ JL_DLLEXPORT jl_value_t *jl_call3(jl_function_t *f, jl_value_t *a, JL_TRY { jl_value_t **argv; JL_GC_PUSHARGS(argv, 4); - argv[0] = f; argv[1] = a; argv[2] = b; argv[3] = c; + argv[0] = f; + argv[1] = a; + argv[2] = b; + argv[3] = c; size_t last_age = jl_get_ptls_states()->world_age; jl_get_ptls_states()->world_age = jl_get_world_counter(); v = jl_apply(argv, 4); @@ -496,25 +503,21 @@ static int exec_program(char *program) // TODO: It is possible for this output // to be mangled due to `jlbacktrace` // printing directly to STDERR_FILENO. - jl_value_t *errs = jl_stderr_obj(); - JL_GC_PUSH1(&errs); - volatile int shown_err = 0; + int shown_err = 0; jl_printf(JL_STDERR, "error during bootstrap:\n"); - JL_TRY { + jl_value_t *exc = jl_current_exception(); + jl_value_t *showf = jl_get_function(jl_base_module, "show"); + if (showf) { + jl_value_t *errs = jl_stderr_obj(); if (errs) { - jl_value_t *showf = jl_get_function(jl_base_module, "show"); - if (showf != NULL) { - jl_call2(showf, errs, jl_current_exception()); + if (jl_call2(showf, errs, exc)) { jl_printf(JL_STDERR, "\n"); shown_err = 1; } } } - JL_CATCH { - } - JL_GC_POP(); if (!shown_err) { - jl_static_show((JL_STREAM*)STDERR_FILENO, jl_current_exception()); + jl_static_show((JL_STREAM*)STDERR_FILENO, exc); jl_printf((JL_STREAM*)STDERR_FILENO, "\n"); } jlbacktrace(); // written to STDERR_FILENO diff --git a/src/julia.h b/src/julia.h index 98a1a8a2d4959..1e6c3afbe6fa1 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1737,12 +1737,12 @@ STATIC_INLINE jl_value_t *jl_apply(jl_value_t **args, uint32_t nargs) return jl_apply_generic(args[0], &args[1], nargs - 1); } -JL_DLLEXPORT jl_value_t *jl_call(jl_function_t *f, jl_value_t **args, int32_t nargs); -JL_DLLEXPORT jl_value_t *jl_call0(jl_function_t *f); -JL_DLLEXPORT jl_value_t *jl_call1(jl_function_t *f, jl_value_t *a); -JL_DLLEXPORT jl_value_t *jl_call2(jl_function_t *f, jl_value_t *a, jl_value_t *b); -JL_DLLEXPORT jl_value_t *jl_call3(jl_function_t *f, jl_value_t *a, - jl_value_t *b, jl_value_t *c); +JL_DLLEXPORT jl_value_t *jl_call(jl_function_t *f JL_MAYBE_UNROOTED, jl_value_t **args, int32_t nargs); +JL_DLLEXPORT jl_value_t *jl_call0(jl_function_t *f JL_MAYBE_UNROOTED); +JL_DLLEXPORT jl_value_t *jl_call1(jl_function_t *f JL_MAYBE_UNROOTED, jl_value_t *a JL_MAYBE_UNROOTED); +JL_DLLEXPORT jl_value_t *jl_call2(jl_function_t *f JL_MAYBE_UNROOTED, jl_value_t *a JL_MAYBE_UNROOTED, jl_value_t *b JL_MAYBE_UNROOTED); +JL_DLLEXPORT jl_value_t *jl_call3(jl_function_t *f JL_MAYBE_UNROOTED, jl_value_t *a JL_MAYBE_UNROOTED, + jl_value_t *b JL_MAYBE_UNROOTED, jl_value_t *c JL_MAYBE_UNROOTED); // interfacing with Task runtime JL_DLLEXPORT void jl_yield(void); From fb0287f706128dbf7c8d5c2a8b124dbe5af58dbf Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Thu, 4 Feb 2021 20:09:27 +0100 Subject: [PATCH 226/239] Handle union of immutables in codegen of `GC.@preserve` (#39520) --- src/codegen.cpp | 2 +- test/compiler/codegen.jl | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 8f18159a09eb5..640c19630951e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4693,7 +4693,7 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaval) if (ai.isboxed) { vals.push_back(ai.Vboxed); } - else if (!jl_is_pointerfree(ai.typ)) { + else if (jl_is_concrete_immutable(ai.typ) && !jl_is_pointerfree(ai.typ)) { Type *at = julia_type_to_llvm(ctx, ai.typ); vals.push_back(emit_unbox(ctx, at, ai, ai.typ)); } diff --git a/test/compiler/codegen.jl b/test/compiler/codegen.jl index 18401288a1c4a..2b7b266751a08 100644 --- a/test/compiler/codegen.jl +++ b/test/compiler/codegen.jl @@ -522,3 +522,32 @@ function f39232(a) return z end @test f39232((+, -)) == Any[+, -] + +@testset "GC.@preserve" begin + # main use case + function f1(cond) + val = [1] + GC.@preserve val begin end + end + @test occursin("llvm.julia.gc_preserve_begin", get_llvm(f1, Tuple{Bool}, true, false, false)) + + # stack allocated objects (JuliaLang/julia#34241) + function f3(cond) + val = ([1],) + GC.@preserve val begin end + end + @test occursin("llvm.julia.gc_preserve_begin", get_llvm(f3, Tuple{Bool}, true, false, false)) + + # unions of immutables (JuliaLang/julia#39501) + function f2(cond) + val = cond ? 1 : 1f0 + GC.@preserve val begin end + end + @test !occursin("llvm.julia.gc_preserve_begin", get_llvm(f2, Tuple{Bool}, true, false, false)) + # make sure the fix for the above doesn't regress #34241 + function f4(cond) + val = cond ? ([1],) : ([1f0],) + GC.@preserve val begin end + end + @test occursin("llvm.julia.gc_preserve_begin", get_llvm(f4, Tuple{Bool}, true, false, false)) +end From b3d82d3bdd65f0cf957550a46df6d430c25ed488 Mon Sep 17 00:00:00 2001 From: Thomas Christensen Date: Thu, 4 Feb 2021 14:35:59 -0500 Subject: [PATCH 227/239] improve performance of `inv(::ComplexF64)` (#39303) --- base/complex.jl | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/base/complex.jl b/base/complex.jl index 884632d5fc453..7cf266f2bc4de 100644 --- a/base/complex.jl +++ b/base/complex.jl @@ -439,29 +439,33 @@ end function inv(w::ComplexF64) c, d = reim(w) (isinf(c) | isinf(d)) && return complex(copysign(0.0, c), flipsign(-0.0, d)) - half = 0.5 - two = 2.0 - cd = max(abs(c), abs(d)) - ov = floatmax(c) - un = floatmin(c) - ϵ = eps(Float64) - bs = two/(ϵ*ϵ) + absc, absd = abs(c), abs(d) + cd = ifelse(absc>absd, absc, absd) # cheap `max`: don't need sign- and nan-checks here + + ϵ = eps(Float64) + bs = 2/(ϵ*ϵ) + + # scaling s = 1.0 - cd >= half*ov && (c=half*c; d=half*d; s=s*half) # scale down c,d - cd <= un*two/ϵ && (c=c*bs; d=d*bs; s=s*bs ) # scale up c,d - if abs(d)<=abs(c) - r = d/c - t = 1.0/(c+d*r) - p = t - q = -r * t + if cd >= floatmax(Float64)/2 + c *= 0.5; d *= 0.5; s = 0.5 # scale down c, d + elseif cd <= 2floatmin(Float64)/ϵ + c *= bs; d *= bs; s = bs # scale up c, d + end + + # inversion operations + if absd <= absc + p, q = robust_cinv(c, d) else - c, d = d, c - r = d/c - t = 1.0/(c+d*r) - p = r * t - q = -t + q, p = robust_cinv(-d, -c) end - return ComplexF64(p*s,q*s) # undo scaling + return ComplexF64(p*s, q*s) # undo scaling +end +function robust_cinv(c::Float64, d::Float64) + r = d/c + p = inv(muladd(d, r, c)) + q = -r*p + return p, q end function ssqs(x::T, y::T) where T<:Real From 4af2b9f36aa45646f947a4e62e56ade205ee3c18 Mon Sep 17 00:00:00 2001 From: Antoine Levitt Date: Thu, 4 Feb 2021 20:48:32 +0100 Subject: [PATCH 228/239] Add range(start, stop) and range(start, stop, length) (#39228) * Add range(start, stop) and range(start, stop, length) Co-authored-by: Matt Bauman --- NEWS.md | 1 + base/range.jl | 24 +++++------------------- test/ranges.jl | 42 ++++++++++++++++++++---------------------- 3 files changed, 26 insertions(+), 41 deletions(-) diff --git a/NEWS.md b/NEWS.md index 60e9a07271559..13ed6ef10732f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -43,6 +43,7 @@ Standard library changes ------------------------ * `count` and `findall` now accept an `AbstractChar` argument to search for a character in a string ([#38675]). +* `range` now supports the `range(start, stop)` and `range(start, stop, length)` methods ([#39228]). * `range` now supports `start` as an optional keyword argument ([#38041]). * `islowercase` and `isuppercase` are now compliant with the Unicode lower/uppercase categories ([#38574]). * `iseven` and `isodd` functions now support non-`Integer` numeric types ([#38976]). diff --git a/base/range.jl b/base/range.jl index dacf60212b19c..7278d8dc61e9b 100644 --- a/base/range.jl +++ b/base/range.jl @@ -47,6 +47,7 @@ function _colon(start::T, step, stop::T) where T end """ + range(start, stop, length) range(start, stop; length, step) range(start; length, stop, step) range(;start, length, stop, step) @@ -96,34 +97,19 @@ julia> range(1, 3.5, step=2) Special care is taken to ensure intermediate values are computed rationally. To avoid this induced overhead, see the [`LinRange`](@ref) constructor. -Both `start` and `stop` may be specified as either a positional or keyword arguments. -If both are specified as positional arguments, one of `step` or `length` must also be provided. - !!! compat "Julia 1.1" `stop` as a positional argument requires at least Julia 1.1. !!! compat "Julia 1.7" - `start` as a keyword argument requires at least Julia 1.7. + The versions without keyword arguments and `start` as a keyword argument + require at least Julia 1.7. """ function range end range(start; stop=nothing, length::Union{Integer,Nothing}=nothing, step=nothing) = _range(start, step, stop, length) - -function range(start, stop; length::Union{Integer,Nothing}=nothing, step=nothing) - # For code clarity, the user must pass step or length - # See https://github.com/JuliaLang/julia/pull/28708#issuecomment-420034562 - if step === length === nothing - msg = """ - Neither `step` nor `length` was provided. To fix this do one of the following: - * Pass one of them - * Use `$(start):$(stop)` - * Use `range($start, stop=$stop)` - """ - throw(ArgumentError(msg)) - end - _range(start, step, stop, length) -end +range(start, stop; length::Union{Integer,Nothing}=nothing, step=nothing) = _range(start, step, stop, length) +range(start, stop, length::Integer) = _range(start, nothing, stop, length) range(;start=nothing, stop=nothing, length::Union{Integer, Nothing}=nothing, step=nothing) = _range(start, step, stop, length) diff --git a/test/ranges.jl b/test/ranges.jl index 899cba13f47b9..937aabe471561 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1,26 +1,26 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license @testset "range construction" begin - @testset "range(;kw...)" begin - @test_throws ArgumentError range(start=1, step=1, stop=2, length=10) - @test_throws ArgumentError range(start=1, step=1, stop=10, length=11) - - r = 3.0:2:11 - @test r == range(start=first(r), step=step(r), stop=last(r) ) - @test r == range(start=first(r), step=step(r), length=length(r)) - @test r == range(start=first(r), stop=last(r), length=length(r)) - @test r == range( step=step(r), stop=last(r), length=length(r)) - - r = 4:9 - @test r === range(start=first(r), stop=last(r) ) - @test r === range(start=first(r), length=length(r)) - # the next one uses ==, because it changes the eltype - @test r == range(start=first(r), stop=last(r), length=length(r)) - @test r === range( stop=last(r), length=length(r)) - - for T = (Int8, Rational{Int16}, UInt32, Float64, Char) - @test typeof(range(start=T(5), length=3)) === typeof(range(stop=T(5), length=3)) - end + @test_throws ArgumentError range(start=1, step=1, stop=2, length=10) + @test_throws ArgumentError range(start=1, step=1, stop=10, length=11) + + r = 3.0:2:11 + @test r == range(start=first(r), step=step(r), stop=last(r) ) + @test r == range(start=first(r), step=step(r), length=length(r)) + @test r == range(start=first(r), stop=last(r), length=length(r)) + @test r == range( step=step(r), stop=last(r), length=length(r)) + + r = 4:9 + @test r === range(start=first(r), stop=last(r) ) + @test r === range(start=first(r), length=length(r)) + @test r === range( stop=last(r), length=length(r)) + @test r === range(first(r), last(r) ) + # the next ones use ==, because it changes the eltype + @test r == range(first(r), last(r), length(r) ) + @test r == range(start=first(r), stop=last(r), length=length(r)) + + for T = (Int8, Rational{Int16}, UInt32, Float64, Char) + @test typeof(range(start=T(5), length=3)) === typeof(range(stop=T(5), length=3)) end end @@ -1630,8 +1630,6 @@ end end end end - # require a keyword arg - @test_throws ArgumentError range(1, 100) end @testset "Reverse empty ranges" begin From e65e3f5b0d91c8c565189929fa41fc4134849911 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 4 Feb 2021 15:52:14 -0500 Subject: [PATCH 229/239] optimize write(::IO, ::IOBuffer) (#39516) --- base/io.jl | 1 + base/iobuffer.jl | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/base/io.jl b/base/io.jl index 98d78e115d44f..eb9eff598f712 100644 --- a/base/io.jl +++ b/base/io.jl @@ -358,6 +358,7 @@ function pipe_reader end function pipe_writer end write(io::AbstractPipe, byte::UInt8) = write(pipe_writer(io)::IO, byte) +write(to::IO, from::AbstractPipe) = write(to, pipe_reader(from)) unsafe_write(io::AbstractPipe, p::Ptr{UInt8}, nb::UInt) = unsafe_write(pipe_writer(io)::IO, p, nb)::Union{Int,UInt} buffer_writes(io::AbstractPipe, args...) = buffer_writes(pipe_writer(io)::IO, args...) flush(io::AbstractPipe) = flush(pipe_writer(io)::IO) diff --git a/base/iobuffer.jl b/base/iobuffer.jl index a1504b4bd4f63..8df6af0087137 100644 --- a/base/iobuffer.jl +++ b/base/iobuffer.jl @@ -405,12 +405,12 @@ function take!(io::IOBuffer) return data end -function write(to::GenericIOBuffer, from::GenericIOBuffer) +function write(to::IO, from::GenericIOBuffer) if to === from from.ptr = from.size + 1 return 0 end - written::Int = write_sub(to, from.data, from.ptr, bytesavailable(from)) + written::Int = GC.@preserve from unsafe_write(to, pointer(from.data, from.ptr), UInt(bytesavailable(from))) from.ptr += written return written end @@ -434,14 +434,6 @@ function unsafe_write(to::GenericIOBuffer, p::Ptr{UInt8}, nb::UInt) return written end -function write_sub(to::GenericIOBuffer, a::AbstractArray{UInt8}, offs, nel) - require_one_based_indexing(a) - if offs+nel-1 > length(a) || offs < 1 || nel < 0 - throw(BoundsError()) - end - GC.@preserve a unsafe_write(to, pointer(a, offs), UInt(nel)) -end - @inline function write(to::GenericIOBuffer, a::UInt8) ensureroom(to, UInt(1)) ptr = (to.append ? to.size+1 : to.ptr) From 776199c137f7c99d56723ef68642202d0d9a5cb2 Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Thu, 4 Feb 2021 15:57:53 -0500 Subject: [PATCH 230/239] Add half-integers for sinpi and cospi too (#39514) --- test/math.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/math.jl b/test/math.jl index 6424cb1b6e57d..8bc19a96fa84e 100644 --- a/test/math.jl +++ b/test/math.jl @@ -532,10 +532,12 @@ end end end -@testset "half-integer and nan/infs for sincospi" begin +@testset "half-integer and nan/infs for sincospi,sinpi,cospi" begin @testset for T in (ComplexF32, ComplexF64) @test sincospi(T(0.5, 0.0)) == (T(1.0,0.0), T(0.0, -0.0)) @test sincospi(T(1.5, 0.0)) == (T(-1.0,0.0), T(0.0, 0.0)) + @test sinpi(T(1.5, 1.5)) ≈ T(-cosh(3*π/2), 0.0) + @test cospi(T(0.5, 0.5)) ≈ T(0.0, -sinh(π/2)) s, c = sincospi(T(Inf64, 0.0)) @test isnan(real(s)) && imag(s) == zero(real(T)) @test isnan(real(c)) && imag(c) == -zero(real(T)) From 0ea19e4239c186b38528fea32cd81001e7a1f317 Mon Sep 17 00:00:00 2001 From: Reno Date: Thu, 4 Feb 2021 16:11:47 -0500 Subject: [PATCH 231/239] Realign docs `end` (#39496) --- stdlib/Distributed/src/cluster.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Distributed/src/cluster.jl b/stdlib/Distributed/src/cluster.jl index 2cf0f27502616..7329e1b91d37b 100644 --- a/stdlib/Distributed/src/cluster.jl +++ b/stdlib/Distributed/src/cluster.jl @@ -431,7 +431,7 @@ if istaskdone(t) # Check if `addprocs` has completed to ensure `fetch` doesn't else fetch(t) end - end +end ``` """ function addprocs(manager::ClusterManager; kwargs...) From 7d34b0d93a56a2d9f511ae11d3f8c0208bebb389 Mon Sep 17 00:00:00 2001 From: Simeon Schaub Date: Fri, 5 Feb 2021 18:29:52 +0100 Subject: [PATCH 232/239] allow splatting in hvcat syntax (#39249) --- base/abstractarray.jl | 4 +++ src/julia-syntax.scm | 69 +++++++++++++++++++------------------------ test/abstractarray.jl | 11 +++++++ 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index a880b4eecfd3f..4326b999a6930 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -1793,6 +1793,10 @@ typed_hcat(T::Type, A::AbstractArray...) = cat_t(T, A...; dims=Val(2)) # 2d horizontal and vertical concatenation +# these are produced in lowering if splatting occurs inside hvcat +hvcat_rows(rows::Tuple...) = hvcat(map(length, rows), (rows...)...) +typed_hvcat_rows(T::Type, rows::Tuple...) = typed_hvcat(T, map(length, rows), (rows...)...) + function hvcat(nbc::Integer, as...) # nbc = # of block columns n = length(as) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index ac798109ed1d5..6329293e3a795 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1950,6 +1950,34 @@ ,@(map expand-forms (cddr e)))) (cons (car e) (map expand-forms (cdr e)))))) +(define (expand-vcat e + (vcat '((top vcat))) + (hvcat '((top hvcat))) + (hvcat_rows '((top hvcat_rows)))) + (let ((a (cdr e))) + (if (any assignment? a) + (error (string "misplaced assignment statement in \"" (deparse e) "\""))) + (if (has-parameters? a) + (error "unexpected semicolon in array expression") + (expand-forms + (if (any (lambda (x) + (and (pair? x) (eq? (car x) 'row))) + a) + ;; convert nested hcat inside vcat to hvcat + (let ((rows (map (lambda (x) + (if (and (pair? x) (eq? (car x) 'row)) + (cdr x) + (list x))) + a))) + ;; in case there is splatting inside `hvcat`, collect each row as a + ;; separate tuple and pass those to `hvcat_rows` instead (ref #38844) + (if (any (lambda (row) (any vararg? row)) rows) + `(call ,@hvcat_rows ,@(map (lambda (x) `(tuple ,@x)) rows)) + `(call ,@hvcat + (tuple ,@(map length rows)) + ,@(apply append rows)))) + `(call ,@vcat ,@a)))))) + (define (expand-tuple-destruct lhss x) (define (sides-match? l r) ;; l and r either have equal lengths, or r has a trailing ... @@ -2449,27 +2477,7 @@ (error (string "misplaced assignment statement in \"" (deparse e) "\""))) (expand-forms `(call (top hcat) ,@(cdr e)))) - 'vcat - (lambda (e) - (let ((a (cdr e))) - (if (any assignment? a) - (error (string "misplaced assignment statement in \"" (deparse e) "\""))) - (if (has-parameters? a) - (error "unexpected semicolon in array expression") - (expand-forms - (if (any (lambda (x) - (and (pair? x) (eq? (car x) 'row))) - a) - ;; convert nested hcat inside vcat to hvcat - (let ((rows (map (lambda (x) - (if (and (pair? x) (eq? (car x) 'row)) - (cdr x) - (list x))) - a))) - `(call (top hvcat) - (tuple ,.(map length rows)) - ,.(apply append rows))) - `(call (top vcat) ,@a)))))) + 'vcat expand-vcat 'typed_hcat (lambda (e) @@ -2480,23 +2488,8 @@ 'typed_vcat (lambda (e) (let ((t (cadr e)) - (a (cddr e))) - (if (any assignment? (cddr e)) - (error (string "misplaced assignment statement in \"" (deparse e) "\""))) - (expand-forms - (if (any (lambda (x) - (and (pair? x) (eq? (car x) 'row))) - a) - ;; convert nested hcat inside vcat to hvcat - (let ((rows (map (lambda (x) - (if (and (pair? x) (eq? (car x) 'row)) - (cdr x) - (list x))) - a))) - `(call (top typed_hvcat) ,t - (tuple ,.(map length rows)) - ,.(apply append rows))) - `(call (top typed_vcat) ,t ,@a))))) + (e (cdr e))) + (expand-vcat e `((top typed_vcat) ,t) `((top typed_hvcat) ,t) `((top typed_hvcat_rows) ,t)))) '|'| (lambda (e) (expand-forms `(call |'| ,(cadr e)))) diff --git a/test/abstractarray.jl b/test/abstractarray.jl index 52af916acbdac..dd24dc28364c7 100644 --- a/test/abstractarray.jl +++ b/test/abstractarray.jl @@ -1269,3 +1269,14 @@ Base.pushfirst!(tpa::TestPushArray{T}, a::T) where T = pushfirst!(tpa.data, a) pushfirst!(tpa, 6, 5, 4, 3, 2) @test tpa.data == reverse(collect(1:6)) end + +@testset "splatting into hvcat" begin + t = (1, 2) + @test [t...; 3 4] == [1 2; 3 4] + @test [0 t...; t... 0] == [0 1 2; 1 2 0] + @test_throws ArgumentError [t...; 3 4 5] + + @test Int[t...; 3 4] == [1 2; 3 4] + @test Int[0 t...; t... 0] == [0 1 2; 1 2 0] + @test_throws ArgumentError Int[t...; 3 4 5] +end From 6159633f6f8125eaffa5bd7e9d7964323409c01f Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Fri, 5 Feb 2021 16:47:16 -0500 Subject: [PATCH 233/239] fix #39521, obvious_subtype issue with `Type{}` and diagonal (#39525) --- src/subtype.c | 10 ++++++---- test/subtype.jl | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/subtype.c b/src/subtype.c index 3b45a207de707..f98ecd3737458 100644 --- a/src/subtype.c +++ b/src/subtype.c @@ -1739,17 +1739,19 @@ static int obvious_subtype(jl_value_t *x, jl_value_t *y, jl_value_t *y0, int *su *subtype = 0; return 1; } - if (jl_is_type_type(a1) && jl_is_type(jl_tparam0(a1))) { - a1 = jl_typeof(jl_tparam0(a1)); + jl_value_t *a1u = jl_unwrap_unionall(a1); + if (jl_is_type_type(a1u) && jl_is_type(jl_tparam0(a1u))) { + a1 = jl_typeof(jl_tparam0(a1u)); } for (; i < nparams_expanded_x; i++) { jl_value_t *a = (vx != JL_VARARG_NONE && i >= npx - 1) ? vxt : jl_tparam(x, i); if (i > npy && jl_is_typevar(b)) { // i == npy implies a == a1 // diagonal rule: all the later parameters are also constrained to be type-equal to the first jl_value_t *a2 = a; - if (jl_is_type_type(a) && jl_is_type(jl_tparam0(a))) { + jl_value_t *au = jl_unwrap_unionall(a); + if (jl_is_type_type(au) && jl_is_type(jl_tparam0(au))) { // if a is exactly Type{T}, then use the concrete typeof(T) instead here - a2 = jl_typeof(jl_tparam0(a)); + a2 = jl_typeof(jl_tparam0(au)); } if (!obviously_egal(a1, a2)) { if (obvious_subtype(a2, a1, y0, subtype)) { diff --git a/test/subtype.jl b/test/subtype.jl index dd0147406f57c..efd2f79082f7b 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1868,3 +1868,7 @@ f39218(::T, ::T) where {T<:AB39218} = false g39218(a, b) = (@nospecialize; if a isa AB39218 && b isa AB39218; f39218(a, b); end;) @test g39218(A39218(), A39218()) === false @test_throws MethodError g39218(A39218(), B39218()) + +# issue #39521 +@test Tuple{Type{Tuple{A}} where A, DataType, DataType} <: Tuple{Vararg{B}} where B +@test Tuple{DataType, Type{Tuple{A}} where A, DataType} <: Tuple{Vararg{B}} where B From fc89276350eee23495851eb636e345baeb52aa1d Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Fri, 5 Feb 2021 23:14:57 +0100 Subject: [PATCH 234/239] replace tabs with spaces in code (#39532) --- base/irrationals.jl | 4 +-- base/special/hyperbolic.jl | 6 ++-- .../src/MozillaCACerts_jll.jl | 4 +-- stdlib/p7zip_jll/src/p7zip_jll.jl | 6 ++-- test/bitset.jl | 2 +- test/compiler/inline.jl | 4 +-- test/core.jl | 2 +- test/dict.jl | 30 +++++++++---------- test/iterators.jl | 8 ++--- test/math.jl | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/base/irrationals.jl b/base/irrationals.jl index 1f7b1358dd70e..545d9091ee840 100644 --- a/base/irrationals.jl +++ b/base/irrationals.jl @@ -160,8 +160,8 @@ end round(x::Irrational, r::RoundingMode) = round(float(x), r) """ - @irrational sym val def - @irrational(sym, val, def) + @irrational sym val def + @irrational(sym, val, def) Define a new `Irrational` value, `sym`, with pre-computed `Float64` value `val`, and arbitrary-precision definition in terms of `BigFloat`s given by the expression `def`. diff --git a/base/special/hyperbolic.jl b/base/special/hyperbolic.jl index 1e6d4e8a9e87a..1fee6e2879220 100644 --- a/base/special/hyperbolic.jl +++ b/base/special/hyperbolic.jl @@ -15,8 +15,8 @@ # ==================================================== @inline function exthorner(x, p::Tuple) - # polynomial evaluation using compensated summation. - # much more accurate, especially when lo can be combined with other rounding errors + # polynomial evaluation using compensated summation. + # much more accurate, especially when lo can be combined with other rounding errors hi, lo = p[end], zero(x) for i in length(p)-1:-1:1 pi = p[i] @@ -112,7 +112,7 @@ function cosh(x::T) where T<:Union{Float32,Float64} # return cosh(x) = = (exp(x) + exp(-x))/2 # e) H_LARGE_X <= x # return cosh(x) = exp(x/2)/2 * exp(x/2) - # Note that this branch automatically deals with Infs and NaNs + # Note that this branch automatically deals with Infs and NaNs absx = abs(x) if absx <= COSH_SMALL_X(T) diff --git a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl index 08562587bebba..7e69f5b84ce16 100644 --- a/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl +++ b/stdlib/MozillaCACerts_jll/src/MozillaCACerts_jll.jl @@ -16,8 +16,8 @@ artifact_dir = "" cacert = "" function __init__() - global artifact_dir = dirname(Sys.BINDIR) - global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem") + global artifact_dir = dirname(Sys.BINDIR) + global cacert = normpath(Sys.BINDIR::String, Base.DATAROOTDIR, "julia", "cert.pem") end # JLLWrappers API compatibility shims. Note that not all of these will really make sense. diff --git a/stdlib/p7zip_jll/src/p7zip_jll.jl b/stdlib/p7zip_jll/src/p7zip_jll.jl index d1761813e859e..1bff9f47971ba 100644 --- a/stdlib/p7zip_jll/src/p7zip_jll.jl +++ b/stdlib/p7zip_jll/src/p7zip_jll.jl @@ -58,9 +58,9 @@ end function p7zip(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH) - withenv(env...) do - return f(p7zip_path) - end + withenv(env...) do + return f(p7zip_path) + end end function p7zip(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) env = adjust_ENV!(copy(ENV), PATH[], LIBPATH[], adjust_PATH, adjust_LIBPATH) diff --git a/test/bitset.jl b/test/bitset.jl index f227bbe180080..1919da4f3702a 100644 --- a/test/bitset.jl +++ b/test/bitset.jl @@ -196,7 +196,7 @@ end @test intersect(BitSet([1,2,3])) == BitSet([1,2,3]) @test intersect(BitSet(1:7), BitSet(3:10)) == - intersect(BitSet(3:10), BitSet(1:7)) == BitSet(3:7) + intersect(BitSet(3:10), BitSet(1:7)) == BitSet(3:7) @test intersect(BitSet(1:10), BitSet(1:4), 1:5, [2,3,10]) == BitSet([2,3]) end diff --git a/test/compiler/inline.jl b/test/compiler/inline.jl index 8f7c6b831e185..dc3c25854d385 100644 --- a/test/compiler/inline.jl +++ b/test/compiler/inline.jl @@ -221,8 +221,8 @@ end # check that div can be fully eliminated function f_div(x) - div(x, 1) - return x + div(x, 1) + return x end @test fully_eliminated(f_div, (Int,)) == 1 # ...unless we div by an unknown amount diff --git a/test/core.jl b/test/core.jl index 75b6ffd20fb01..4489b5cd1e669 100644 --- a/test/core.jl +++ b/test/core.jl @@ -410,7 +410,7 @@ function foo23996(xs...) bar(::AbstractFloat) = push!(rets, 2) bar(::Bool) = foobar() for x in xs - bar(x) + bar(x) end rets end diff --git a/test/dict.jl b/test/dict.jl index c8baa7a6c7159..534e88ada036c 100644 --- a/test/dict.jl +++ b/test/dict.jl @@ -1175,33 +1175,33 @@ end # WeakKeyDict soundness (#38727) mutable struct ComparesWithGC38727 - i::Int + i::Int end const armed = Ref{Bool}(true) @noinline fwdab38727(a, b) = invoke(Base.isequal, Tuple{Any, WeakRef}, a, b) function Base.isequal(a::ComparesWithGC38727, b::WeakRef) - # This GC.gc() here simulates a GC during compilation in the original issue - armed[] && GC.gc() - armed[] = false - fwdab38727(a, b) + # This GC.gc() here simulates a GC during compilation in the original issue + armed[] && GC.gc() + armed[] = false + fwdab38727(a, b) end Base.isequal(a::WeakRef, b::ComparesWithGC38727) = isequal(b, a) Base.:(==)(a::ComparesWithGC38727, b::ComparesWithGC38727) = a.i == b.i Base.hash(a::ComparesWithGC38727, u::UInt) = Base.hash(a.i, u) function make_cwgc38727(wkd, i) - f = ComparesWithGC38727(i) - function fin(f) - f.i = -1 - end - finalizer(fin, f) - f + f = ComparesWithGC38727(i) + function fin(f) + f.i = -1 + end + finalizer(fin, f) + f end @noinline mk38727(wkd) = wkd[make_cwgc38727(wkd, 1)] = nothing function bar() - wkd = WeakKeyDict{Any, Nothing}() - mk38727(wkd) - armed[] = true - z = getkey(wkd, ComparesWithGC38727(1), missing) + wkd = WeakKeyDict{Any, Nothing}() + mk38727(wkd) + armed[] = true + z = getkey(wkd, ComparesWithGC38727(1), missing) end # Run this twice, in case compilation the first time around # masks something. diff --git a/test/iterators.jl b/test/iterators.jl index b9bec84bf9a58..f4432c9d831cd 100644 --- a/test/iterators.jl +++ b/test/iterators.jl @@ -691,10 +691,10 @@ end @test eltype(Iterators.Stateful("a")) == Char # Interaction of zip/Stateful let a = Iterators.Stateful("a"), b = "" - @test isempty(collect(zip(a,b))) - @test !isempty(a) - @test isempty(collect(zip(b,a))) - @test !isempty(a) + @test isempty(collect(zip(a,b))) + @test !isempty(a) + @test isempty(collect(zip(b,a))) + @test !isempty(a) end let a = Iterators.Stateful("a"), b = "", c = Iterators.Stateful("c") @test isempty(collect(zip(a,b,c))) diff --git a/test/math.jl b/test/math.jl index 8bc19a96fa84e..84699a60ead01 100644 --- a/test/math.jl +++ b/test/math.jl @@ -1196,7 +1196,7 @@ end @test (@inferred hypot(T(1e10), T(1e10), T(1e10), T(1e10))) ≈ 2e10 @test isnan_type(T, hypot(T(3), T(3//4), T(NaN))) @test hypot(T(1), T(0)) === T(1) - @test hypot(T(1), T(0), T(0)) === T(1) + @test hypot(T(1), T(0), T(0)) === T(1) @test (@inferred hypot(T(Inf), T(Inf), T(Inf))) == T(Inf) for s in (zero(T), floatmin(T)*1e3, floatmax(T)*1e-3, T(Inf)) @test hypot(1s, 2s) ≈ s * hypot(1, 2) rtol=8eps(T) From e180da2f455eba74be5ef3d24c56449bcd72f46c Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 5 Feb 2021 17:46:59 -0500 Subject: [PATCH 235/239] Run jl_resolve_globals_in_ir on the result of generated functions (#39483) We didn't use to run this when the generated function returned a CodeInfo (though we did run it for AST). However, now that this also does the conversion of :opaque_closure_method to actual Method objects, I think the best thing to do would be to run it here to avoid the generated function having to construct its own Method object from scratch. --- src/method.c | 24 +++++++++++++++--------- test/opaque_closure.jl | 27 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/method.c b/src/method.c index 96eafd1acaa2e..a00a027d6db55 100644 --- a/src/method.c +++ b/src/method.c @@ -33,19 +33,23 @@ static jl_value_t *resolve_globals(jl_value_t *expr, jl_module_t *module, jl_sve } else if (jl_is_returnnode(expr)) { jl_value_t *val = resolve_globals(jl_returnnode_value(expr), module, sparam_vals, binding_effects, eager_resolve); - JL_GC_PUSH1(&val); - expr = jl_new_struct(jl_returnnode_type, val); - JL_GC_POP(); + if (val != jl_returnnode_value(expr)) { + JL_GC_PUSH1(&val); + expr = jl_new_struct(jl_returnnode_type, val); + JL_GC_POP(); + } return expr; } else if (jl_is_gotoifnot(expr)) { jl_value_t *cond = resolve_globals(jl_gotoifnot_cond(expr), module, sparam_vals, binding_effects, eager_resolve); - intptr_t label = jl_gotoifnot_label(expr); - JL_GC_PUSH1(&cond); - expr = jl_new_struct_uninit(jl_gotoifnot_type); - set_nth_field(jl_gotoifnot_type, expr, 0, cond); - jl_gotoifnot_label(expr) = label; - JL_GC_POP(); + if (cond != jl_gotoifnot_cond(expr)) { + intptr_t label = jl_gotoifnot_label(expr); + JL_GC_PUSH1(&cond); + expr = jl_new_struct_uninit(jl_gotoifnot_type); + set_nth_field(jl_gotoifnot_type, expr, 0, cond); + jl_gotoifnot_label(expr) = label; + JL_GC_POP(); + } return expr; } else if (jl_is_expr(expr)) { @@ -461,6 +465,8 @@ JL_DLLEXPORT jl_code_info_t *jl_code_for_staged(jl_method_instance_t *linfo) if (jl_is_code_info(ex)) { func = (jl_code_info_t*)ex; + jl_array_t *stmts = (jl_array_t*)func->code; + jl_resolve_globals_in_ir(stmts, def->module, linfo->sparam_vals, 1); } else { // Lower the user's expression and resolve references to the type parameters diff --git a/test/opaque_closure.jl b/test/opaque_closure.jl index 2dd676d4d8951..65ad6e0600f7f 100644 --- a/test/opaque_closure.jl +++ b/test/opaque_closure.jl @@ -153,3 +153,30 @@ mk_va_opaque() = @opaque (x...)->x # OpaqueClosure show method @test repr(@opaque x->1) == "(::Any)::Any->◌" + +# Opaque closure in CodeInfo returned from generated functions +function mk_ocg(args...) + ci = @code_lowered const_int() + cig = Meta.lower(@__MODULE__, Expr(:new_opaque_closure, Tuple{}, false, Any, Any, + Expr(:opaque_closure_method, 0, lno, ci))).args[1] + cig.slotnames = Symbol[Symbol("#self#")] + cig.slottypes = Any[Any] + cig.slotflags = UInt8[0x00] + cig +end + +@eval function oc_trivial_generated() + $(Expr(:meta, :generated_only)) + $(Expr(:meta, + :generated, + Expr(:new, + Core.GeneratedFunctionStub, + :mk_ocg, + Any[:oc_trivial_generated], + Any[], + @__LINE__, + QuoteNode(Symbol(@__FILE__)), + true))) +end +@test isa(oc_trivial_generated(), Core.OpaqueClosure{Tuple{}, Any}) +@test oc_trivial_generated()() == 1 From af353ecb76310589f3baf3e746ee35c7e894672d Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Fri, 5 Feb 2021 18:25:38 -0500 Subject: [PATCH 236/239] Small improvements to Timer (#39510) * delay launching Task until just before it is needed This is a performance/memory optimization: previously, it would start running at an indeterminate time between when it was defined and when it was needed, possibly wasting memory until then. * Timer: don't create a one-shot timer * Timer: Don't fail silently when callback fails Co-authored-by: Jameson Nash --- base/asyncevent.jl | 26 +++++++++++++++++++------- base/condition.jl | 11 +++++++++-- test/channels.jl | 7 +++++++ 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/base/asyncevent.jl b/base/asyncevent.jl index 234552e635e2c..c8d2c404b0a09 100644 --- a/base/asyncevent.jl +++ b/base/asyncevent.jl @@ -43,10 +43,13 @@ the async condition object itself. """ function AsyncCondition(cb::Function) async = AsyncCondition() - @async while _trywait(async) - cb(async) - isopen(async) || return - end + t = @task while _trywait(async) + cb(async) + isopen(async) || return + end + lock(async.cond) + _wait2(async.cond, t) + unlock(async.cond) return async end @@ -72,7 +75,7 @@ mutable struct Timer timeout ≥ 0 || throw(ArgumentError("timer cannot have negative timeout of $timeout seconds")) interval ≥ 0 || throw(ArgumentError("timer cannot have negative repeat interval of $interval seconds")) timeout = UInt64(round(timeout * 1000)) + 1 - interval = UInt64(round(interval * 1000)) + interval = UInt64(ceil(interval * 1000)) loop = eventloop() this = new(Libc.malloc(_sizeof_uv_timer), ThreadSynchronizer(), true, false) @@ -248,10 +251,19 @@ julia> begin """ function Timer(cb::Function, timeout::Real; interval::Real=0.0) timer = Timer(timeout, interval=interval) - @async while _trywait(timer) + t = @task while _trywait(timer) + try cb(timer) - isopen(timer) || return + catch err + write(stderr, "Error in Timer:\n") + showerror(stderr, err, catch_backtrace()) + return end + isopen(timer) || return + end + lock(timer.cond) + _wait2(timer.cond, t) + unlock(timer.cond) return timer end diff --git a/base/condition.jl b/base/condition.jl index 0efbd2c897da9..4b9f57e47ab29 100644 --- a/base/condition.jl +++ b/base/condition.jl @@ -78,6 +78,14 @@ islocked(c::GenericCondition) = islocked(c.lock) lock(f, c::GenericCondition) = lock(f, c.lock) unlock(f, c::GenericCondition) = unlock(f, c.lock) +# have waiter wait for c +function _wait2(c::GenericCondition, waiter::Task) + ct = current_task() + assert_havelock(c) + push!(c.waitq, waiter) + return +end + """ wait([x]) @@ -99,8 +107,7 @@ proceeding. """ function wait(c::GenericCondition) ct = current_task() - assert_havelock(c) - push!(c.waitq, ct) + _wait2(c, ct) token = unlockall(c.lock) try return wait() diff --git a/test/channels.jl b/test/channels.jl index 2a13b23b0e969..cfaae3ca3ae32 100644 --- a/test/channels.jl +++ b/test/channels.jl @@ -517,6 +517,13 @@ let a = [] @test a == [1] end +# make sure that we don't accidentally create a one-shot timer +let + t = Timer(t->nothing, 10, interval=0.00001) + @test ccall(:uv_timer_get_repeat, UInt64, (Ptr{Cvoid},), t) == 1 + close(t) +end + # make sure repeating timers work @noinline function make_unrooted_timer(a) t = Timer(0.0, interval = 0.1) From 30afc32fc919e7238ec29aa18b0efb1ea5e5db66 Mon Sep 17 00:00:00 2001 From: Nicholas Bauer Date: Fri, 5 Feb 2021 18:30:49 -0500 Subject: [PATCH 237/239] Add deprecation warning for multiple successive semicolons (#37168) --- NEWS.md | 1 + src/julia-parser.scm | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 13ed6ef10732f..36839b41fa989 100644 --- a/NEWS.md +++ b/NEWS.md @@ -95,6 +95,7 @@ Standard library changes Deprecated or removed --------------------- +- Multiple successive semicolons in an array expresion were previously ignored (e.g. `[1 ;; 2] == [1 ; 2]`). Multiple semicolons are being reserved for future syntax and may have different behavior in a future release. External dependencies diff --git a/src/julia-parser.scm b/src/julia-parser.scm index dbd9c35ff4ff4..0b3f52ca61647 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -1869,7 +1869,15 @@ (fix 'vect vec) ; [x] => (vect x) (fix 'hcat vec)))) ; [x y] => (hcat x y) (case t - ((#\; #\newline) + ((#\;) + (take-token s) + (if (eqv? (peek-token s) #\;) + (parser-depwarn s (string "Multiple semicolons in an array concatenation expression currently have no effect, " + "but may have a new meaning in a future version of Julia.") + "Please remove extra semicolons to preserve forward compatibility e.g. [1;;3] => [1;3].")) + (set! gotnewline #f) + (loop '() (update-outer vec outer))) + ((#\newline) (or gotnewline (take-token s)) (set! gotnewline #f) (loop '() (update-outer vec outer))) From 55baf8a5218cd59f97b011fcdd729e7929ad91cb Mon Sep 17 00:00:00 2001 From: Sebastian Stock <42280794+sostock@users.noreply.github.com> Date: Sat, 6 Feb 2021 03:10:41 +0100 Subject: [PATCH 238/239] Add missing imports to SuiteSparse tests (#39539) --- stdlib/SuiteSparse/test/cholmod.jl | 6 +++++- stdlib/SuiteSparse/test/spqr.jl | 4 +++- stdlib/SuiteSparse/test/umfpack.jl | 24 ++++++++++++++---------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/stdlib/SuiteSparse/test/cholmod.jl b/stdlib/SuiteSparse/test/cholmod.jl index e1efe7f85ee27..020c7129cc56f 100644 --- a/stdlib/SuiteSparse/test/cholmod.jl +++ b/stdlib/SuiteSparse/test/cholmod.jl @@ -1,11 +1,15 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license using SuiteSparse.CHOLMOD +using SuiteSparse using DelimitedFiles using Test using Random using Serialization -using LinearAlgebra: issuccess, PosDefException, ZeroPivotException +using LinearAlgebra: + I, cholesky, cholesky!, det, diag, eigmax, ishermitian, isposdef, issuccess, + issymmetric, ldlt, ldlt!, logdet, norm, opnorm, Diagonal, Hermitian, Symmetric, + PosDefException, ZeroPivotException using SparseArrays using SparseArrays: getcolptr diff --git a/stdlib/SuiteSparse/test/spqr.jl b/stdlib/SuiteSparse/test/spqr.jl index d008bd58201b4..d1802c7ccc3b3 100644 --- a/stdlib/SuiteSparse/test/spqr.jl +++ b/stdlib/SuiteSparse/test/spqr.jl @@ -2,7 +2,9 @@ using SuiteSparse.SPQR using SuiteSparse.CHOLMOD -using LinearAlgebra: rmul!, lmul!, Adjoint, Transpose +using SuiteSparse +using LinearAlgebra: I, istriu, norm, qr, rank, rmul!, lmul!, Adjoint, Transpose +using SparseArrays: sparse, sprandn, spzeros, SparseMatrixCSC @testset "Sparse QR" begin m, n = 100, 10 diff --git a/stdlib/SuiteSparse/test/umfpack.jl b/stdlib/SuiteSparse/test/umfpack.jl index dc17d71a727e0..a4f749f1ce58b 100644 --- a/stdlib/SuiteSparse/test/umfpack.jl +++ b/stdlib/SuiteSparse/test/umfpack.jl @@ -1,8 +1,12 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license +using SuiteSparse.UMFPACK +using SuiteSparse using SuiteSparse: increment! using Serialization -using LinearAlgebra: Adjoint, Transpose, SingularException +using LinearAlgebra: + I, det, issuccess, ldiv!, lu, lu!, Adjoint, Transpose, SingularException, Diagonal +using SparseArrays: nnz, sparse, sprand, sprandn, SparseMatrixCSC @testset "UMFPACK wrappers" begin se33 = sparse(1.0I, 3, 3) @@ -33,11 +37,11 @@ using LinearAlgebra: Adjoint, Transpose, SingularException @test A*x ≈ b z = complex.(b) - x = LinearAlgebra.ldiv!(lua, z) + x = ldiv!(lua, z) @test x ≈ float([1:5;]) @test z === x y = similar(z) - LinearAlgebra.ldiv!(y, lua, complex.(b)) + ldiv!(y, lua, complex.(b)) @test y ≈ x @test A*x ≈ b @@ -48,11 +52,11 @@ using LinearAlgebra: Adjoint, Transpose, SingularException @test A'*x ≈ b z = complex.(b) - x = LinearAlgebra.ldiv!(adjoint(lua), z) + x = ldiv!(adjoint(lua), z) @test x ≈ float([1:5;]) @test x === z y = similar(x) - LinearAlgebra.ldiv!(y, adjoint(lua), complex.(b)) + ldiv!(y, adjoint(lua), complex.(b)) @test y ≈ x @test A'*x ≈ b @@ -60,10 +64,10 @@ using LinearAlgebra: Adjoint, Transpose, SingularException @test x ≈ float([1:5;]) @test transpose(A) * x ≈ b - x = LinearAlgebra.ldiv!(transpose(lua), complex.(b)) + x = ldiv!(transpose(lua), complex.(b)) @test x ≈ float([1:5;]) y = similar(x) - LinearAlgebra.ldiv!(y, transpose(lua), complex.(b)) + ldiv!(y, transpose(lua), complex.(b)) @test y ≈ x @test transpose(A) * x ≈ b @@ -165,9 +169,9 @@ using LinearAlgebra: Adjoint, Transpose, SingularException X = zeros(ComplexF64, N, N) B = complex.(rand(N, N), rand(N, N)) luA, lufA = lu(A), lu(Array(A)) - @test LinearAlgebra.ldiv!(copy(X), luA, B) ≈ LinearAlgebra.ldiv!(copy(X), lufA, B) - @test LinearAlgebra.ldiv!(copy(X), adjoint(luA), B) ≈ LinearAlgebra.ldiv!(copy(X), adjoint(lufA), B) - @test LinearAlgebra.ldiv!(copy(X), transpose(luA), B) ≈ LinearAlgebra.ldiv!(copy(X), transpose(lufA), B) + @test ldiv!(copy(X), luA, B) ≈ ldiv!(copy(X), lufA, B) + @test ldiv!(copy(X), adjoint(luA), B) ≈ ldiv!(copy(X), adjoint(lufA), B) + @test ldiv!(copy(X), transpose(luA), B) ≈ ldiv!(copy(X), transpose(lufA), B) end @testset "singular matrix" begin From 75ede4ae5dcfbba8b13c11e3129ebcb01680ca1b Mon Sep 17 00:00:00 2001 From: jaakkor2 Date: Sat, 6 Feb 2021 11:08:38 +0200 Subject: [PATCH 239/239] Remove extra close parenthesis in show of DiffFile (#39545) Minor cosmetic change to remove an extra close parentheseis `)` from the Oid-line. --- stdlib/LibGit2/src/types.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/LibGit2/src/types.jl b/stdlib/LibGit2/src/types.jl index 3c29fb891eecb..129f526812926 100644 --- a/stdlib/LibGit2/src/types.jl +++ b/stdlib/LibGit2/src/types.jl @@ -520,7 +520,7 @@ end function Base.show(io::IO, df::DiffFile) println(io, "DiffFile:") - println(io, "Oid: $(df.id))") + println(io, "Oid: $(df.id)") println(io, "Path: $(df.path)") println(io, "Size: $(df.size)") end