https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
dd7f1f8 use `Integer` during broadcast when possible. 06 January 2024, 16:18:20 UTC
ae6af52 Revert "Revert "Generalize `broadcast!(f, ::BitVector)` optimization to `BitArray`." (#52775)" This reverts commit 11bb62b079aa95eac59deed4184be539563e15df. 06 January 2024, 11:49:47 UTC
11bb62b Revert "Generalize `broadcast!(f, ::BitVector)` optimization to `BitArray`." (#52775) This broke many packages on PkgEval. 06 January 2024, 11:43:09 UTC
f18cc43 [doc] Fix format string of `printf` in `@ccall` example (#52770) The format string of the `@ccall` example for `printf` had a `%d` specifier but the argument passed was `"5"::Cstring`, which is also inconsistent with the corresponding `ccall` example. 06 January 2024, 11:07:40 UTC
b682592 [OpenBLAS] Ugrade to v0.3.26 (#52762) Memo to self: * update version number in `stdlib/OpenBLAS_jll/Project.toml` * update version number and sha in `deps/openblas.version` * refresh checksums with `make -f contrib/refresh_checksums.mk -j openblas` In the [release notes of v0.3.26](https://github.com/OpenMathLib/OpenBLAS/releases/tag/v0.3.26) one of the more interesting point is perhaps > included support for Apple M1 and newer targets in DYNAMIC_ARCH builds Quoting from https://github.com/JuliaPackaging/Yggdrasil/pull/7911#issuecomment-1878884892 > Some quick benchmarks on M1: with OpenBLAS 0.3.25: > ```julia > julia> using LinearAlgebra, BenchmarkTools > > julia> peakflops() > 1.7049262964078418e11 > > julia> x = randn(1_000); y = randn(size(x)); > > julia> @btime dot($x, $y); > 402.705 ns (0 allocations: 0 bytes) > ``` > with OpenBLAS v0.3.26: > ```julia > julia> using LinearAlgebra, BenchmarkTools > > julia> peakflops() > 1.8042546290642157e11 > > julia> x = randn(1_000); y = randn(size(x)); > > julia> @btime dot($x, $y); > 143.777 ns (0 allocations: 0 bytes) > ``` > Up to OpenBLAS v0.3.25 you can get similar performance on Apple Silicon by exporting the environment variable > ```sh > OPENBLAS_CORETYPE=NEOVERSEN1 > ``` 06 January 2024, 08:41:27 UTC
9aaa8c7 Use `jl_types_egal` in `equiv_field_types` (#52748) Fixes #52686 Fixes https://github.com/timholy/Revise.jl/issues/770 --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 06 January 2024, 06:09:43 UTC
ae5880a EscapeAnalysis.jl: Correct grammar in comment (#52764) 06 January 2024, 03:37:14 UTC
103e50a also enable gc_assert_parent_validity on GC_VERIFY (#52767) Keeping this functionality untested on CI increases the chance of it rotting. 06 January 2024, 01:37:37 UTC
c94b1a3 staticdata: handle cycles in datatypes (#52752) Handle any sort of cycle encountered in the datatype super fields by always deferring that field until later and setting a deferred mechanism for updating the field only after the supertype is ready. Fix #52660 05 January 2024, 20:42:40 UTC
c9bc2ff loading: fix finding bundled stdlibs even if they are e.g. devved in an environment higher in the load path (#52637) I noticed this when seeing some weird precompile issues when I had SparseArrays devved in my main environment but it was with the standard stdlib format in the current environment: ``` (NearestNeighbors) pkg> st -m Project NearestNeighbors v0.4.15 Status `~/JuliaPkgs/NearestNeighbors.jl/Manifest.toml` ... [2f01184e] SparseArrays v1.10.0 ... ``` But even so, `locate_package` claims that the path to SparseArrays is the one in the main environment: ``` julia> pkg = Base.PkgId(Base.UUID("2f01184e-e22b-5df5-ae63-d93ebab69eaf"), "SparseArrays") SparseArrays [2f01184e-e22b-5df5-ae63-d93ebab69eaf] julia> Base.locate_package(pkg) "/home/kc/JuliaPkgs/SparseArrays.jl/src/SparseArrays.jl" ``` This correctly fixes it so that packages without a `git-tree-sha1` (and without a `path`) are resolved to the stdlib path. 05 January 2024, 15:45:09 UTC
f01898c Fix printing of `InexactError` for `Inf16` arg and similar (#52491) Resolves https://github.com/JuliaLang/julia/issues/51087 Closes https://github.com/JuliaLang/julia/pull/51163 Use `show` as pointed out in https://github.com/JuliaLang/julia/pull/51163#discussion_r1328682832. 05 January 2024, 13:02:33 UTC
f68d7f8 [Markdown] Docstring for html and latex functions (#52733) Part of #52725 05 January 2024, 12:58:06 UTC
67e6127 remove very old error hint from using `.data` field on a String (#52737) This field was removed 7 years ago. I think it is fine to not special case it any longer. 05 January 2024, 10:38:31 UTC
3a02053 Fix quotes in the docstring of `copytrito!` (#52718) 05 January 2024, 08:27:55 UTC
50788cd Generalize `broadcast!(f, ::BitVector)` optimization to `BitArray`. (#52736) Follows #32048. This PR fully avoids the allocation thus make nd logical broadcast better scaled for small inputs. --------- Co-authored-by: Matt Bauman <mbauman@gmail.com> 05 January 2024, 08:11:45 UTC
316cc4a remove outdated handling of `:static_parameter` (#52732) After #51970, `Expr(:static_parameter, i::Int)` is now consistently outlined during the lowering, so there's no longer a need for `abstract_eval_value_expr` to handle this expression. This update removes the outdated handling, clarifying where we need to handle the expression. 05 January 2024, 01:59:58 UTC
31a9f13 Properly rename EnterNode scope after code coverage insertion (#52720) Fixes #52672 and changes the emission path to move the error to the point of corruption instead of the point of first use. 05 January 2024, 01:59:49 UTC
38b8156 expand Docs.undocumented_names to include all public symbols (#52743) Expands the semantics of `Docs.undocumented_names` to include all public symbols, as described in https://github.com/JuliaLang/julia/pull/52413#issuecomment-1876266678 cc @jariji, @LilithHafner --------- Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> 04 January 2024, 21:44:38 UTC
6934379 remove method file names with `--strip-metadata` (#52722) These should not appear in binaries when this option is specified. 04 January 2024, 21:03:29 UTC
5a28cf5 add doxygen for exported functions in jlapi.c (#52324) This adds some brief doxygen-formatted docstrings to jlapi.c. The objective of this PR is to set doxygen docstrings as the documentation method for Julia's C code, and allow for further development of reference material for the use of Julia through the C API. These docstrings are immediately useful for consumption by C/C++ development extensions such as tooltips. In the future these can be useful to generate a cohesive API reference, though this is a separate concern involving the build system. 04 January 2024, 17:35:27 UTC
ec686c3 inference: Guard TypeVar special case against vararg (#52721) Fix #52613 by making the TypeVar special case in inference check for vararg first. There's nothing the special case can really do with vararg anyway, so fall back to the ordinary abstract call handling. 04 January 2024, 15:51:49 UTC
f9b27b3 Print type signature for what was inferring whenever an internal error is thrown (#52695) 04 January 2024, 11:14:51 UTC
0f6c72c Replace most occurances of http with https when the https url is valid (#52566) This should be minor and mostly NFC. 03 January 2024, 21:48:50 UTC
d97ab8a sroa: Fix small logic bug (#52717) This fixes #52703, which happened when a function had a foldable, try-catch-with-scope inside an ordinary try/catch. The fix is to simply ignore the ordinary try/catch and treat it as a regular fallthrough terminator. 03 January 2024, 21:17:26 UTC
3a3af82 Fix whitespace in README.md (#52714) Fixup for #52691, fixes the whitespace CI check. cc @inkydragon, @ViralBShah 03 January 2024, 15:29:42 UTC
ca0a266 Test BracketedSort on fully pathological inputs (#52653) 03 January 2024, 13:34:38 UTC
792a35b Show Numbers compactly when typeinfo is a Union with Nothing or Missing (#48822) 03 January 2024, 13:23:38 UTC
fb8d7f1 README: minor polish (#52691) changes - move `write_base_cache.jl` to `contrib/` `generate_precompile.jl` is also placed there - In section "Source Code Organization", add `etc/`, remove `usr/` `usr/` appears only at build time. - Some minor polish --------- Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> 03 January 2024, 07:21:39 UTC
0ea2b56 🤖 [master] Bump the SparseArrays stdlib from f154de2 to feb54ee (#52706) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: f154de2 New commit: feb54ee Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @giordano Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaSparse/SparseArrays.jl/compare/f154de2b6801ec8d5afaf58b73b830c8e71013c3...feb54ee5e49008bd157227099cafe604a67c36fb ``` $ git log --oneline f154de2..feb54ee feb54ee fix typo ("ArguementError") (#479) 8308232 Extend sparse kron to adjortrans of dense matrices (#474) 951837f Simplify calling Aqua (#473) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> 03 January 2024, 07:09:38 UTC
3279a1f THIRDPARTY: Consider `base/` and `stdlib/` as standard libraries (#52692) Changes: - Consider `base/` and `stdlib/` as standard libraries - Add optional dep: `LibTracyClient` - Add license for tools, and update link - Update spdx.json 03 January 2024, 05:08:48 UTC
2d0aeca Fix precompile reason print when nothing (#52701) 02 January 2024, 23:00:26 UTC
972f55f Mention `@lock` in `lock(f, l)` docstring (#52357) Follow up to: https://github.com/JuliaLang/julia/issues/36441. Makes this macro much easier to learn about if you're just viewing the docstrings. 02 January 2024, 19:04:46 UTC
1dfd2a6 syntax: properly linearize type-for-closure code (#52497) The (core svec) calls are not supposed to be nested like this now. We would rarely attempt to infer this, which makes it hard to notice, but we should try to be correct. 02 January 2024, 19:04:17 UTC
567754c update latest stable version in README (#52699) 02 January 2024, 14:32:56 UTC
acddc62 Fix docs for Sockets.getaddrinfo() (#52538) Previously only the two-argument method was documented, which stated that the default type to be returned was IPv4. But that hasn't been true since 2ab654ce5b (#36029), so now both methods are documented and corrected. I believe this fixes #40306. 02 January 2024, 12:04:53 UTC
0d9c0d9 Add 3-argument div and rem in doc (#52662) Resolves #52624 02 January 2024, 12:00:53 UTC
0f62824 Profile: Improve module docstring (#52678) ![Screenshot 2023-12-30 at 7 24 10 PM](https://github.com/JuliaLang/julia/assets/1694067/a7c78943-5e4a-475c-864c-3b0005305471) 02 January 2024, 01:58:53 UTC
7baa577 Add `@create_log_macro` for making custom styled logging macros (#52196) 02 January 2024, 01:57:03 UTC
1b183b9 Add Docs.undocumented_names (#52413) Fixes #51174 --------- Co-authored-by: Steven G. Johnson <stevenj@alum.mit.edu> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> 31 December 2023, 01:32:59 UTC
89cae45 Optimized arithmetic methods for strided triangular matrices (#52571) This uses broadcasting for operations like `A::UpperTriangular + B::UpperTriangular` in case the parents are `StridedMatrix`es. Looping only over the triangular part is usually faster for large matrices, where presumably memory is the bottleneck. Some performance comparisons, using ```julia julia> U = UpperTriangular(rand(1000,1000)); julia> U1 = UnitUpperTriangular(rand(size(U)...)); ``` | Operation | master | PR | | --------------- | ---------- | ----- | |`-U` |`1.011 ms (3 allocations: 7.63 MiB)` |`559.680 μs (3 allocations: 7.63 MiB)` | |`U + U`/`U - U` |`971.740 μs (3 allocations: 7.63 MiB)` | `560.063 μs (3 allocations: 7.63 MiB)` | |`U + U1`/`U - U1` |`3.014 ms (9 allocations: 22.89 MiB)` | `944.772 μs (3 allocations: 7.63 MiB)` | |`U1 + U1` |`4.509 ms (12 allocations: 30.52 MiB)` | `1.687 ms (3 allocations: 7.63 MiB)` | |`U1 - U1` |`3.357 ms (9 allocations: 22.89 MiB)` | `1.763 ms (3 allocations: 7.63 MiB)` | I've retained the existing methods as fallback, in case there's current code that works without broadcasting. 30 December 2023, 17:08:45 UTC
fe0db7d heap snapshot: add gc roots and gc finalist roots to fix unrooted nodes (#52618) 30 December 2023, 14:46:53 UTC
2091058 Fix :noshift construction of an empty SubString (#51923) 30 December 2023, 12:20:28 UTC
9deee46 Bunch-Kaufman factorization support for generic number types and inertia computations (#51487) ### Introduction This PR adds a generic implementation of the Bunch-Kaufman factorization in native Julia code, and a generic implementation of a inertia calculation function. Right now Julia only support the Bunch-Kaufman factorization for `Float32`, `Float64` and their complex variants. This is because the factorization is handled by LAPACK, which only supports these types. To extend support to generic number types, I translated the LAPACK implementation to native Julia code, and the code performs the factorization in-place. I also included the function `inertia` that computes the number of positive, negative, and zero eigenvalues of an $n \times n$ Bunch-Kaufman factorized matrix in $\mathcal{O}(n)$ time. ### Changes - `bunchkaufman` and `bunchkaufman!` now work for any `AbstractFloat`, `Rational` and their complex variants. Behavior for previously supported types is not changed (LAPACK is used when possible). `bunchakaufman!` does not support `Integer` types, as in general the factorization lies in the arithmetic closure of the number type (the rationals for the integers). On the other hand, `bunchakaufman` supports `Integer` types, by making an internal conversion to `Rational{BigInt}`. - `ldiv!` for a `BunchKaufman` factorization has extended support for generic number types with type stability. - Previously, Julia extracted the diagonal factor of an $n \times n$ `BunchKaufman` object by making a copy of the matrix and then calling a LAPACK function (`dsyconvf`, `csyconvf`, etc., depending on the number type). This function also computes the triangular factor, so it runs in $\mathcal{O}(n^2)$ time. Now Julia uses a native implementation of the LAPACK function with small modifications, so it computes the diagonal factor in $\mathcal{O}(n)$ time, without making a new copy of the matrix. - Added the function `inertia` that computes the number of positive, negative and zero eigenvalues of the diagonal factor of an $n \times n$ `BunchKaufman` object, in case that the matrix is real symmetric or Hermitian. For complex symmetric matrices, `inertia` only computes the number of zero eigenvalues of the diagonal factor. `inertia` runs in $\mathcal{O}(n)$ time and only uses arithmetic and real absolute value operations. Therefore, `inertia` can be used for matrices of any generic number type, including `Rational`. In particular, for rational matrices the output of `inertia` is exact (unless a positive tolerance is specified). - Unit tests of the `BunchKaufman` library has been adapted to handle low precision number types (approximate comparisons with tolerance `sqrt(eps(Float64))` do not make sense when the floating point type is `Float16`, for example). The test-set now also runs on the following types: `Float16, Complex{Float16}, BigFloat, Complex{BigFloat}, Complex{Int}, BigInt, Complex{BigInt}, Rational{BigInt}, Complex{Rational{BigInt}}`. Unit tests for the `inertia` function have been added too. 30 December 2023, 10:58:31 UTC
3f4cfc6 [dSFMT_jll] Upgrade to v2.2.5 (#52667) Usual memo to self: * update version number in `stdlib/dSFMT_jll/Project.toml` * refresh checksums with `make -f contrib/refresh_checksums.mk -j dsfmt` * update version number in `deps/checksums/dsfmt` 30 December 2023, 09:04:07 UTC
2b2f534 minor fix in malloc terminology used in docs (#52665) 29 December 2023, 23:37:46 UTC
e8f8968 Added Tests for Permute function in combinatorics.jl (#52648) Signed-off-by: happy <happy@Ubunutt.myguest.virtualbox.org> Co-authored-by: happy <happy@Ubunutt.myguest.virtualbox.org> 29 December 2023, 05:33:19 UTC
ad3769e `Base`: make `Tuple(::Pair)` type-stable (#52650) Fixes #52636 28 December 2023, 21:50:59 UTC
90ae544 fix typo in NEWS (#52652) Typo from #52461. 28 December 2023, 19:18:07 UTC
e96c13a update nthreads info in versioninfo (#52423) Fixes https://github.com/JuliaLang/julia/issues/52404 @nilshg I opted to make it one line as it fits. ``` julia> versioninfo() Julia Version 1.11.0-DEV.1011 Commit bb7091c6f2* (2023-12-04 14:58 UTC) Platform Info: OS: macOS (arm64-apple-darwin23.0.0) CPU: 10 × Apple M2 Pro WORD_SIZE: 64 LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1) Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores) Environment: JULIA_EDITOR = code ``` 28 December 2023, 12:42:28 UTC
26d0460 Show more info on why package precompilation was needed (#52619) 28 December 2023, 07:52:18 UTC
e6e572e Temporarily remove failing sorting tests (#52643) Tracked by issue #52642 28 December 2023, 01:50:02 UTC
e7e8b89 update --gcthreads section in command line options (#52645) Make these consistent with what's shown by `julia --help`. Fixes https://github.com/JuliaLang/www.julialang.org/issues/1997. 27 December 2023, 18:59:53 UTC
66e9410 Add a fully typed Diagonal constructor from `AbstractMatrix`es (#52487) The following works after this PR: ```julia julia> oftype(Diagonal(Float32[1,2]), [1 0; 0 2]) 2×2 Diagonal{Float32, Vector{Float32}}: 1.0 ⋅ ⋅ 2.0 ``` This changes the behavior of the constructor to copy the diagonal, so now ```julia julia> D = Diagonal([1,2]); julia> typeof(D)(D).diag === D.diag false ``` whereas this used to be `true` previously. This probably doesn't matter much, as in most non-trivial cases it'd be copied anyway, and this conversion is unusual in the trivial case. --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 27 December 2023, 06:36:28 UTC
b4eefd0 Default uplo in symmetric/hermitian (#52605) This makes the function signatures match the respective docstrings, as well as that of `Symmetric/Hermitian`. 27 December 2023, 06:36:08 UTC
713560b Specialize axes for structured matrices (#52480) On master ```julia julia> S = SMatrix{4,4}(1:16); julia> A = StructArray{Complex{Int}}((S,S)); julia> axes(Symmetric(A)) (Base.OneTo(4), Base.OneTo(4)) ``` The static axes are lost. After this, ```julia julia> axes(Symmetric(A)) (SOneTo(4), SOneTo(4)) ``` Similarly, I've added methods for other structured matrix types. These help with other cases like infinite arrays. --------- Co-authored-by: Matt Bauman <mbauman@juliahub.com> 25 December 2023, 12:55:56 UTC
933a83a Fix inconsistant logical index behavior (#45869) 1. If we use `BitArray`/`Array{Bool}` to index, `to_indices` has an optimiztion for linear-iteratable case. But the corresponding check is not correct. IIUC, this optimization is legal only when the Boolen array is the only index provided. The first commit fix it and widen this optimization to all Boolen array. Before this PR ```julia julia> A = rand(2,3,4); I = rand(Bool,3,4); julia> A[1,I] == A[1,view(I,:,:)] ERROR: BoundsError: attempt to access 2×3×4 Array{Float64, 3} at index [1, 3×4 Matrix{Bool}] ``` After ```julia julia> A = rand(2,3,4); I = rand(Bool,3,4); julia> A[1,I] == A[1,view(I,:,:)] true ``` 2. On master, if the index/array has singleton trailing dimension, boundcheck of logical index show different behavior depending on the number of indexes provided. If there's only one index variable, singleton dimension wil not be ignored. The second commit fix it. (close #45867) --------- Co-authored-by: Matt Bauman <mbauman@gmail.com> 25 December 2023, 12:54:47 UTC
4e4c0e5 simplification in `permutedims!` (#52623) `strides_1` was never used, and the `@nexprs` that creates `strides_i` can be replaced with `@ntuple`. Fixes #52615, credit: ararslan. 25 December 2023, 12:53:09 UTC
ef549ae Don't access parent of triangular matrix in powm (#52583) Since the values stored in the parent corresponding to the structural zeros of a tridiagonal matrix aren't well-defined, using it in `ldiv!` is a footgun that may lead to heisenbugs (one seen in https://buildkite.com/julialang/julia-master/builds/31285#018c7cc7-6c77-41ac-a01b-1c7d14cb1b15). This PR changes it to using the tridiagonal matrix directly in `ldiv!`, which should lead to predictable results, and be bug-free. The failing tests for #52571 pass locally with this change. 25 December 2023, 12:51:49 UTC
b51b809 Warn if an already loaded package is attempted to be loaded from a different path (#44329) 23 December 2023, 21:10:19 UTC
52ff558 cfg_simplify: Add one more check to avoid merging :leave terminator (#52621) In #52608, I made `:leave` a proper terminator (we already considered it as such during CFG construction, we just didn't maintain that property in the optimizer). As part of this, I adjusted one place in cfg_simplify to avoid merging blocks that end with non-trivial terminators (previously only EnterNode was considered). Turns out there's another one, so fix that as well. 23 December 2023, 15:03:47 UTC
0b5cf42 lowering: Optimize lowering of tryfinally with trivial finally block (#52593) This optimizes the lowering of a tryfinally block with empty finally block to instead use the try/catch lowering, where the catch block is given as simply `rethrow()`. This is equivalent semantically to try/finally in this case, but the code structure is a lot simpler with fewer basic blocks and without the auxiliary slot for tracking the finally slot. The motivation here is to help the compiler optimize better when using the `@with` macro, which has an empty `finally` block (but uses the scope argument of 'tryfinally). The only problem with this is that it violates the lowering assumptions I made in https://github.com/JuliaLang/julia/pull/52527, so we'll probably need to fix that first. 23 December 2023, 12:35:12 UTC
5111208 [LibCURL_jll] Update to v8.5.0 (#52611) 23 December 2023, 06:49:04 UTC
f98b895 sroa: Better current_scope folding (#52608) Third time's the charm hopefully. This builds on #52527 and addresses the TODO left there by keeping track of the appropriate :scope in sroa as we go along in order to ensure correct current_scope folding, even when the try body is nothrow (which was left as a todo). As a result, we also no longer result on lowering assumptions for this transformation, which enables us to enable the lowering optimization in #52593. 23 December 2023, 05:08:49 UTC
44a7915 ir: Fix incorrect renaming of phinode values (#52614) This fixes #52610. The underlying issue is a left over OldSSAValue after the adce_pass! (introduced by compaction, it being during adce is incidental). Compaction introduces `OldSSAValue` when it compacts in PhiNodes that reference later SSAValues and adds them to a list to revisit at the end of compaction to fill in the actual renamed result. There are two separate fixes here: 1. If the result of the final revisit is yet another `OldSSAValue`, rename it again. I don't this ordinarily happens at all, but I suppose it is possible in theory during sroa beacuse of the rename-shortcut optimization [1]. However, this is not not what happened here. Instead compaction incorrectly used an OldSSAValue for an already-inserted node, which then ends up in the rename list because we deleted one of the predecessor edges [2]. To fix that we: 2. Fix an issue where we weren't accounting for the possibility of previously pending nodes (which have SSAValues beyond the numbering range of the ordinary statements) in the special already_inserted query in phinode value processing. To fix this, unify the logic with the ordinary `already_inserted` query, which handles this case correctly. [1] https://github.com/JuliaLang/julia/blob/9443c761871c4db9c3213a1e01804286292c3f4d/base/compiler/ssair/passes.jl#L1385 [2] https://github.com/JuliaLang/julia/blob/9443c761871c4db9c3213a1e01804286292c3f4d/base/compiler/ssair/ir.jl#L1556 Co-authored-by: Tim Besard <tim@juliahub.com> 23 December 2023, 05:07:47 UTC
4975a78 GC page profiler (#52567) Piggybacks in the sweeping phase of the GC to pretty-print a JSON representation of every page in the pool allocator. Usage: ```bash julia> using Profile julia> Profile.take_page_profile("/tmp/test-profile.out") "/tmp/test-profile.out" ``` Output (truncated to one page & after pretty printing): ```json { "address": "0x109dd0000", "object_size": 400, "objects": [ "Task", "Task", "Task", "garbage", "GenericMemory", "garbage", "GenericMemory", "GenericMemory", "garbage", "GenericMemory", "GenericMemory", "Task", "Task", "Task", "garbage", "garbage", "garbage", "String", "garbage", "garbage", "String", "GenericMemory", "GenericMemory", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", "garbage", ] } ``` This proved particularly useful for us when studying fragmentation in some of our workloads, though this profiler may possibly have some repeated functionality compared to the other profilers we already have in `stdlib`. 23 December 2023, 00:11:49 UTC
b97ffd0 [MbedTLS_jll] Update to v2.28.6 (#52612) 22 December 2023, 22:50:03 UTC
1a64299 Remove flakey sorting test (#52594) 22 December 2023, 20:45:20 UTC
40bc64c Fix `show` for `MethodList` when methods are from another module (#52354) When a type is defined in one module but its methods are defined elsewhere, `show_method_table` errors due to an incorrect lookup of the defining module used to determine colors for printing. In particular, the code had been assuming that the type is defined in the module in which its constructor's first method (in the sense of `first(methods())`) is defined, which isn't always true. The color used for printing the module name needs to be determined on a per-method basis and can't be correctly done based on the method table's module. For each method, we attempt to derive the module for the method table to which the method was added, then determine whether it's the same as the defining module for the method. Fixes #49382 Fixes #49403 Fixes #52043 Co-Authored-By: Jameson Nash <vtjnash@gmail.com> 22 December 2023, 20:21:11 UTC
9443c76 When setting `JULIA_DEPOT_PATH` to `/path:`, omit the default user depot (#51448) This commit slightly changes how the `DEPOT_PATH` works when overriden using the env var `JULIA_DEPOT_PATH`, now omitting the default user depot when specifying a path. Before: ``` ❯ JULIA_DEPOT_PATH=/foo: \ julia-1.10 -e 'display(DEPOT_PATH)' 4-element Vector{String}: "/foo" "/home/tim/.julia" "/path/to/julia/local/share/julia" "/path/to/julia/share/julia" ``` After: ``` ❯ JULIA_DEPOT_PATH=/foo: \ julia-pr -e 'display(DEPOT_PATH)' 3-element Vector{String}: "/foo" "/path/to/julia/local/share/julia" "/path/to/julia/share/julia" ``` This makes it possibly to create a new isolated depot by simply setting `JULIA_DEPOT_PATH` to `/path:`, while still being able to load resources that are bundled with Julia. For a full discussion, see the PR. 22 December 2023, 13:35:14 UTC
878b0c0 sroa: More fixes for KeyValue optimization (#52602) Fixes some mistakes in #52542 that led to the following issue: ``` function persistent_dict_elim_multiple_phi2(c::Bool) z = Base.inferencebarrier(1)::Int if c a = Base.PersistentDict(:a => z) else a = Base.PersistentDict(:a => z) end b = Base.PersistentDict(a, :b => 2) return b[:a] end julia> persistent_dict_elim_multiple_phi2(true) ERROR: KeyError: key :a not found Stacktrace: [1] getindex @ Base ./dict.jl:1010 [inlined] [2] persistent_dict_elim_multiple_phi2(c::Bool) @ Main ./REPL[1]:9 [3] top-level scope @ REPL[3]:1 ``` i.e. sroa incorrectly thought the value was not found. 22 December 2023, 13:07:20 UTC
1290b51 Lowering: Insert QuoteNode for captured boxed value (#52596) `Core.Box` is not self-quoting so it should be captured in a QuoteNode. This has been benign until the improved effect system, we handle `QuoteNode` of a mutable value as a global access, whereas a direct reference to a value is treated as inaccessible memory. Fixes #52531 --------- Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com> Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 22 December 2023, 10:09:56 UTC
c1e1d5c irinterp: Don't give bad answers on encountering try/catch (#52601) We generally don't model try/catch in irinterp, but let's at least add the cases and make them do nothing, rather than assuming these nodes are literals and giving bad type results. Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 21 December 2023, 17:50:15 UTC
bc979ae expand GC developer docs (#52340) The previous GC docs are mostly stale now given the recent GC changes. 21 December 2023, 17:12:24 UTC
a1a9ff4 remove duplicate increment to freecall in jl_gc_free_memory (#52598) Probably a typo. 21 December 2023, 17:02:45 UTC
f2ae45f Don't use `deepcopy_internal(xi, stackdict)` for isbits fields (#52597) This gives a good speed-up in some common cases: ```julia julia> mutable struct A x::Int end julia> a = A(1) A(1) # before julia> @benchmark deepcopy($a) BenchmarkTools.Trial: 10000 samples with 209 evaluations. Range (min … max): 370.895 ns … 4.573 μs ┊ GC (min … max): 0.00% … 83.23% Time (median): 389.206 ns ┊ GC (median): 0.00% Time (mean ± σ): 406.474 ns ± 136.334 ns ┊ GC (mean ± σ): 1.19% ± 3.34% ▁▁▆█▆▄▆▅▄▃▂▁ ▂ ▆█████████████▇▆▆▅▅▅▅▃▃▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄▄▆▆▇▇▆▇▆█▇███▇▇▇▇█▇█▇ █ 371 ns Histogram: log(frequency) by time 596 ns < Memory estimate: 352 bytes, allocs estimate: 3. # this pr julia> @benchmark deepcopy($a) BenchmarkTools.Trial: 10000 samples with 964 evaluations. Range (min … max): 80.261 ns … 1.642 μs ┊ GC (min … max): 0.00% … 86.97% Time (median): 87.662 ns ┊ GC (median): 0.00% Time (mean ± σ): 96.426 ns ± 77.467 ns ┊ GC (mean ± σ): 6.20% ± 7.42% ▂█▅▆▁ █████▄▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▂▁▁▁▁▁▁▁▁▂▂▂▂▂▂▂▂▂ ▃ 80.3 ns Histogram: frequency by time 239 ns < Memory estimate: 352 bytes, allocs estimate: 3. julia> mutable struct B x::Int y::Float64 end julia> b = B(1, 1.0) B(1, 1.0) # before julia> @benchmark deepcopy($b) BenchmarkTools.Trial: 10000 samples with 153 evaluations. Range (min … max): 699.569 ns … 9.972 μs ┊ GC (min … max): 0.00% … 89.92% Time (median): 723.804 ns ┊ GC (median): 0.00% Time (mean ± σ): 738.515 ns ± 222.079 ns ┊ GC (mean ± σ): 0.93% ± 2.94% ▂▇█▁ ▂▂▂▃████▆▅▄▅▇▆▅▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▁▁▂▁▁▁▁▂▁▂▁▁▁▁▁▁▂▁▁▂▁▂▁▂▂▂▂ ▃ 700 ns Histogram: frequency by time 914 ns < Memory estimate: 384 bytes, allocs estimate: 4. # this pr julia> @benchmark deepcopy($b) BenchmarkTools.Trial: 10000 samples with 956 evaluations. Range (min … max): 91.535 ns … 1.660 μs ┊ GC (min … max): 0.00% … 81.91% Time (median): 99.322 ns ┊ GC (median): 0.00% Time (mean ± σ): 108.450 ns ± 88.399 ns ┊ GC (mean ± σ): 6.97% ± 7.82% ▁▃██▅▂ ▂▂▂▂▃▄▇███████▇▆▅▄▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▁▁▁▂ ▃ 91.5 ns Histogram: frequency by time 134 ns < Memory estimate: 384 bytes, allocs estimate: 4. ``` 21 December 2023, 14:40:06 UTC
34d1b71 Fix typos CI job for PRs that don't edit any files or do edit binary files (#52600) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 21 December 2023, 13:15:04 UTC
631e7ef effect: mark `Core.TypeofVararg` as `ismutationfree` (#52586) Found in https://buildkite.com/julialang/julia-master/builds/31309#018c7f0b-aada-4017-bb2f-44001593ac6b. On master keyword call might taint `inaccessiblememonly`. MWE: ```julia julia> foo(; kws...) = 1 foo (generic function with 1 method) julia> Base.infer_effects(foo, Tuple{}) (+c,+e,+n,+t,+s,!m,+u) ``` which is caused by ```julia julia> Base.infer_effects(()->Vararg) (+c,+e,+n,+t,+s,!m,+u) ``` Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 21 December 2023, 10:00:25 UTC
0cac28c 🤖 [master] Bump the Pkg stdlib from 85f1e5564 to 3c86ba27e (#52595) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 85f1e5564 New commit: 3c86ba27e Julia version: 1.11.0-DEV Pkg version: 1.11.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/85f1e5564d733c9b04199d3523aeef0607f564e2...3c86ba27e904807e13beb8cb0466ed70365b0b2d ``` $ git log --oneline 85f1e5564..3c86ba27e 3c86ba27e add `add --weak/extra Foo` to add to [weakdeps] or [extras] (#3708) 2e640f92f respect --color=no in Pkg.precompile (#3740) cbd5d08ad Automatically add compat entries when adding deps to a package (#3732) 03de920b3 rm old manual handling of `--compiled-modules` (#3738) 314d5497b Use realpaths for temp dirs during tests. Fix SparseArrays `why` breakage (#3734) a6531d4be environments.md: update Julia version (#3715) a509bc062 Revise the API of is_manifest_current. (#3701) 60b7b7995 rm incorrect kwargs in add docstring (#3733) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 21 December 2023, 02:37:11 UTC
fb3e387 Fix small issue in EnterNode rename (#52589) Fixes issue noted at [1] - not sure why it didn't show up in CI on the PR. [1] https://github.com/JuliaLang/julia/pull/52527#issuecomment-1863930368 21 December 2023, 01:21:13 UTC
39087c5 Exception type: Model intrinsics (#52547) And then use this model for `nothrow` also (eventually we should just refactor everything to make nothrow just the appropriate query on exct). While we're at it, fix the nothrow model for pointerref/pointerset, which was missing a type check. --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 21 December 2023, 01:20:53 UTC
2cf4de4 Document the String constructors for IPv4 and IPv6 (#52559) Also capitalized 'IP' in the Int constructors. These are pretty important and I couldn't see them mentioned anywhere else in the docs. 20 December 2023, 16:34:08 UTC
58fac69 inference: fix `istuple` check in `apply_type_tfunc` (#52585) close #51927 20 December 2023, 14:17:32 UTC
69d5537 Additional Phi node semantics details for ssair docs (#52587) Following a discussion on slack, I thought I would propose to add this to the docs. I'm very open to changing the form of the explanation, I just wanted to get the point across that "all phi nodes at the start of a basic block run simultaneously". --------- Co-authored-by: Keno Fischer <keno@alumni.harvard.edu> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 20 December 2023, 14:15:20 UTC
f8cd1eb `invperm` for immutable arrays (#52546) Rebase #47855 Close #47855 Close #47847 After this, ```julia julia> invperm(SA[3,2,1]) 3-element MVector{3, Int64} with indices SOneTo(3): 3 2 1 ``` 20 December 2023, 12:42:21 UTC
a987f56 Fix ?(#TAB method search name exploration (#52555) Fix #52551. This PR ensures that a `SomeModule.?(...#TAB` completion can only suggests method `foo` such that `SomeModule.foo` exists (by checking `isdefined(SomeModule, :foo)`). This is equivalent, I believe, to the initial implementation of https://github.com/JuliaLang/julia/pull/38791, less the bug. Now that we have #51345, we may want to relax the above condition somewhat to include public names present in modules loaded into `SomeModule`, so that, for instance, a direct completion of `?(` would include `@assume_effects`. This could be good for method exploration because even though typing `@assume_effects` with no qualification in `Main` will error, the error now includes the helpful message ``` Hint: a global variable of this name also exists in Base. ``` But that can wait for a later PR anyway, this one is just the bugfix. The bug mentioned at https://github.com/JuliaLang/julia/issues/52551#issuecomment-1858543413 dates from the initial #38791 so this could be backported as far back as v1.8. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 20 December 2023, 10:17:51 UTC
ae3c711 make `update_exc_bestguess!` overloadable by `AbstractInterpreter` (#52588) This change allows `AbstractInterpreter` to record each program counter where exception type inference happened, which is required for new functionality of Cthulhu that I'm implementing. 20 December 2023, 09:25:52 UTC
d53fc50 Expand Nagle DocString (#52565) Improve Nagle DocString. See also https://github.com/JuliaLang/julia/issues/31842 --------- Co-authored-by: Elliot Saba <staticfloat@gmail.com> 20 December 2023, 05:39:47 UTC
d07a272 Improve the docstring of `mul!` (#52509) Add a comparison between the in-place and out-of-place versions to demonstrate that they compute the same values. 20 December 2023, 04:06:38 UTC
1633934 Specialize `fill!` for `Lower`/`UpperTriangular` (#52570) Only looping over the triangular part provides a performance boost: ```julia julia> U = UpperTriangular(rand(3000,3000)); julia> @btime zero($U); 23.575 ms (3 allocations: 68.66 MiB) # master 15.739 ms (3 allocations: 68.66 MiB) # PR ``` This is only really applicable when filling a triangular matrix with zeros, but this has several applications (e.g. imaginary part of a real matrix). --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 20 December 2023, 04:06:26 UTC
24e43ad added promotions for SymTri and Tri (#48536) Co-authored-by: zzeuuus <74652697+ArunSanganal@users.noreply.github.com> Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 19 December 2023, 18:30:40 UTC
4d677a5 Fix array condition in is_valid_intrinsic_elptr (#52433) This conditional was added in the Memory PR, but the `ety` is obviously a type, not an array, so I'm assuming it meant to filter out array types. 19 December 2023, 15:19:34 UTC
f1f680f docs: fix `PersistentDict` doc string note admonition formatting (#52579) https://docs.julialang.org/en/v1/stdlib/Markdown/#Admonitions Fixes #52578 19 December 2023, 13:23:26 UTC
3b250c7 fix isequal_normalized for combining-char reordering (#52447) Fixes #52408. (Note that this function was added in Julia 1.8, in #42493.) In the future it would be good to further optimize this function by adding a fast path for the common case of strings that are mostly ASCII characters. Perhaps simply skip ahead to the first byte that doesn't match before we begin doing decomposition etcetera. 19 December 2023, 12:55:04 UTC
91d87c6 Add --pkgimages=existing. (#52573) Equivalent of https://github.com/JuliaLang/julia/pull/50586; implements https://github.com/JuliaLang/julia/issues/51474. With `--pkgimages=existing`, it's possible to disable the (often slow) generation of package images, without losing the ability to use existing ones. That's important now that we're moving more and more packages outside of the system image, e.g., running with `--pkgimages=no` otherwise takes close to 30s here before the Pkg REPL is usable. The main motivation for this is PkgEval, where generating package images is not very useful, yet disabling generation of them makes each job (which requires Pkg to drive the test process) take a significantly longer time. For example, `--pkgimages=yes` vs `no`: ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=yes # no precompilation of REPL.jl ┌ Debug: Loading object cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.dylib for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1116 julia> using Example # short time precompiling + pkgimg generation for Example.jl ┌ Debug: Loading object cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_tJaso.dylib for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1116 ``` ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=no ┌ Debug: Rejecting cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.ji for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] since the flags are mismatched │ current session: use_pkgimages = false, debug_level = 1, check_bounds = 0, inline = true, opt_level = 2 │ cache file: use_pkgimages = true, debug_level = 1, check_bounds = 0, inline = true, opt_level = 2 └ @ Base loading.jl:3289 # long time precompiling REPL.jl ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/REPL/u0gqU_CWvWI.ji for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1119 julia> using Example # short time precompiling Example ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_CWvWI.ji for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1119 ``` With the new `--pkgimages=existing`: ```julia ❯ JULIA_DEBUG=loading ./julia --project=Example.jl --pkgimages=existing # no precompilation of REPL.jl ┌ Debug: Loading object cache file /Users/tim/Julia/src/julia/build/dev/usr/share/julia/compiled/v1.11/REPL/u0gqU_XmENM.dylib for REPL [3fa0cd96-eef1-5676-8a61-b3b8758bbffb] └ @ Base loading.jl:1116 julia> using Example # short time precompiling Example ┌ Debug: Loading cache file /Users/tim/.julia/compiled/v1.11/Example/lLvWP_CWvWI.ji for Example [7876af07-990d-54b4-ab0e-23690620f79a] └ @ Base loading.jl:1119 ``` 19 December 2023, 11:49:05 UTC
4f25e87 sroa: Better walk for chained KeyValue (#52542) This redoes #52369, to put the walk through tothe chained KeyValue into a more logical place (the definition walking). This way, we automatically inherit correct handling of PhiNodes and ifelse. 19 December 2023, 11:24:27 UTC
ec4745b Fix interaction between try/catch elision and scope handling (#52527) Currently, our try/catch elision code does not look at whether the EnterNode has a scope, and just deletes it, if it can prove the contents nothrow. This is obviously problematic, so this fixes that case up to instead set the catch dest to 0 in that case (along with support in the rest of the system to ignore such catch dests for the purpose of renaming). The idea is that a later pass could use the notasklocalstate effect to delete this after appropriate verification, but this is not implemented. Additionally, this currently bails on folding current_scope inside such try/catch regions - for such regions we cannot use the CFG to determine the extent of the try/catch region. A proper treatment of this would probably be to just treat this as a single value mutable - but again this is not implemented. The primary purpose of this patch is to ensure correctness. 19 December 2023, 11:21:11 UTC
d336a3e Fix negation for an immutable unit triangular (#52510) Fixes ```julia julia> using FillArrays, LinearAlgebra julia> U = UnitUpperTriangular(Fill(2,4,4)) 4×4 UnitUpperTriangular{Int64, Fill{Int64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}: 1 2 2 2 ⋅ 1 2 2 ⋅ ⋅ 1 2 ⋅ ⋅ ⋅ 1 julia> -U ERROR: ArgumentError: Cannot setindex! to -1 for an AbstractFill with value -2. Stacktrace: [1] setindex! @ ~/.julia/packages/FillArrays/oXkMk/src/FillArrays.jl:52 [inlined] [2] -(A::UnitUpperTriangular{Int64, Fill{Int64, 2, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}) @ LinearAlgebra ~/packages/julias/julia-latest/share/julia/stdlib/v1.11/LinearAlgebra/src/triangular.jl:442 [3] top-level scope @ REPL[33]:1 ``` After this, ```julia julia> -U 4×4 UpperTriangular{Int64, Matrix{Int64}}: -1 -2 -2 -2 ⋅ -1 -2 -2 ⋅ ⋅ -1 -2 ⋅ ⋅ ⋅ -1 ``` 19 December 2023, 04:37:59 UTC
5977cb0 Fix GC rooting during rehashing of iddict (#52569) Should fix #52558. `a` should be rooted before the alloc call. I removed the comment as it seemed to refer to a write barrier that was removed long ago. 18 December 2023, 21:37:22 UTC
2ab4105 Fix typo in heuristics of BracketedSort (#52494) The impact of this typo was a) massively decreased performance that was b) predicted by heuristic dispatch, resulting in this algorithm not being dispatched too. I introduced this typo in 187e8c2222878c68b2afc9295ab8dc61773bd7f2 after performing all the benchmarking and before merging. 18 December 2023, 14:08:19 UTC
b57f8d1 Export method instance lookup functions (#52176) 18 December 2023, 09:20:17 UTC
back to top