Skip to content

Commit c7bceb6

Browse files
authored
Backports for 1.10.3 (#53714)
Backported PRs: - [x] #50759 <!-- Fix outdated usage of scrubbing for log test failures --> - [x] #51830 <!-- Add version string to sysimg triple --> - [x] #53273 <!-- [REPL] Fix typo in using/import completion --> - [x] #53499 <!-- Avoid compiler warning about redefining jl_globalref_t --> - [x] #53424 <!-- yet more atomics & cache-line fixes on work-stealing queue --> - [x] #53596 <!-- build: remove extra .a file --> - [x] #53516 <!-- permit NamedTuple{<:Any, Union{}} to be created --> - [x] #53643 <!-- Bump CSL to 1.1.1 to fix libgomp bug --> - [x] #53655 <!-- Change tbaa of ptr_phi to tbaa_value --> - [x] #53391 <!-- Default to the medium code model in x86 linux --> - [x] #53809 <!-- Add missing GC_POP() in emit_cfunction --> - [x] #53961 <!-- `LazyString` in `LinearAlgebra.checksquare` error message --> - [x] #52913 <!-- Added docstring for Artifacts.jl --> - [x] #53553 <!-- typeintersect: fix `UnionAll` unaliasing bug caused by
2 parents bd47eca + 5cf5146 commit c7bceb6

File tree

47 files changed

+331
-202
lines changed

Some content is hidden

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

47 files changed

+331
-202
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
282282
-$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
283283
endif
284284
-$(INSTALL_M) $(wildcard $(build_private_libdir)/*.a) $(DESTDIR)$(private_libdir)/
285+
-rm -f $(DESTDIR)$(private_libdir)/sys-o.a
285286

286287
# We have a single exception; we want 7z.dll to live in private_libexecdir,
287288
# not bindir, so that 7z.exe can find it.

base/boot.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,8 @@ eval(Core, :(NamedTuple{names}(args::Tuple) where {names} =
624624

625625
using .Intrinsics: sle_int, add_int
626626

627-
eval(Core, :(NamedTuple{names,T}(args::T) where {names, T <: Tuple} =
628-
$(Expr(:splatnew, :(NamedTuple{names,T}), :args))))
627+
eval(Core, :((NT::Type{NamedTuple{names,T}})(args::T) where {names, T <: Tuple} =
628+
$(Expr(:splatnew, :NT, :args))))
629629

630630
# constructors for built-in types
631631

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2565,7 +2565,7 @@ function refine_partial_type(@nospecialize t)
25652565
# if the first/second parameter of `NamedTuple` is known to be empty,
25662566
# the second/first argument should also be empty tuple type,
25672567
# so refine it here
2568-
return Const(NamedTuple())
2568+
return Const((;))
25692569
end
25702570
return t
25712571
end

base/namedtuple.jl

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,24 @@ Core.NamedTuple
112112

113113
if nameof(@__MODULE__) === :Base
114114

115-
@eval function NamedTuple{names,T}(args::Tuple) where {names, T <: Tuple}
115+
@eval function (NT::Type{NamedTuple{names,T}})(args::Tuple) where {names, T <: Tuple}
116116
if length(args) != length(names::Tuple)
117117
throw(ArgumentError("Wrong number of arguments to named tuple constructor."))
118118
end
119119
# Note T(args) might not return something of type T; e.g.
120120
# Tuple{Type{Float64}}((Float64,)) returns a Tuple{DataType}
121-
$(Expr(:splatnew, :(NamedTuple{names,T}), :(T(args))))
121+
$(Expr(:splatnew, :NT, :(T(args))))
122122
end
123123

124-
function NamedTuple{names, T}(nt::NamedTuple) where {names, T <: Tuple}
124+
function (NT::Type{NamedTuple{names, T}})(nt::NamedTuple) where {names, T <: Tuple}
125125
if @generated
126-
Expr(:new, :(NamedTuple{names, T}),
127-
Any[ :(let Tn = fieldtype(T, $n),
126+
Expr(:new, :NT,
127+
Any[ :(let Tn = fieldtype(NT, $n),
128128
ntn = getfield(nt, $(QuoteNode(names[n])))
129129
ntn isa Tn ? ntn : convert(Tn, ntn)
130130
end) for n in 1:length(names) ]...)
131131
else
132-
NamedTuple{names, T}(map(Fix1(getfield, nt), names))
132+
NT(map(Fix1(getfield, nt), names))
133133
end
134134
end
135135

@@ -145,14 +145,11 @@ function NamedTuple{names}(nt::NamedTuple) where {names}
145145
end
146146
end
147147

148-
NamedTuple{names, T}(itr) where {names, T <: Tuple} = NamedTuple{names, T}(T(itr))
149-
NamedTuple{names}(itr) where {names} = NamedTuple{names}(Tuple(itr))
148+
(NT::Type{NamedTuple{names, T}})(itr) where {names, T <: Tuple} = NT(T(itr))
149+
(NT::Type{NamedTuple{names}})(itr) where {names} = NT(Tuple(itr))
150150

151151
NamedTuple(itr) = (; itr...)
152152

153-
# avoids invalidating Union{}(...)
154-
NamedTuple{names, Union{}}(itr::Tuple) where {names} = throw(MethodError(NamedTuple{names, Union{}}, (itr,)))
155-
156153
end # if Base
157154

158155
# Like NamedTuple{names, T} as a constructor, but omits the additional

base/reshapedarray.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ offset_if_vec(i::Integer, axs::Tuple) = i
228228

229229
@inline function isassigned(A::ReshapedArrayLF, index::Int)
230230
@boundscheck checkbounds(Bool, A, index) || return false
231-
@inbounds ret = isassigned(parent(A), index)
231+
indexparent = index - firstindex(A) + firstindex(parent(A))
232+
@inbounds ret = isassigned(parent(A), indexparent)
232233
ret
233234
end
234235
@inline function isassigned(A::ReshapedArray{T,N}, indices::Vararg{Int, N}) where {T,N}
@@ -241,7 +242,8 @@ end
241242

242243
@inline function getindex(A::ReshapedArrayLF, index::Int)
243244
@boundscheck checkbounds(A, index)
244-
@inbounds ret = parent(A)[index]
245+
indexparent = index - firstindex(A) + firstindex(parent(A))
246+
@inbounds ret = parent(A)[indexparent]
245247
ret
246248
end
247249
@inline function getindex(A::ReshapedArray{T,N}, indices::Vararg{Int,N}) where {T,N}
@@ -265,7 +267,8 @@ end
265267

266268
@inline function setindex!(A::ReshapedArrayLF, val, index::Int)
267269
@boundscheck checkbounds(A, index)
268-
@inbounds parent(A)[index] = val
270+
indexparent = index - firstindex(A) + firstindex(parent(A))
271+
@inbounds parent(A)[indexparent] = val
269272
val
270273
end
271274
@inline function setindex!(A::ReshapedArray{T,N}, val, indices::Vararg{Int,N}) where {T,N}

deps/JuliaSyntax.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
JULIASYNTAX_BRANCH = main
1+
JULIASYNTAX_BRANCH = release-0.4
22
JULIASYNTAX_SHA1 = 4f1731d6ce7c2465fc21ea245110b7a39f34658a
33
JULIASYNTAX_GIT_URL := https://github.com/JuliaLang/JuliaSyntax.jl.git
44
JULIASYNTAX_TAR_URL = https://api.github.com/repos/JuliaLang/JuliaSyntax.jl/tarball/$1

deps/checksums/NetworkOptions-0bd33455cf3c77f2f87bf64167b64611dc5ff128.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/NetworkOptions-0bd33455cf3c77f2f87bf64167b64611dc5ff128.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d2ccb9b91b0700bfb5ac7c01a03b4322
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
051223ab45dce692c0bbea0755cc0057bb3322a40659c092007799932a10cc23e80ee6b88fa0d86f28af5e7fe5a455cc9fb8267c76af0cd2b425cf2718629e91

0 commit comments

Comments
 (0)