Skip to content

Commit 2f7972b

Browse files
authored
Merge branch 'master' into pv-compiler-timings-lock
2 parents e161d91 + c711f67 commit 2f7972b

File tree

190 files changed

+3784
-2211
lines changed

Some content is hidden

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

190 files changed

+3784
-2211
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ The process of [creating a patch release](https://docs.julialang.org/en/v1/devdo
293293
6. Ping `@JuliaLang/releases` to tag the patch release and update the website.
294294

295295
7. Open a pull request that bumps the version of the relevant minor release to the
296-
next prerelase patch version, e.g. as in [this pull request](https://github.com/JuliaLang/julia/pull/37724).
296+
next prerelease patch version, e.g. as in [this pull request](https://github.com/JuliaLang/julia/pull/37724).
297297

298298
Step 2 above, i.e. backporting commits to the `backports-release-X.Y` branch, has largely
299299
been automated via [`Backporter`](https://github.com/KristofferC/Backporter): Backporter

HISTORY.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ Language changes
2525
Compiler/Runtime improvements
2626
-----------------------------
2727

28+
* Time to first execution (TTFX, sometimes called time to first plot) is greatly reduced. Package precompilation now
29+
saves native code into a "pkgimage", meaning that code generated during the precompilation process will not
30+
require compilation after package load. Use of pkgimages can be disabled via `--pkgimages=no` ([#44527]) ([#47184]).
2831
* The known quadratic behavior of type inference is now fixed and inference uses less memory in general.
2932
Certain edge cases with auto-generated long functions (e.g. ModelingToolkit.jl with partial
3033
differential equations and large causal models) should see significant compile-time improvements ([#45276], [#45404]).
@@ -65,8 +68,6 @@ New library functions
6568
---------------------
6669

6770
* New function `Iterators.flatmap` ([#44792]).
68-
* New helper `Splat(f)` which acts like `x -> f(x...)`, with pretty printing for
69-
inspecting which function `f` was originally wrapped ([#42717]).
7071
* New `pkgversion(m::Module)` function to get the version of the package that loaded
7172
a given module, similar to `pkgdir(m::Module)` ([#45607]).
7273
* New function `stack(x)` which generalises `reduce(hcat, x::Vector{<:Vector})` to any dimensionality,
@@ -95,6 +96,8 @@ Standard library changes
9596
* `@kwdef` is now exported and added to the public API ([#46273]).
9697
* An issue with order of operations in `fld1` is now fixed ([#28973]).
9798
* Sorting is now always stable by default, as `QuickSort` was stabilized ([#45222]).
99+
* `Base.splat` is now exported. The return value is now a `Base.Splat` instead
100+
of an anonymous function, which allows for pretty printing ([#42717]).
98101

99102
#### Package Manager
100103

@@ -178,7 +181,6 @@ Standard library changes
178181
Deprecated or removed
179182
---------------------
180183

181-
* Unexported `splat` is deprecated in favor of exported `Splat`, which has pretty printing of the wrapped function ([#42717]).
182184

183185
External dependencies
184186
---------------------

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ Standard library changes
8282
#### DelimitedFiles
8383

8484

85+
#### InteractiveUtils
86+
87+
* `code_native` and `@code_native` now default to intel syntax instead of AT&T.
88+
8589
Deprecated or removed
8690
---------------------
8791

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ end
936936

937937
## from general iterable to any array
938938

939-
# This is `@Experimental.max_methods 1 function copyto! end`, which is not
939+
# This is `Experimental.@max_methods 1 function copyto! end`, which is not
940940
# defined at this point in bootstrap.
941941
typeof(function copyto! end).name.max_methods = UInt8(1)
942942

base/abstractdict.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ function convert(::Type{T}, x::AbstractDict) where T<:AbstractDict
575575
end
576576

577577
# hashing objects by identity
578-
_tablesz(x::T) where T <: Integer = x < 16 ? T(16) : one(T)<<((sizeof(T)<<3)-leading_zeros(x-one(T)))
578+
_tablesz(x::T) where T <: Integer = x < 16 ? T(16) : one(T)<<(top_set_bit(x-one(T)))
579579

580580
TP{K,V} = Union{Type{Tuple{K,V}},Type{Pair{K,V}}}
581581

base/binaryplatforms.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ function detect_libstdcxx_version(max_minor_version::Int=30)
873873
end
874874

875875
# Brute-force our way through GLIBCXX_* symbols to discover which version we're linked against
876-
hdl = Libdl.dlopen(first(libstdcxx_paths))
876+
hdl = Libdl.dlopen(first(libstdcxx_paths))::Ptr{Cvoid}
877877
# Try all GLIBCXX versions down to GCC v4.8:
878878
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
879879
for minor_version in max_minor_version:-1:18

base/bitarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,12 +1545,12 @@ function unsafe_bitfindprev(Bc::Vector{UInt64}, start::Int)
15451545

15461546
@inbounds begin
15471547
if Bc[chunk_start] & mask != 0
1548-
return (chunk_start-1) << 6 + (64 - leading_zeros(Bc[chunk_start] & mask))
1548+
return (chunk_start-1) << 6 + (top_set_bit(Bc[chunk_start] & mask))
15491549
end
15501550

15511551
for i = (chunk_start-1):-1:1
15521552
if Bc[i] != 0
1553-
return (i-1) << 6 + (64 - leading_zeros(Bc[i]))
1553+
return (i-1) << 6 + (top_set_bit(Bc[i]))
15541554
end
15551555
end
15561556
end

base/boot.jl

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -414,25 +414,13 @@ eval(Core, quote
414414
end
415415
LineInfoNode(mod::Module, @nospecialize(method), file::Symbol, line::Int32, inlined_at::Int32) =
416416
$(Expr(:new, :LineInfoNode, :mod, :method, :file, :line, :inlined_at))
417-
GlobalRef(m::Module, s::Symbol, binding::Ptr{Nothing}) = $(Expr(:new, :GlobalRef, :m, :s, :binding))
418417
SlotNumber(n::Int) = $(Expr(:new, :SlotNumber, :n))
419418
TypedSlot(n::Int, @nospecialize(t)) = $(Expr(:new, :TypedSlot, :n, :t))
420419
PhiNode(edges::Array{Int32, 1}, values::Array{Any, 1}) = $(Expr(:new, :PhiNode, :edges, :values))
421420
PiNode(@nospecialize(val), @nospecialize(typ)) = $(Expr(:new, :PiNode, :val, :typ))
422421
PhiCNode(values::Array{Any, 1}) = $(Expr(:new, :PhiCNode, :values))
423422
UpsilonNode(@nospecialize(val)) = $(Expr(:new, :UpsilonNode, :val))
424423
UpsilonNode() = $(Expr(:new, :UpsilonNode))
425-
function CodeInstance(
426-
mi::MethodInstance, @nospecialize(rettype), @nospecialize(inferred_const),
427-
@nospecialize(inferred), const_flags::Int32, min_world::UInt, max_world::UInt,
428-
ipo_effects::UInt32, effects::UInt32, @nospecialize(argescapes#=::Union{Nothing,Vector{ArgEscapeInfo}}=#),
429-
relocatability::UInt8)
430-
return ccall(:jl_new_codeinst, Ref{CodeInstance},
431-
(Any, Any, Any, Any, Int32, UInt, UInt, UInt32, UInt32, Any, UInt8),
432-
mi, rettype, inferred_const, inferred, const_flags, min_world, max_world,
433-
ipo_effects, effects, argescapes,
434-
relocatability)
435-
end
436424
Const(@nospecialize(v)) = $(Expr(:new, :Const, :v))
437425
# NOTE the main constructor is defined within `Core.Compiler`
438426
_PartialStruct(@nospecialize(typ), fields::Array{Any, 1}) = $(Expr(:new, :PartialStruct, :typ, :fields))
@@ -441,6 +429,18 @@ eval(Core, quote
441429
MethodMatch(@nospecialize(spec_types), sparams::SimpleVector, method::Method, fully_covers::Bool) = $(Expr(:new, :MethodMatch, :spec_types, :sparams, :method, :fully_covers))
442430
end)
443431

432+
function CodeInstance(
433+
mi::MethodInstance, @nospecialize(rettype), @nospecialize(inferred_const),
434+
@nospecialize(inferred), const_flags::Int32, min_world::UInt, max_world::UInt,
435+
ipo_effects::UInt32, effects::UInt32, @nospecialize(argescapes#=::Union{Nothing,Vector{ArgEscapeInfo}}=#),
436+
relocatability::UInt8)
437+
return ccall(:jl_new_codeinst, Ref{CodeInstance},
438+
(Any, Any, Any, Any, Int32, UInt, UInt, UInt32, UInt32, Any, UInt8),
439+
mi, rettype, inferred_const, inferred, const_flags, min_world, max_world,
440+
ipo_effects, effects, argescapes,
441+
relocatability)
442+
end
443+
GlobalRef(m::Module, s::Symbol) = ccall(:jl_module_globalref, Ref{GlobalRef}, (Any, Any), m, s)
444444
Module(name::Symbol=:anonymous, std_imports::Bool=true, default_names::Bool=true) = ccall(:jl_f_new_module, Ref{Module}, (Any, Bool, Bool), name, std_imports, default_names)
445445

446446
function _Task(@nospecialize(f), reserved_stack::Int, completion_future)
@@ -524,12 +524,12 @@ module IR
524524
export CodeInfo, MethodInstance, CodeInstance, GotoNode, GotoIfNot, ReturnNode,
525525
NewvarNode, SSAValue, Slot, SlotNumber, TypedSlot, Argument,
526526
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode,
527-
Const, PartialStruct, InterConditional, PartialOpaque
527+
Const, PartialStruct
528528

529529
import Core: CodeInfo, MethodInstance, CodeInstance, GotoNode, GotoIfNot, ReturnNode,
530530
NewvarNode, SSAValue, Slot, SlotNumber, TypedSlot, Argument,
531531
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode,
532-
Const, PartialStruct, InterConditional, PartialOpaque
532+
Const, PartialStruct
533533

534534
end
535535

@@ -818,8 +818,6 @@ Unsigned(x::Union{Float16, Float32, Float64, Bool}) = UInt(x)
818818
Integer(x::Integer) = x
819819
Integer(x::Union{Float16, Float32, Float64}) = Int(x)
820820

821-
GlobalRef(m::Module, s::Symbol) = GlobalRef(m, s, bitcast(Ptr{Nothing}, 0))
822-
823821
# Binding for the julia parser, called as
824822
#
825823
# Core._parse(text, filename, lineno, offset, options)

base/cmd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function cstr(s)
230230
if Base.containsnul(s)
231231
throw(ArgumentError("strings containing NUL cannot be passed to spawned processes"))
232232
end
233-
return String(s)
233+
return String(s)::String
234234
end
235235

236236
# convert various env representations into an array of "key=val" strings

0 commit comments

Comments
 (0)