Skip to content

Commit

Permalink
Merge branch 'master' into pv-compiler-timings-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Jan 18, 2023
2 parents e161d91 + c711f67 commit 2f7972b
Show file tree
Hide file tree
Showing 190 changed files with 3,784 additions and 2,211 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ The process of [creating a patch release](https://docs.julialang.org/en/v1/devdo
6. Ping `@JuliaLang/releases` to tag the patch release and update the website.

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

Step 2 above, i.e. backporting commits to the `backports-release-X.Y` branch, has largely
been automated via [`Backporter`](https://github.com/KristofferC/Backporter): Backporter
Expand Down
8 changes: 5 additions & 3 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Language changes
Compiler/Runtime improvements
-----------------------------

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

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

#### Package Manager

Expand Down Expand Up @@ -178,7 +181,6 @@ Standard library changes
Deprecated or removed
---------------------

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

External dependencies
---------------------
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ Standard library changes
#### DelimitedFiles


#### InteractiveUtils

* `code_native` and `@code_native` now default to intel syntax instead of AT&T.

Deprecated or removed
---------------------

Expand Down
2 changes: 1 addition & 1 deletion base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ end

## from general iterable to any array

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

Expand Down
2 changes: 1 addition & 1 deletion base/abstractdict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ function convert(::Type{T}, x::AbstractDict) where T<:AbstractDict
end

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

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

Expand Down
2 changes: 1 addition & 1 deletion base/binaryplatforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ function detect_libstdcxx_version(max_minor_version::Int=30)
end

# Brute-force our way through GLIBCXX_* symbols to discover which version we're linked against
hdl = Libdl.dlopen(first(libstdcxx_paths))
hdl = Libdl.dlopen(first(libstdcxx_paths))::Ptr{Cvoid}
# Try all GLIBCXX versions down to GCC v4.8:
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
for minor_version in max_minor_version:-1:18
Expand Down
4 changes: 2 additions & 2 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1545,12 +1545,12 @@ function unsafe_bitfindprev(Bc::Vector{UInt64}, start::Int)

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

for i = (chunk_start-1):-1:1
if Bc[i] != 0
return (i-1) << 6 + (64 - leading_zeros(Bc[i]))
return (i-1) << 6 + (top_set_bit(Bc[i]))
end
end
end
Expand Down
30 changes: 14 additions & 16 deletions base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,25 +414,13 @@ eval(Core, quote
end
LineInfoNode(mod::Module, @nospecialize(method), file::Symbol, line::Int32, inlined_at::Int32) =
$(Expr(:new, :LineInfoNode, :mod, :method, :file, :line, :inlined_at))
GlobalRef(m::Module, s::Symbol, binding::Ptr{Nothing}) = $(Expr(:new, :GlobalRef, :m, :s, :binding))
SlotNumber(n::Int) = $(Expr(:new, :SlotNumber, :n))
TypedSlot(n::Int, @nospecialize(t)) = $(Expr(:new, :TypedSlot, :n, :t))
PhiNode(edges::Array{Int32, 1}, values::Array{Any, 1}) = $(Expr(:new, :PhiNode, :edges, :values))
PiNode(@nospecialize(val), @nospecialize(typ)) = $(Expr(:new, :PiNode, :val, :typ))
PhiCNode(values::Array{Any, 1}) = $(Expr(:new, :PhiCNode, :values))
UpsilonNode(@nospecialize(val)) = $(Expr(:new, :UpsilonNode, :val))
UpsilonNode() = $(Expr(:new, :UpsilonNode))
function CodeInstance(
mi::MethodInstance, @nospecialize(rettype), @nospecialize(inferred_const),
@nospecialize(inferred), const_flags::Int32, min_world::UInt, max_world::UInt,
ipo_effects::UInt32, effects::UInt32, @nospecialize(argescapes#=::Union{Nothing,Vector{ArgEscapeInfo}}=#),
relocatability::UInt8)
return ccall(:jl_new_codeinst, Ref{CodeInstance},
(Any, Any, Any, Any, Int32, UInt, UInt, UInt32, UInt32, Any, UInt8),
mi, rettype, inferred_const, inferred, const_flags, min_world, max_world,
ipo_effects, effects, argescapes,
relocatability)
end
Const(@nospecialize(v)) = $(Expr(:new, :Const, :v))
# NOTE the main constructor is defined within `Core.Compiler`
_PartialStruct(@nospecialize(typ), fields::Array{Any, 1}) = $(Expr(:new, :PartialStruct, :typ, :fields))
Expand All @@ -441,6 +429,18 @@ eval(Core, quote
MethodMatch(@nospecialize(spec_types), sparams::SimpleVector, method::Method, fully_covers::Bool) = $(Expr(:new, :MethodMatch, :spec_types, :sparams, :method, :fully_covers))
end)

function CodeInstance(
mi::MethodInstance, @nospecialize(rettype), @nospecialize(inferred_const),
@nospecialize(inferred), const_flags::Int32, min_world::UInt, max_world::UInt,
ipo_effects::UInt32, effects::UInt32, @nospecialize(argescapes#=::Union{Nothing,Vector{ArgEscapeInfo}}=#),
relocatability::UInt8)
return ccall(:jl_new_codeinst, Ref{CodeInstance},
(Any, Any, Any, Any, Int32, UInt, UInt, UInt32, UInt32, Any, UInt8),
mi, rettype, inferred_const, inferred, const_flags, min_world, max_world,
ipo_effects, effects, argescapes,
relocatability)
end
GlobalRef(m::Module, s::Symbol) = ccall(:jl_module_globalref, Ref{GlobalRef}, (Any, Any), m, s)
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)

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

import Core: CodeInfo, MethodInstance, CodeInstance, GotoNode, GotoIfNot, ReturnNode,
NewvarNode, SSAValue, Slot, SlotNumber, TypedSlot, Argument,
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode,
Const, PartialStruct, InterConditional, PartialOpaque
Const, PartialStruct

end

Expand Down Expand Up @@ -818,8 +818,6 @@ Unsigned(x::Union{Float16, Float32, Float64, Bool}) = UInt(x)
Integer(x::Integer) = x
Integer(x::Union{Float16, Float32, Float64}) = Int(x)

GlobalRef(m::Module, s::Symbol) = GlobalRef(m, s, bitcast(Ptr{Nothing}, 0))

# Binding for the julia parser, called as
#
# Core._parse(text, filename, lineno, offset, options)
Expand Down
2 changes: 1 addition & 1 deletion base/cmd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function cstr(s)
if Base.containsnul(s)
throw(ArgumentError("strings containing NUL cannot be passed to spawned processes"))
end
return String(s)
return String(s)::String
end

# convert various env representations into an array of "key=val" strings
Expand Down
Loading

0 comments on commit 2f7972b

Please sign in to comment.