Skip to content

Commit

Permalink
Merge branch 'master' into scoped-export
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner committed Sep 5, 2023
2 parents 1a6e3dc + fbf73f4 commit ebcdf24
Show file tree
Hide file tree
Showing 245 changed files with 6,321 additions and 2,199 deletions.
103 changes: 78 additions & 25 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Julia v1.10 Release Notes
=========================

New language features
---------------------

* JuliaSyntax.jl is now used as the default parser, providing better diagnostics and faster
parsing. Set environment variable `JULIA_USE_FLISP_PARSER` to `1` to switch back to the old
parser if necessary (and if you find this necessary, please file an issue) ([#46372]).
* `` (U+297A, `\leftarrowsubset`) and `` (U+2977, `\leftarrowless`)
may now be used as binary operators with arrow precedence. ([#45962])
* `` (U+297A, `\leftarrowsubset`) and `` (U+2977, `\leftarrowless`) may now be used as
binary operators with arrow precedence ([#45962]).

Language changes
----------------
Expand All @@ -20,58 +21,70 @@ Language changes
that significantly improves load and inference times for heavily overloaded methods that
dispatch on Types (such as traits and constructors).
* The "h bar" `` (`\hslash` U+210F) character is now treated as equivalent to `ħ` (`\hbar` U+0127).
* The `@simd` macro now has a more limited and clearer semantics, it only enables reordering and contraction
* The `@simd` macro now has more limited and clearer semantics: it only enables reordering and contraction
of floating-point operations, instead of turning on all "fastmath" optimizations.
If you observe performance regressions due to this change, you can recover previous behavior with `@fastmath @simd`,
if you are OK with all the optimizations enabled by the `@fastmath` macro. ([#49405])
if you are OK with all the optimizations enabled by the `@fastmath` macro ([#49405]).
* When a method with keyword arguments is displayed in the stack trace view, the textual
representation of the keyword arguments' types is simplified using the new
representation of the keyword arguments' type is simplified using the new
`@Kwargs{key1::Type1, ...}` macro syntax ([#49959]).

Compiler/Runtime improvements
-----------------------------

* The `@pure` macro is now deprecated. Use `Base.@assume_effects :foldable` instead ([#48682]).
* The mark phase of the Garbage Collector is now multi-threaded ([#48600]).
* Updated GC heuristics to count allocated pages instead of object sizes ([#50144]). This should help
some programs that consumed excessive memory before.
* The mark phase of the garbage collector is now multi-threaded ([#48600]).
* [JITLink](https://llvm.org/docs/JITLink.html) is enabled by default on Linux aarch64 when Julia is linked to LLVM 15 or later versions ([#49745]).
This should resolve many segmentation faults previously observed on this platform.

Command-line option changes
---------------------------

* New option `--gcthreads` to set how many threads will be used by the Garbage Collector ([#48600]).
The default is set to `N/2` where `N` is the amount of worker threads (`--threads`) used by Julia.
* New option `--gcthreads` to set how many threads will be used by the garbage collector ([#48600]).
The default is `N/2` where `N` is the number of worker threads (`--threads`) used by Julia.

Build system changes
--------------------

* SparseArrays and SuiteSparse are no longer included in the default system image, so the core
language no longer contains GPL libraries. However, these libraries are still included
alongside the language in the standard binary distribution ([#44247], [#48979], [#49266]).

New library functions
---------------------
* `tanpi` is now defined. It computes tan(πx) more accurately than `tan(pi*x)` ([#48575]).

* `tanpi` is now defined. It computes tan(π*x) more accurately than `tan(pi*x)` ([#48575]).
* `fourthroot(x)` is now defined in `Base.Math` and can be used to compute the fourth root of `x`.
It can also be accessed using the unicode character ``, which can be typed by `\fourthroot<tab>` ([#48899]).
* `Libc.memmove`, `Libc.memset`, and `Libc.memcpy` are now defined, whose functionality matches that of their respective C calls.
* `Base.isprecompiled(pkg::PkgId)` to identify whether a package has already been precompiled ([#50218]).
* `Base.isprecompiled(pkg::PkgId)` has been added, to identify whether a package has already been precompiled ([#50218]).

New library features
--------------------
* The `initialized=true` keyword assignment for `sortperm!` and `partialsortperm!`
is now a no-op ([#47979]). It previously exposed unsafe behavior ([#47977]).

* `binomial(x, k)` now supports non-integer `x` ([#48124]).
* A `CartesianIndex` is now treated as a "scalar" for broadcasting ([#47044]).
* `printstyled` now supports italic output ([#45164]).
* `parent` and `parentindices` support `SubString`s
* `parent` and `parentindices` support `SubString`s.
* `replace(string, pattern...)` now supports an optional `IO` argument to
write the output to a stream rather than returning a string ([#48625]).
* `startswith` now supports seekable `IO` streams ([#43055]).

Standard library changes
------------------------

* `startswith` now supports seekable `IO` streams ([#43055])
* printing integral `Rational`s will skip the denominator in `Rational`-typed IO context (e.g. in `Arrays`) ([#45396])
* The `initialized=true` keyword assignment for `sortperm!` and `partialsortperm!`
is now a no-op ([#47979]). It previously exposed unsafe behavior ([#47977]).
* Printing integral `Rational`s will skip the denominator in `Rational`-typed IO context (e.g. in arrays) ([#45396]).

#### Package Manager

* `Pkg.precompile` now accepts `timing` as a keyword argument which displays per package timing information for precompilation (e.g. `Pkg.precompile(timing=true)`)
* `Pkg.precompile` now accepts `timing` as a keyword argument which displays per package timing information for precompilation (e.g. `Pkg.precompile(timing=true)`).

#### LinearAlgebra

* `AbstractQ` no longer subtypes to `AbstractMatrix`. Moreover, `adjoint(Q::AbstractQ)`
* `AbstractQ` no longer subtypes `AbstractMatrix`. Moreover, `adjoint(Q::AbstractQ)`
no longer wraps `Q` in an `Adjoint` type, but instead in an `AdjointQ`, that itself
subtypes `AbstractQ`. This change accounts for the fact that typically `AbstractQ`
instances behave like function-based, matrix-backed linear operators, and hence don't
Expand All @@ -89,12 +102,13 @@ Standard library changes
* The `norm` of the adjoint or transpose of an `AbstractMatrix` now returns the norm of the
parent matrix by default, matching the current behaviour for `AbstractVector`s ([#49020]).
* `eigen(A, B)` and `eigvals(A, B)`, where one of `A` or `B` is symmetric or Hermitian,
are now fully supported ([#49533])
are now fully supported ([#49533]).
* `eigvals/eigen(A, cholesky(B))` now computes the generalized eigenvalues (`eigen`: and eigenvectors)
of `A` and `B` via Cholesky decomposition for positive definite `B`. Note: The second argument is
the output of `cholesky`.

#### Printf

* Format specifiers now support dynamic width and precision, e.g. `%*s` and `%*.*g` ([#40105]).

#### REPL
Expand All @@ -105,13 +119,53 @@ Standard library changes
#### Test

* The `@test_broken` macro (or `@test` with `broken=true`) now complains if the test expression returns a
non-boolean value in the same way as a non-broken test. ([#47804])
* When a call to `@test` fails or errors inside a function, a larger stacktrace is now printed such that the location of the test within a `@testset` can be retrieved ([#49451])
non-boolean value in the same way as a non-broken test ([#47804]).
* When a call to `@test` fails or errors inside a function, a larger stacktrace is now printed such that the location of the test within a `@testset` can be retrieved ([#49451]).

#### InteractiveUtils

* `code_native` and `@code_native` now default to intel syntax instead of AT&T.
* `@time_imports` now shows the timing of any module `__init__()`s that are run ([#49529])
* `code_native` and `@code_native` now default to intel syntax instead of AT&T.
* `@time_imports` now shows the timing of any module `__init__()`s that are run ([#49529]).

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

* The `@pure` macro is now deprecated. Use `Base.@assume_effects :foldable` instead ([#48682]).

<!--- generated by NEWS-update.jl: -->
[#31836]: https://github.com/JuliaLang/julia/issues/31836
[#40105]: https://github.com/JuliaLang/julia/issues/40105
[#43055]: https://github.com/JuliaLang/julia/issues/43055
[#44247]: https://github.com/JuliaLang/julia/issues/44247
[#45164]: https://github.com/JuliaLang/julia/issues/45164
[#45396]: https://github.com/JuliaLang/julia/issues/45396
[#45962]: https://github.com/JuliaLang/julia/issues/45962
[#46196]: https://github.com/JuliaLang/julia/issues/46196
[#46372]: https://github.com/JuliaLang/julia/issues/46372
[#46874]: https://github.com/JuliaLang/julia/issues/46874
[#47044]: https://github.com/JuliaLang/julia/issues/47044
[#47804]: https://github.com/JuliaLang/julia/issues/47804
[#47977]: https://github.com/JuliaLang/julia/issues/47977
[#47979]: https://github.com/JuliaLang/julia/issues/47979
[#48124]: https://github.com/JuliaLang/julia/issues/48124
[#48575]: https://github.com/JuliaLang/julia/issues/48575
[#48600]: https://github.com/JuliaLang/julia/issues/48600
[#48625]: https://github.com/JuliaLang/julia/issues/48625
[#48682]: https://github.com/JuliaLang/julia/issues/48682
[#48899]: https://github.com/JuliaLang/julia/issues/48899
[#48979]: https://github.com/JuliaLang/julia/issues/48979
[#49020]: https://github.com/JuliaLang/julia/issues/49020
[#49110]: https://github.com/JuliaLang/julia/issues/49110
[#49266]: https://github.com/JuliaLang/julia/issues/49266
[#49405]: https://github.com/JuliaLang/julia/issues/49405
[#49451]: https://github.com/JuliaLang/julia/issues/49451
[#49529]: https://github.com/JuliaLang/julia/issues/49529
[#49533]: https://github.com/JuliaLang/julia/issues/49533
[#49745]: https://github.com/JuliaLang/julia/issues/49745
[#49795]: https://github.com/JuliaLang/julia/issues/49795
[#49959]: https://github.com/JuliaLang/julia/issues/49959
[#50144]: https://github.com/JuliaLang/julia/issues/50144
[#50218]: https://github.com/JuliaLang/julia/issues/50218

Julia v1.9 Release Notes
========================
Expand Down Expand Up @@ -245,8 +299,7 @@ Standard library changes

#### REPL

* `Alt-e` now opens the current input in an editor. The content (if modified) will be executed
upon exiting the editor ([#33759]).
* `Alt-e` now opens the current input in an editor ([#33759]).
* The contextual module which is active in the REPL can be changed (it is `Main` by default),
via the `REPL.activate(::Module)` function or via typing the module in the REPL and pressing
the keybinding Alt-m ([#33872]).
Expand Down
25 changes: 22 additions & 3 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ JCFLAGS_COMMON := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSE
JCFLAGS_CLANG := $(JCFLAGS_COMMON)
JCFLAGS_GCC := $(JCFLAGS_COMMON) -fno-gnu-unique

# AArch64 needs this flag to generate the .eh_frame used by libunwind
# These flags are needed to generate decent debug info
JCPPFLAGS_COMMON := -fasynchronous-unwind-tables
JCPPFLAGS_CLANG := $(JCPPFLAGS_COMMON)
JCPPFLAGS_GCC := $(JCPPFLAGS_COMMON)
JCPPFLAGS_CLANG := $(JCPPFLAGS_COMMON) -mllvm -enable-tail-merge=0
JCPPFLAGS_GCC := $(JCPPFLAGS_COMMON) -fno-tree-tail-merge

JCXXFLAGS_COMMON := -pipe $(fPIC) -fno-rtti -std=c++14
JCXXFLAGS_CLANG := $(JCXXFLAGS_COMMON) -pedantic
Expand Down Expand Up @@ -897,6 +897,17 @@ else
ISX86:=0
endif


#If nothing is set default to native
ifeq ($(MARCH)$(MCPU)$(MTUNE)$(JULIA_CPU_TARGET),)
ifeq ($(ARCH),aarch64) #ARM recommends only setting MCPU for AArch64
MCPU=native
else
MARCH=native
MTUNE=native
endif
endif

# If we are running on powerpc64le or ppc64le, set certain options automatically
ifneq (,$(filter $(ARCH), powerpc64le ppc64le))
JCFLAGS += -fsigned-char
Expand Down Expand Up @@ -973,6 +984,14 @@ FC += -mcpu=$(MCPU)
JULIA_CPU_TARGET ?= $(MCPU)
endif

# Set MTUNE-specific flags
ifneq ($(MTUNE),)
CC += -mtune=$(MTUNE)
CXX += -mtune=$(MTUNE)
FC += -mtune=$(MTUNE)
JULIA_CPU_TARGET ?= $(MTUNE)
endif

ifneq ($(MARCH)$(MCPU),)
ifeq ($(OS),Darwin)
# on Darwin, the standalone `as` program doesn't know
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ release-candidate: release testall
@echo 7. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"`
@echo 8. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist with USE_BINARYBUILDER=0
@echo 9. Check that 'make && make install && make test' succeed with unpacked tarballs even without Internet access.
@echo 10. Follow packaging instructions in doc/build/distributing.md to create binary packages for all platforms
@echo 10. Follow packaging instructions in doc/src/devdocs/build/distributing.md to create binary packages for all platforms
@echo 11. Upload to AWS, update https://julialang.org/downloads and http:https://status.julialang.org/stable links
@echo 12. Update checksums on AWS for tarball and packaged binaries
@echo 13. Update versions.json. Wait at least 60 minutes before proceeding to step 14.
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Compiler/Runtime improvements
Command-line option changes
---------------------------

* The entry point for Julia has been standardized to `Main.main(ARGS)`. When julia is invoked to run a script or expression
(i.e. using `julia script.jl` or `julia -e expr`), julia will subsequently run the `Main.main` function automatically if
such a function has been defined. This is intended to unify script and compilation workflows, where code loading may happen
in the compiler and execution of `Main.main` may happen in the resulting executable. For interactive use, there is no semantic
difference between defining a `main` function and executing the code directly at the end of the script. ([50974])

Multi-threading changes
-----------------------

Expand Down Expand Up @@ -74,6 +80,7 @@ Deprecated or removed

External dependencies
---------------------
* `tput` is no longer called to check terminal capabilities, it has been replaced with a pure-Julia terminfo parser.

Tooling Improvements
--------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ and then use the command prompt to change into the resulting julia directory. By
Julia. However, most users should use the [most recent stable version](https://github.com/JuliaLang/julia/releases)
of Julia. You can get this version by running:

git checkout v1.9.2
git checkout v1.9.3

To build the `julia` executable, run `make` from within the julia directory.

Expand Down
4 changes: 2 additions & 2 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ include(strcat((length(Core.ARGS)>=2 ? Core.ARGS[2] : ""), "version_git.jl")) #
# numeric operations
include("hashing.jl")
include("rounding.jl")
using .Rounding
include("div.jl")
include("rawbigints.jl")
include("float.jl")
include("twiceprecision.jl")
include("complex.jl")
Expand Down Expand Up @@ -358,7 +358,7 @@ include("filesystem.jl")
using .Filesystem
include("cmd.jl")
include("process.jl")
include("ttyhascolor.jl")
include("terminfo.jl")
include("secretbuffer.jl")

# core math functions
Expand Down
10 changes: 5 additions & 5 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1288,11 +1288,7 @@ end
# To avoid invalidations from multidimensional.jl: getindex(A::Array, i1::Union{Integer, CartesianIndex}, I::Union{Integer, CartesianIndex}...)
@propagate_inbounds getindex(A::Array, i1::Integer, I::Integer...) = A[to_indices(A, (i1, I...))...]

function unsafe_getindex(A::AbstractArray, I...)
@inline
@inbounds r = getindex(A, I...)
r
end
unsafe_getindex(A::AbstractArray, I...) = @inbounds getindex(A, I...)

struct CanonicalIndexError <: Exception
func::String
Expand Down Expand Up @@ -1587,10 +1583,14 @@ eltypeof(x::AbstractArray) = eltype(x)
promote_eltypeof() = error()
promote_eltypeof(v1) = eltypeof(v1)
promote_eltypeof(v1, vs...) = promote_type(eltypeof(v1), promote_eltypeof(vs...))
promote_eltypeof(v1::T, vs::T...) where {T} = eltypeof(v1)
promote_eltypeof(v1::AbstractArray{T}, vs::AbstractArray{T}...) where {T} = T

promote_eltype() = error()
promote_eltype(v1) = eltype(v1)
promote_eltype(v1, vs...) = promote_type(eltype(v1), promote_eltype(vs...))
promote_eltype(v1::T, vs::T...) where {T} = eltype(T)
promote_eltype(v1::AbstractArray{T}, vs::AbstractArray{T}...) where {T} = T

#TODO: ERROR CHECK
_cat(catdim::Int) = Vector{Any}()
Expand Down
6 changes: 5 additions & 1 deletion base/abstractset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,17 @@ function issubset(a, b)
end

"""
hasfastin(T)
Base.hasfastin(T)
Determine whether the computation `x ∈ collection` where `collection::T` can be considered
as a "fast" operation (typically constant or logarithmic complexity).
The definition `hasfastin(x) = hasfastin(typeof(x))` is provided for convenience so that instances
can be passed instead of types.
However the form that accepts a type argument should be defined for new types.
The default for `hasfastin(T)` is `true` for subtypes of
[`AbstractSet`](@ref), [`AbstractDict`](@ref) and [`AbstractRange`](@ref)
and `false` otherwise.
"""
hasfastin(::Type) = false
hasfastin(::Union{Type{<:AbstractSet},Type{<:AbstractDict},Type{<:AbstractRange}}) = true
Expand Down
Loading

0 comments on commit ebcdf24

Please sign in to comment.