https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
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
7fe08e0 Specialize copy for Diagonal (#52500) On master ```julia julia> copy(Diagonal(1:4)) |> typeof Diagonal{Int64, Vector{Int64}} ``` This PR ```julia julia> copy(Diagonal(1:4)) |> typeof Diagonal{Int64, UnitRange{Int64}} ``` Similar methods already exist for `Bidiagonal` and `Tridiagonal`, but this was missing for `Diagonal`. 18 December 2023, 05:58:18 UTC
df5361a Accept IndexStyle in diagind, defaulting to IndexLinear (#52549) Partly revert and redesign #52115, with `diagind` now accepting an optional `IndexStyle`, which is `IndexLinear` by default. This should address the breakages reported in that PR. After this, ```julia julia> D = Diagonal(1:4) 4×4 Diagonal{Int64, UnitRange{Int64}}: 1 ⋅ ⋅ ⋅ ⋅ 2 ⋅ ⋅ ⋅ ⋅ 3 ⋅ ⋅ ⋅ ⋅ 4 julia> diagind(D) 1:5:16 julia> diagind(D, IndexCartesian()) StepRangeLen(CartesianIndex(1, 1), CartesianIndex(1, 1), 4) ``` --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 18 December 2023, 02:12:24 UTC
c99572e Propagate inbounds in triangular/symmetric/UpperHessenberg get/setindex (#52512) Annotate several `getindex`/`setindex!` methods with `@propagate_inbounds`. We may need to be a bit careful to check for errant `@inbounds` annotations without a corresponding bounds-check. Close #52550 18 December 2023, 02:08:12 UTC
67c7843 Log pid of parent process that is running the CI tests (#52554) 15 December 2023, 22:53:29 UTC
e207c10 fix #52531, fix the effects modeling of `QuoteNode` (#52548) What observed in #52531 is that `QuoteNode` can embed global variables that users can modify. Therefore, when dealing with `QuoteNode`, it's necessary to taint its `:inaccessiblememonly` just like we do for `GlobalRef`. - fixes #52531 - replaces #52536 15 December 2023, 20:29:26 UTC
e8576fc gc: add some guard rails and refinements to MemBalancer (#52197) This replaces https://github.com/JuliaLang/julia/pull/50909, though notably does not include the change to use heap size instead of heap memory. This adds the smoothing behavior from that prior PR (to better estimate the long-term rates / ignore transient changes), updates the GC_TIME printing to reflect the change to use MemBalancer heuristics, and adds some other guardrails to the decisions so they do not get put off too far into the future. Since, unlike several other languages that use MemBalancer, we do not have a time-based trigger for GC to update these heuristics continuously, so we need to make sure each step is reasonably conservative (both from under and over predicting the rate). Finally, this is stricter about observing limits set by the user, by strictly limiting the exceedence rate to around 10%, while avoiding some prior possible issues with the hard cut-off being disjoint at the cutoff. This should mean we will go over the threshold slowly if the program continues to demand more space. If we OOM eventually by the kerenl, we would have died anyways from OOM now by ourself. 15 December 2023, 17:35:07 UTC
2c2ea3a Document environment variable JULIA_PKG_PRESERVE_TIERED_INSTALLED (#52362) This is based on ```julia julia> using Pkg help?> Pkg.add ... │ Note │ │ To change the default strategy to PRESERVE_TIERED_INSTALLED set the env var │ JULIA_PKG_PRESERVE_TIERED_INSTALLED to true. ... ``` I suggest to backport this so that it becomes available in the release docs of Julia v1.9 and newer. 15 December 2023, 15:53:35 UTC
9fc1b65 clarify permutedims docs (#52261) As commented [on discourse](https://discourse.julialang.org/t/how-do-we-julians-win-big-when-the-situation-is-so-unfair/106433/63?u=stevengj), it would be nice if the `permutedims` examples began with something like an array of strings where `transpose` is inapplicable. This PR simply clarifies the docs and adds a few more examples. --------- Co-authored-by: Haakon Ludvig Langeland Ervik <45243236+haakon-e@users.noreply.github.com> Co-authored-by: Jishnu Bhattacharya <jishnub.github@gmail.com> 15 December 2023, 06:24:22 UTC
d0efc5c 🤖 [master] Bump the Pkg stdlib from 5f666b077 to 85f1e5564 (#52537) 15 December 2023, 01:01:55 UTC
5e4e7fa remove unnecessary `\up` (upright) from some latex abbrevs (e.g. \upMu -> \Mu) (#50925) Closes #50911. Closes #50913. There were a few oddball symbols prefixed with `\up` (for "upright") for no reason that I can tell, ala the LaTeX "upgreek" package, even though we don't use an `\up` prefix for other upright Greek letters (e.g. we have `\alpha`, not `\upalpha`, even though it isn't italicized — we have `\italpha` for italic alpha). Not breaking since this is just a UI thing. (In practice, I doubt many people use these symbols. e.g. `\upMu` is `Μ`, which looks a lot like the Latin `M`. But there is no reason to have the `\up` prefix here. It seems to have just been an automated abbreviation-import snafu. And [`\upkoppa 'ϟ'` (U+O3DF)](https://www.compart.com/en/unicode/U+03DF) is visually quite distinctive though I've never seen it used in math, not to mention lowercase — it's definitely goofy to have an `\up` prefix for it.) 15 December 2023, 00:17:27 UTC
e9b0fa1 Add preference for version named manifest files (#43845) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 14 December 2023, 19:54:58 UTC
ad2d770 test: fix timeout changed by #52461 accidentally (#52534) 14 December 2023, 19:18:22 UTC
f345755 Reland "gc: avoid cpu stalls when starting" (#45794) 14 December 2023, 16:54:42 UTC
5195da2 Improve linear indexing performance for FastSubArrays (#45371) This PR forwards `AbstractUnitRange` indices for `FastSubArrays` to the parent, making use of the fact that the parent might have efficient vector indexing methods defined. --------- Co-authored-by: Jishnu Bhattacharya <jishnub@users.noreply.github.com> Co-authored-by: N5N3 <2642243996@qq.com> 14 December 2023, 12:24:16 UTC
d69bb97 Expand more Vararg elements during re-intersection if valid. (#46604) Our type intersection "prefers" `Tuple` with more parameters. This PR tries to replace `Tuple{Vararg{T,N}}` with `Tuple{T,T,T,Vararg{T,N}}` during re-intersection if we can prove that `N >= 3` and `N` is used only for Vararg length. 14 December 2023, 12:23:12 UTC
9147437 irinterp: Add :leave support (#52525) We still don't model exceptions, but the :leave expression doesn't participate in type refinement, so adding it here is easy. 14 December 2023, 07:08:14 UTC
0ae2094 Pass mutable copies to inplace LinearAlgebra functions (#52504) This gets some functions working with immutable matrix types, e.g.: ```julia julia> using FillArrays, LinearAlgebra julia> F = Fill(big(2), 4, 4) 4×4 Fill{BigInt}, with entries equal to 2 julia> det(F) 0 julia> triu(F) 4×4 Matrix{BigInt}: 2 2 2 2 0 2 2 2 0 0 2 2 0 0 0 2 ``` 14 December 2023, 05:01:42 UTC
b9668ee 🤖 [master] Bump the Pkg stdlib from debc38b9a to 5f666b077 (#52521) 14 December 2023, 01:17:34 UTC
ab1dda2 add missing increment of nrunning for jl_adopt_thread 13 December 2023, 21:24:39 UTC
3495404 handle data-race on nrunning==0 from scheduler_delete_thread Could be observed by thread 0 during certain phases, since if the dying thread was not running, it was not supposed to call jl_wakeup_thread (which will not increment nrunning until after the wakeup). 13 December 2023, 21:24:39 UTC
c92ce0a Reland "gc: avoid cpu stalls when starting" This reverts commit 4801b6ce9a4d737ad1722ca620a7bc8087590f2e and adds the safepoints needed to catch the unsafe->safe transition also and the locks needed for the condition broadcast message to be seen. 13 December 2023, 21:23:50 UTC
c601f39 Update crc32c.c register constraints again (#52437) As suggested in #52326#issuecomment-1840999660 For https://github.com/JuliaPackaging/Yggdrasil/pull/7757#issuecomment-1840604944 13 December 2023, 15:05:00 UTC
282e466 spawn: permit using IOBuffer as stdout (#52461) People expect to use this (the docs even almost even suggested it at some point), so it is better to make it work as expected (and better than they can emulate) than to criticize their choices. Also fix a few regressions and handling mistakes in setup_stdios: - #44500 tried to store a Redirectable into a SpawnIO, dropping FileRedirect - CmdRedirect did not allocate a ProcessChain, so it would call setup_stdio then call setup_stdios on the result of that, which is strongly discouraged as setup_stdio(s) should only be called once - BufferStream was missing `check_open` calls before writing, and ignored `Base.reseteof` as a possible means of resuming writing after `closewrite` sends a shutdown message. - Add `closewrite` to more methods, and document it. Fixes #39311 Fixes #49234 Fixes #49233 Fixes #46768 13 December 2023, 14:54:42 UTC
1524466 follow up #52309 (#52499) 13 December 2023, 08:46:57 UTC
2f5daca fix alignment of emit_unbox_store copy (#52505) The dest alignment might be determined to be greater than the source. For example, observed with: code_llvm(dump_module=true, optimize=false, (Int,)) do x Pair(ntuple(i -> 0x00, 8), x) end Where the alignment of the first field of the Pair is at least 4, but the alignment of the ntuple data is 1. (discovered while analyzing an ARM build failure @staticfloat) 13 December 2023, 07:42:02 UTC
406f5b4 Make EnterNode save/restore dynamic scope (#52309) As discussed in #51352, this gives `EnterNode` the ability to set (and restore on leave or catch edge) jl_current_task->scope. Manual modifications of the task field after the task has started are considered undefined behavior. In addition, we gain a new intrinsic to access current_task->scope and both inference and the optimizer will forward scopes from EnterNodes to this intrinsic (non-interprocedurally). Together with #51993 this is sufficient to fully optimize ScopedValues (non-interprocedurally at least). 13 December 2023, 04:17:25 UTC
d27ed8f doc/src/manual/arrays.md: fix typo (#52502) Mix-up between `I_k` and `i_k`. I bolded the wrong part. 12 December 2023, 20:29:59 UTC
eba10dd CI: Start the Pkg tests very early on during the test suite (#52460) 12 December 2023, 17:03:05 UTC
0a6ae7c contrib/check-whitespace: Use / for all platform (#52468) When built on Windows, the source code build will not pass `check-whitespace`. _check-whitespace issues (truncated):_ ``` $ make check-whitespace Whitespace check found 1658 issues: src/flisp/aliases.scm:25 -- tab src/flisp/aliases.scm:27 -- tab src/flisp/aliases.scm:28 -- tab src/flisp/aliases.scm:29 -- tab src/flisp/aliases.scm:73 -- tab src/flisp/color.lsp:55 -- tab .... ``` Because `git ls-files` use `/` as a path separator on Windows. https://github.com/JuliaLang/julia/blob/649982aa0995c45165084baa643ce5c7c5b489cb/contrib/check-whitespace.jl#L33 _"git ls-files" output on win (truncated):_ ``` $ git ls-files -- *.jl base/Base.jl base/Enums.jl base/abstractarray.jl base/abstractarraymath.jl base/abstractdict.jl base/abstractset.jl base/accumulate.jl ... ``` But `joinpath` gives `\\` on win, so it won't match. https://github.com/JuliaLang/julia/blob/649982aa0995c45165084baa643ce5c7c5b489cb/contrib/check-whitespace.jl#L21-L29 Change: just use `/` for all platforms. 12 December 2023, 17:01:50 UTC
deef5a9 deduplicate some already global values in global cache (#52303) System image savings is negligible (almost everything in the parameters are already cached datatypes), but seems good enough to have it, since we can 12 December 2023, 16:52:15 UTC
9374e49 allow external `AbstractInterpreter` to overload `throw`-call handling (#52498) By defining new `abstract_throw` interface, which allows external `AbstractInterpreter` to customize the behavior of `throw`-call handling just by overloading `abstract_throw` method. This is particularly useful for JET. 12 December 2023, 09:03:25 UTC
e39e77f Fix `unaliascopy(::SubArray)` with `indices` of `Array{<:CartesianIndex}` (#47779) This PR fixes the bug caused by the trimming trick. `Base.index_lengths` is not a proper tool to calculate the trimmed shape as `indices` might consume more than 1 dim. And we can avoid the unneeded "`repeat`" when we meet `Array{CartesianIndex{0}}` Test added. Close #47644. 11 December 2023, 23:12:18 UTC
b71523e combine reduce_empty methods for Union{} eltypes (#51948) With #49470, these can all be dispatched to the same method now, avoiding unnecessary code duplication for this case. 11 December 2023, 17:36:47 UTC
3c2c5ce jltypes: try to reduce duplicate objects in type parameters We have this fairly small global cache of objects, so try to de-duplicate some other global objects with it. 11 December 2023, 17:34:22 UTC
2deff4d ircode: deduplicate Strings during deserialize instead of waiting for codegen 11 December 2023, 17:26:36 UTC
8cf7598 Make `jl_write_coverage_data` dllexported again (#52456) Closes #52452 11 December 2023, 17:25:46 UTC
bb28222 better support threads in precompile and jl_task_wait_empty (#52445) Add a `nrunning` counter which identifies (when zero) when there is nothing running anymore. Allowing us to gate all tasks on all threads on reaching a quiescent state, not just thread 0. This should let us better support running precompile with threads (since we will be ensured that all of them are asleep in a consistent state before serialization tries to inspect the process state). We could additionally stop them afterwards to make sure there is no way for them to begin running, even if we forgot about some other event source, but that seems unnecessary paranoia for now. Note it is quite hard to encounter currently, as most places where precompile happens currently try to force the number of threads to 1. But this should become more relevant in the future as more threads are supported in more places. This also may help generally with being able to ensure the IO loop is running on at least one thread (as that is currently lacking in this PR and on master). And also help with being able to decide on a more advanced tree-wakeup strategy, as we start to track how many threads are in various states of running and sleeping, relative to the amount of work they find. Fixes #52435 11 December 2023, 17:25:11 UTC
7b54ae7 relax type signature for PipeBuffer to accept AbstractVector{UInt8} (#52459) Fixes #48585 11 December 2023, 17:17:48 UTC
3accfe8 Improve `sizehint!` docstring about `shrink` arg (#52226) See https://github.com/JuliaLang/julia/pull/51929#discussion_r1390444453. 11 December 2023, 17:16:48 UTC
456951f Export several genericmemory-related functions from C (#52475) The functionality of `jl_array_isassigned`, `jl_arrayref`, `jl_arrayset`, and `jl_arrayunset` has been moved to new functions, but those new functions aren't exported. This PR exports them. 11 December 2023, 13:32:26 UTC
69e9005 Fix typos (#52479) Fix typos 11 December 2023, 09:46:47 UTC
2fe4190 Reduce code duplication in `eigen(::AbstractMatrix)` methods (#52450) This also fixes the following: ```julia julia> D = Diagonal(Float16[1,2,4]) 3×3 Diagonal{Float16, Vector{Float16}}: 1.0 ⋅ ⋅ ⋅ 2.0 ⋅ ⋅ ⋅ 4.0 julia> eigen(Array(D)) # returns Float32 Eigen{Float32, Float32, Matrix{Float32}, Vector{Float32}} values: 3-element Vector{Float32}: 1.0 2.0 4.0 vectors: 3×3 Matrix{Float32}: 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 julia> eigen(D) # returns Float16 as expected Eigen{Float16, Float16, Matrix{Float16}, Vector{Float16}} values: 3-element Vector{Float16}: 1.0 2.0 4.0 vectors: 3×3 Matrix{Float16}: 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 ``` After this, ```julia julia> eigen(Array(D)) Eigen{Float16, Float16, Matrix{Float16}, Vector{Float16}} values: 3-element Vector{Float16}: 1.0 2.0 4.0 vectors: 3×3 Matrix{Float16}: 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 ``` 11 December 2023, 04:37:14 UTC
5e9cd58 Use optimised string search methods for substrings, too (#52424) Allow searching for ASCII chars in substrings to use memchr, and other similar optimisations. Previously, only String was special cased. 11 December 2023, 02:29:06 UTC
d90fa45 Fix minimum/maximum over dimensions with missing values (#35323) `v0 != v0` returns `missing` for missing values. Use the largest/smallest non-missing value to initialize the array. This is an inefficient approach. Faster alternatives would be to avoid using an initial value at all, and instead keep track of whether a value has been set in a separate mask; or to use `typemax`/`typemin` for types that support them. Fixes #35308. 10 December 2023, 15:45:21 UTC
e2a26aa use atomics in the write barrier slow path (#52463) Use atomics in the write-barrier slow-path to prevent duplicates in the remset. As discussed in https://github.com/JuliaLang/julia/issues/50419, setting the mark bit is idempotent, but updating page metadata in the mark phase is not. 10 December 2023, 14:27:08 UTC
84cfe04 add `wrap` function which is the safe counterpart to `unsafe_wrap`. (#52049) 09 December 2023, 21:38:11 UTC
abeb68f make `rationalize` default to use `Int` on `Irrational` (and `Real`) (#46656) Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> 09 December 2023, 17:01:26 UTC
649982a [REPLCompletions] support method invalidation (#52448) 09 December 2023, 01:05:25 UTC
551b37a 🤖 Bump the Statistics stdlib from 04e5d89 to 68869af (#52431) Stdlib: Statistics URL: https://github.com/JuliaStats/Statistics.jl.git Stdlib branch: master Julia branch: jn/loading-stdlib-exts Old commit: 04e5d89 New commit: 68869af Julia version: 1.11.0-DEV Statistics version: 1.11.1(Does not match) Bump invoked by: @vtjnash Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaStats/Statistics.jl/compare/04e5d8916fae616f5ad328cf6a0b94cf883b8ba6...68869af06e8cdeb7aba1d5259de602da7328057f ``` $ git log --oneline 04e5d89..68869af 68869af Bump patch for version 1.11.1 89f5fc7 Create tagbot.yml dc844db CI: restore v1.9.4 to build matrix (#159) d0523ae relax test for mapreduce_empty (#156) d1c1c42 Drop support for v1.9 in CI (#157) bfc6326 Fix `quantile` with `Date` and `DateTime` (#153) b8ea3d2 Prevent overflow in `mean(::AbstractRange)` and relax type constraint. (#150) a88ae4f Document MATLAB behavior in `quantile` docstring (#152) 46290a0 Revert "Prepare standalone package, step 2 (#128)" (#148) 81a90af make SparseArrays a weak dependency (#134) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 08 December 2023, 19:41:58 UTC
9723de5 loading: support extensions for stdlibs (an implicit env) (#52428) Some groundwork for https://github.com/JuliaStats/Statistics.jl/pull/134 which is bumped (and thus tested) in #52431 that will be merged after this 08 December 2023, 16:34:05 UTC
bf6c31c docs: add notes about scratchspaces in depot (#52367) Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> 08 December 2023, 14:46:55 UTC
3b9c39a Remove `Pkg` dependency from `SuiteSparse_jll` (#52441) This dependency seems to be superfluous, and `Pkg` brings lots of dependencies into the project (Downloads, LibGit2, etc.) which makes it hard to create leaner binary packages via `PackageCompiler` for projects that depend on `SuiteSparse_jll`. 08 December 2023, 14:37:11 UTC
5dfaef7 Limit REPL suggestions to modules from which name is exported/public (#52418) Close #52387 by implementing the suggestion in https://github.com/JuliaLang/julia/issues/52387#issuecomment-1839152721. After this, in a fresh session ```julia julia> Diagonal ERROR: UndefVarError: `Diagonal` not defined in `Main` Suggestion: check for spelling errors or missing imports. Hint: a global variable of this name also exists in LinearAlgebra. ``` 08 December 2023, 03:39:30 UTC
80ba457 `BLAS.geru!` added (#51951) Closes https://github.com/JuliaLang/LinearAlgebra.jl/issues/12. **PR Checklist** - [x] added BLAS.geru! function in stdlib/LinearAlgebra/src/blas.jl - [x] also added test cases for it in stdlib/LinearAlgebra/test/blas.jl --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com> Co-authored-by: mikmoore <95002244+mikmoore@users.noreply.github.com> Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> 08 December 2023, 03:33:30 UTC
cfc4289 improve exception type inference for core math functions (#52254) Continued from #52241. This PR focuses on improving exception type inference for core math functions by using new callsite `Base.@assume_effects` annnotation. 08 December 2023, 01:14:54 UTC
1f4b33a Rm outdated code to outline value-position GlobalRef/Expr (#52446) Since this code was written, we have adjusted the semantics of IRCode to disallow non-constant GlobalRefs or non-trivial Exprs in statement position. 08 December 2023, 01:04:43 UTC
1e20c9c sroa: Handle looking through chains of KeyValue instances (#52369) Addresses an outstanding todo from the KeyValue PR and allows (once all the PRs are merged), optimization when multiple ScopedValues are used `with(a=>1, b=>2)`, etc. To facilitate this, in addition to the sroa adjustment, the ScopedValue code is adjusted to unroll the PersistentDict creation so that the optimizer can see the full chain (we do not support loops in the optimizer). 08 December 2023, 01:02:18 UTC
727142a Specialize eps(::IEEEFloat) (#52087) `eps(::IEEEFloat)` can be made notably faster. I doubt this function appears in performance-critical places, but better is better and this new version is branch-free. ```julia-repl julia> using BenchmarkTools julia> x = randn(2^10); julia> @btime map(eps,$x); # v1.9.1 2.067 μs (1 allocation: 8.12 KiB) julia> @btime map(eps,$x); # this PR 613.095 ns (1 allocation: 8.12 KiB) ``` A couple probably-negligible caveats that arise from the use of floating point arithmetic in this implementation: - The previous version always returned Julia's canonical `NaN` when the result would be NaN. In this PR, the NaN payload depends on the payload behavior of the hardware and the input. - The result is vulnerable to flush-to-zero floating point environments, in which case subnormal results will be flushed to `zero(T)`. The usability of a subnormal result amidst flushing mode is questionable, as is the well-posed-ness of `eps`'s semantics in such a situation. *Note that the existing implementation has this same vulnerability (due to `ldexp`), though only when the input to `eps` is normal and the result would be subnormal (only with an input of zero or a subnormal is a correct subnormal output produced, assuming the flushing occurs during arithmetic but not storage).* Canonicalizing `NaN` would require a simple `ifelse` switch on the result, though I can't imagine we care. Guaranteeing a proper subnormal result in flush-to-zero mode may be more challenging (and may warrant a branch) and is only handled slightly more correctly by the preexisting implementation. I imagine that flushing breaks a lot more functions than just this one, anyway. --------- Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 07 December 2023, 21:02:06 UTC
710bf90 Make type hashing `:total` (#52427) Since types can't really be deleted and the hash of a type is already being cached inside of the type object itself, it should be legal to mark the `ccall` retrieving that hash as `:total`, permitting hashing of types to be concretely evaluated. I'm unsure if the test I've added is good as written, or whether this should be done differently. --------- Co-authored-by: Sukera <Seelengrab@users.noreply.github.com> Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 07 December 2023, 20:52:39 UTC
46ad1c1 support if cache has a mixture of depot and non-depot includes (#52346) 07 December 2023, 18:17:03 UTC
0ba0157 sroa: Lift restriction that all_same optimization must give SSAValue (#52338) This restriction has been in there since this code was added in #44557. Unfortunately, I can't tell from the commit history why this restriction was added. It's possible that it was trying to avoid putting things into statement position that were not allowed in the phi block, but we have cleaned that up since (#50308 and related), so let's see if this restriction is still required, since I was seeing some suboptimial optimization results because of this. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 07 December 2023, 17:06:31 UTC
79de5f3 Declare some LinearAlgebra types and functions to be public (#52420) 07 December 2023, 16:26:52 UTC
e5046b4 Bump LLVM to 15.0.7+10 to fix GC issue (#52405) 07 December 2023, 16:21:38 UTC
067e02e Optimize `sort!` for AbstractArray (#52278) - Use `foreach` to union-split on dim rather than using dynamic dispatch. This is reasonable because it is unrolling to a finite set with size equal to `ndims` (e.g. 2) For high dimension arrays, this may still use dynamic dispatch (which is okay!) - When `dims != 0`, we're sorting slices with non-one step size. These are slow to sort so for large inputs copy to a contiguous array, sort that, and copy back. - For very short inputs, don't even allocate a scratch space. 07 December 2023, 15:02:13 UTC
b0abf95 Add `shuffle!` algorithm specialized for `AbstractArray{Bool}` (#52133) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> Co-authored-by: Denis Barucic <barucic.d@gmail.com> 07 December 2023, 14:54:05 UTC
431964f Remove the GMP.round function (#52319) 07 December 2023, 14:27:02 UTC
39ccdb2 Bunchkaufman- and LU-decomposition based generalized eigenvalues and eigenvectors (#50471) Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 07 December 2023, 11:21:05 UTC
9a0d209 Use IndexStyle in `diagind` to optionally return a range of `CartesianIndex`es (#52115) 07 December 2023, 11:06:31 UTC
71ee30f Expand geqp3! docs and replace Vectors with Refs (#51555) 07 December 2023, 10:01:05 UTC
75fdd86 clarify at-views docstring (#52374) 07 December 2023, 09:07:57 UTC
fa69f9c Fix type check in poll_fd() exception handler (#52377) 07 December 2023, 03:38:34 UTC
83abbcd [REPLCompletions] improve `REPLInterpreter` effects of dict operations (#52347) This should allow more completions for cases involving dict operations. 07 December 2023, 03:22:24 UTC
c731edb irinterp: skip `nothing` statement when analyzing `:nothrow` and `:noub` (#52417) This commit makes irinterp skip `nothing` statements when looking through `:nothrow` and `:noub` flags of all statements. This is necessary since `nothing` can be inserted as a dummy node, e.g. to prevent CFG change by `finish_current_bb!`, without explicitly marking it as `IR_FLAG_NOTHROW`. Alternatively, rather than altering irinterp, it might be better to mark `IR_FLAG_NOTHROW` (and maybe even `IR_FLAG_EFFECT_FREE` and other flags too) where those `nothing` statements are inserted. But I wasn't confident that this would address all scenarios or if it's the best way to go, so this commit opts for the previously mentioned symptomatic approach. 07 December 2023, 01:57:47 UTC
bdbee27 effects: support callsite `@assume_effects` annotation (#52400) 06 December 2023, 22:06:48 UTC
856e112 channels: fix memory ordering violation in iterate (#52407) Channel `iterate` calls might miss trailing items without this patch. I have not seen proof of this reaching a failure, but we do appear to be missing this ordering specification in visual review. Should not make a difference to generated code on x86, which already has TSO guaranteed, but may alter optimizations and other CPUs with weaker memory orderings. 06 December 2023, 15:35:44 UTC
3aa943b Sort exported names from LinearAlgebra [nfc] (#52419) 06 December 2023, 15:24:51 UTC
e2af398 add a test for page utilization metric (#52411) 06 December 2023, 15:12:40 UTC
627210d Return of the `tilebufsize` (#52422) See https://github.com/JuliaLang/julia/pull/52298#discussion_r1417407376. 06 December 2023, 14:36:51 UTC
dbb797f add two-arg `@macroexpand[1]` (#52416) So that we can provide a module context to evaluate in. This is more aligned with the design of `@eval` and `Meta.@lower`. 06 December 2023, 14:31:35 UTC
back to top