sort by:
Revision Author Date Message Commit Date
f2403e0 fix tests on Windows 13 October 2023, 21:48:47 UTC
248e38a add some test cases 13 October 2023, 21:48:18 UTC
b92bb7c fixup implementation, adapt to #51581 13 October 2023, 21:47:44 UTC
6effc0e fix replacement location 13 October 2023, 21:47:44 UTC
edcb07c fixup! 13 October 2023, 21:47:44 UTC
1ef4604 fix tests 13 October 2023, 21:47:43 UTC
5038ecb cleanup 13 October 2023, 21:47:43 UTC
023082a smarter path completions in REPL shell mode Uses the fancy new inference-based completion infrastructure to complete expressions like `ls $(DEPOT_PATH[1])/<tab>` in the REPL shell. Currently doesn't extend to path completions for cmd and string literals in the normal REPL mode, but that shouldn't be too hard to add. Still needs tests 13 October 2023, 21:47:43 UTC
a3effa9 add effects for `Cmd` constructor (#51543) These can't be synthesized automatically because the implementation uses mutation in a mix of loops and recursion Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 13 October 2023, 21:28:14 UTC
3250804 clarify docs on for loops for general iterators (#51639) This PR updates the `for` loop documentation in the manual, in two ways: 1. It moves the information that `for` can loop over arbitrary containers up, before the more technical documentation about the scoping rules. I feel like the more basic information should go first. 2. It says a few more words about what a general iterator is, and gives an example of a `StepRange`. That's in response to [this discourse thread](https://discourse.julialang.org/t/julia-documentation-about-for-loop/104725) that non-unitrange loops are important for beginners but are somewhat buried. 13 October 2023, 20:11:34 UTC
97e3c5e mention .= in assignment-vs-mutation docs (#51681) This seemed like an omission from that section, in the paragraph listing syntaxes that mutate an object. --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de> 13 October 2023, 18:46:59 UTC
42fb22e loader: Provide memset, and use hidden visibility instead of symbol renaming. (#51682) This ensures that the compiler may generate calls to these functions. 13 October 2023, 17:56:00 UTC
3df63a1 irinterp: Allow Expr(:boundscheck) in statement position (#51688) We didn't used to see these because :boundscheck in statement position would always taint consistency, but with the recent consistency refinement this is reachable, so it needs to be in the list. 13 October 2023, 17:17:30 UTC
8a847d5 Revert "Reinstate load-time Pkg.precompile" (#51675) 12 October 2023, 15:02:19 UTC
e949236 Handle infix operators in REPL completion (#51366) Fix https://github.com/JuliaLang/julia/issues/51194 This PR fixes a regression introduced in https://github.com/JuliaLang/julia/pull/49294, so I believe it should be backported to v1.10. In the current code, completion of `qux(foo, bar.` is detected by parsing `foo(qux, bar` as an incomplete expression, and then looking for the sub-expression to complete (here, `bar.`). This approach fails however for infix calls, since completing `foo + bar.` starts by parsing `foo + bar`, which is a complete call expression, and so the code behaves as if completing `(foo + bar).` instead of `bar.`. This leads to the current problematic behaviour: ```julia julia> Complex(1, 3) + (4//5).#TAB im re ``` which would be correct for `(Complex(1, 3) + (4//5)).#TAB`, but here we expect ```julia julia> Complex(1, 3) + (4//5).#TAB den num ``` This PR fixes that by trying to detect infix calls. In the long term, all this ad-hoc and probably somewhat wrong string processing should be replaced by proper use of `JuliaSyntax` (as mentioned in https://github.com/JuliaLang/julia/pull/49294#issue-1659443492, https://github.com/JuliaLang/julia/issues/50817#issuecomment-1668773346 and probably other places), but for now at least this fixes the regression. 12 October 2023, 11:15:22 UTC
71872d1 Forward `copyto!` for `Adjoint` to `adjoint!` (#51650) 12 October 2023, 08:18:43 UTC
a045313 Reinstate load-time Pkg.precompile (#51672) 12 October 2023, 05:15:01 UTC
64a127d Update link for reference for day to date conversions (#51651) Previous link is dead link --------- Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com> 11 October 2023, 16:05:24 UTC
3711749 lowering: Keep track of which :enter correspond to which :leave (#51590) This should be NFC and is intended to allow the optimizer to delete :enter statements (by replacing them with `nothing`), without leaving dangling `:leave`s around. This is accomplished by having `leave` take (a variable number of) `:enter` tokens (that are already being used by `:pop_exception`). The semantics are that a literal `nothing` or an SSAValue pointing to a `nothing` statement are ignored, and one exception handler is popped for each remaining argument. The actual value of the token is ignored, except that the verifier asserts that it belongs to an `:enter`. Note that we don't need to do the same for :pop_exception, because the token generated by an `:enter` is semantically only in scope for :pop_exception during its catch block. If we determine the `:enter` is dead, then its catch block is guaranteed to not be executed and will be deleted wholesale by cfg liveness. I was considering doing something fancier where :leave is changed back to taking an integer after optimization, but the case where the IR size is bigger after this change (when we are `:leave`ing many handlers) is fairly rare and likely not worth the additional complexity or time cost to do anything special. If it does show up in size benchmarks, I'd rather give `:leave` a special, compact encoding. 11 October 2023, 14:41:22 UTC
8180240 Allow tab after key name in TOML.parse (#51622) Fixes https://github.com/JuliaLang/TOML.jl/issues/52 11 October 2023, 13:55:53 UTC
72779b5 Do not shrink `Dict`/`Set` in `merge!`/`union!` (#51629) 11 October 2023, 13:52:20 UTC
be1702e Add eachrsplit iterator (#51646) Unlike rsplit, this iterator returns split substrings right to left, but other- wise it behaves just like eachsplit. This design has been chosen to avoid either a costly double traversal of the input string, or needing a stack to store the strings. Both of these workarounds would lessen the appeal compared to simply using rsplit. Closes https://github.com/JuliaLang/julia/issues/45385 11 October 2023, 13:51:34 UTC
342e394 Add debug_info_level to cgparams (#51484) 11 October 2023, 13:18:54 UTC
abf5d9e [LibCURL_jll] Upgrade to v8.4.0 (#51667) 11 October 2023, 12:41:30 UTC
1abafe8 [OpenBLAS_jll] Upgrade to v0.3.24 (#51660) Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> 11 October 2023, 07:57:26 UTC
e10c8f5 🤖 [master] Bump the Pkg stdlib from 3960c692b to b02fb9597 (#51652) Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 10 October 2023, 16:56:01 UTC
651aef9 Use llvm::SmallVector instead of std::vector for bounds checking (#51579) This should catch issues like https://github.com/JuliaLang/julia/issues/51561, at least when running with `FORCE_ASSERTIONS := 1` (as PkgEval does). 10 October 2023, 12:38:24 UTC
f82f0d4 Random: allow string seeds (#51527) We used to be able to seed RNGs with a string, but that string was interpreted as the filename containing the actual seed. This was deprecated in #21359, in order to later allow using a string seed directly, which this patch does. --------- Co-authored-by: Nathan Zimmerberg <39104088+nhz2@users.noreply.github.com> 10 October 2023, 12:10:25 UTC
a857a86 make sure `rand(sampler, dims)` works (#51643) For any object `x` from which one can sample, the `Random` API also requires that `rand(rng, Sampler(typeof(rng), x), [dims])` works. So add tests for that, and fix `rand(Tuple{...})` accordingly, which was not using `SamplerTag` fully correctly. More precisely, the `Sampler` constructor for tuple types was returning a `SamplerTag` object whose `gentype` was returning the wrong type, leading to the wrong eltype of the output array for a call like `rand(rng, Sampler(rng, Tuple{...}), dims)`, so filling this array with random values was failing. 10 October 2023, 12:03:35 UTC
ecaf457 srcfile module check: also allow single line docstrings (#51648) 10 October 2023, 06:49:02 UTC
6da54ce Check that file being precompiled contains a module (#51635) 09 October 2023, 21:25:33 UTC
4115c72 Create rand function for Base.KeySet and Base.ValueIterator{Dict} (#51608) Fixes #51605 . I also created a version of rand for `Base.ValueIterator{Dict}` which currently throws an error. 09 October 2023, 10:06:59 UTC
f4e1a15 Use `oneto` instead of `OneTo` when constructing `LinearIndices` (#51578) This permits constructing `LinearIndices` for infinite arrays, for which the axes can't be a `Base.OneTo`: ```julia julia> using InfiniteArrays julia> L = LinearIndices(1:∞) ℵ₀-element LinearIndices{1, Tuple{InfiniteArrays.OneToInf{Int64}}} with indices OneToInf(): 1 2 3 4 5 6 7 8 9 10 ⋮ ``` 09 October 2023, 05:59:26 UTC
f90fd72 Main entrypoint take 3 - revenge of the macro (#51435) As they say, if at first you don't succeed, try again, then try again, add an extra layer of indirection and take a little bit of spice from every other idea and you've got yourself a wedding cake. Or something like that, I don't know - at times it felt like this cake was getting a bit burnt. Where was I? Ah yes. This is the third edition of the main saga (#50974, #51417). In this version, the spelling that we'd expect for the main use case is: ``` function (@main)(ARGS) println("Hello World") end ``` This syntax was originally proposed by `@vtjnash`. However, the semantics here are slightly different. `@main` simply expands to `main`, so the above is equivalent to: ``` function main(ARGS) println("Hello World") end @main ``` So `@main` is simply a marker that the `main` binding has special behavior. This way, all the niceceties of import/export, etc. can still be used as in the original `Main.main` proposal, but there is an explicit opt-in and feature detect macro to avoid executing this when people do not expect. Additionally, there is a smooth upgrade path if we decide to automatically enable `Main.main` in Julia 2.0. 08 October 2023, 23:10:30 UTC
e81c8e3 Docs: fix typos and grammar (#51547) doc: Corrected some sentences. --------- Co-authored-by: Christian Guinard <chguinard99@gmail.com> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> 08 October 2023, 14:20:27 UTC
341e9d0 Don't mark nonlocal symbols as hidden (#51596) Co-authored-by: Prem Chintalapudi <prem.chintalapudi@gmail.com> 07 October 2023, 22:53:10 UTC
aa42963 inference: better align type_more_complex with _limit_type_size for Type (#51600) A small further extension to #51512 to better align the internal behavior of the `_limit_type_size` and `type_more_complex` computations. 07 October 2023, 21:22:08 UTC
3bb0392 support random sampling of tuple types: add tests (#51630) This is a rebase of #35856, where we keep only the tests, as the functionality was added in #50251. This also adds the possibility to call `rand` on an empty tuple type: `rand(Tuple{})`. Co-authored-by: Stephan Hilb <stephan@ecshi.net> 07 October 2023, 20:01:33 UTC
e4c9031 add rand(::Type{<:Pair}) (#28705) This adds e.g. `rand(Pair{Int,Int})` producing a random pair of `Int`. 07 October 2023, 20:00:04 UTC
0296599 Random: better handling of the "global seed" (using TLS) (#51526) We maintain a "global seed" for this feature of `@testset`: > Before the execution of the body of a @testset, there is an implicit call to Random.seed!(seed) where seed is the current seed of the global RNG. Moreover, after the execution of the body, the state of the global RNG is restored to what it was before the @testset. This is meant to ease reproducibility in case of failure, and to allow seamless re-arrangements of @testsets regardless of their side-effect on the global RNG state. But since we don't use `MersenneTwister` as the "global RNG" anymore, we need to maintain a separate "global seed" object. So far we literally used a global object `Random.GLOBAL_SEED` storing the original seed, but it's not robust when multi-tasking is involved: e.g. ```julia seed!(0) x = rand() seed!(0) @sync begin @async @testset "A" begin seed!(1) # reset GLOBAL_SEED to V2 sleep(2) end # reset GLOBAL_SEED to its original value V1 sleep(0.5) @async @testset "B" begin # here seed!(2) above has already been called # so @testset B recorded value V2 as the "original" value of GLOBAL_SEED seed!(2) sleep(2) # here @testset A already finished end # reset GLOBAL_SEED to the wrong original value V2 end @testset "main task" begin # async tests didn't mutate this task's global seed @test x == rand() # fails! end ``` So we store here a "global seed" in `task_local_storage()`, which is set when `seed!()` is invoked without an explicit RNG, and defaults to `Random.GLOBAL_SEED`, which is set only once when `Random` is loaded. And instead of actually storing a seed, we store a copy of the RNG state. This is still not ideal, in that at the beginning of `@testset "A"` or `@testset "B"`, we can't do `@test x == rand()`, because these are in separate tasks, so the global seed defaults to `Random.GLOBAL_SEED`, and not to the global seed of the parent's task; there might be a nice way to handle that, but at least different tasks don't corrupt each-other's seeds. 07 October 2023, 19:55:47 UTC
fee7551 Move Distributed out of Base (#51621) 07 October 2023, 18:36:00 UTC
41184cc Fix typo in compat note (#51627) 07 October 2023, 18:13:33 UTC
60b10de fix whitespace (#51625) From #51550 --------- Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 07 October 2023, 01:38:29 UTC
fd21c96 Highlight manifests from other versions when failing to find packages (#51613) 06 October 2023, 23:46:41 UTC
6fc6a97 Add excise stdlib script (#51550) 06 October 2023, 19:40:25 UTC
1d6ee7e slightly speed up cartesian indexing (#51606) This is a minor simplification to the multidimensional iteration code that behaves slightly better in the presence of possible overflow (at least according to LLVM. This was found when looking into performance regressions caused by https://github.com/JuliaLang/julia/pull/51319 since that makes `Array` rely more on the regular multidimensional code rather than being special cased. This PR does remove/alter a few tests, but they are all tests of iteration when given an invalid iterator state which we specifically document as a thing that does not work. Co-authored-by: Jameson Nash <vtjnash@gmail.com> 06 October 2023, 16:19:38 UTC
5488b81 [REPLCompletions] fix #51548, set up a mode to limit the scope of the aggressive inference (#51581) It turns out that when using `REPLInterpreter` inference for tasks like evaluating (partially) interpolated paths in shell mode, we need to ensure accuracy of the inference result, requiring `REPLInterpreter` to disable its aggressive inference (xref: <https://github.com/JuliaLang/julia/pull/51581#issuecomment-1749732045>). To this end, this commit adds an optional argument `limit_aggressive_inference::Bool=false` to `repl_eval_ex`. This mode will allow future REPL completion code to utilize it when prioritizing correct inference results over a wider range of completion opportunities. Note that that mode is disabled by default, so our current completion capabilities are preserved. Fixes #51548. 06 October 2023, 14:29:35 UTC
3f23533 add an ability to suspend/resume a thread in a GC-safe way (#51489) This exposes the GC "stop the world" API to the user, for causing a thread to quickly stop executing Julia code. This adds two APIs (that will need to be exported and documented later): ``` julia> @ccall jl_safepoint_suspend_thread(#=tid=#1::Cint, #=magicnumber=#2::Cint)::Cint # roughly tkill(1, SIGSTOP) julia> @ccall jl_safepoint_resume_thread(#=tid=#1::Cint)::Cint # roughly tkill(1, SIGCONT) ``` You can even suspend yourself, if there is another task to resume you 10 seconds later: ``` julia> ccall(:jl_enter_threaded_region, Cvoid, ()) julia> t = @task let; Libc.systemsleep(10); print("\nhello from $(Threads.threadid())\n"); @ccall jl_safepoint_resume_thread(0::Cint)::Cint; end; ccall(:jl_set_task_tid, Cint, (Any, Cint), t, 1); schedule(t); julia> @time @ccall jl_safepoint_suspend_thread(0::Cint, 2::Cint)::Cint hello from 2 10 seconds (6 allocations: 264 bytes) 1 ``` The meaning of the magic number is actually the kind of stop that you want: ``` // n.b. suspended threads may still run in the GC or GC safe regions // but shouldn't be observable, depending on which enum the user picks (only 1 and 2 are typically recommended here) // waitstate = 0 : do not wait for suspend to finish // waitstate = 1 : wait for gc_state != 0 (JL_GC_STATE_WAITING or JL_GC_STATE_SAFE) // waitstate = 2 : wait for gc_state != 0 (JL_GC_STATE_WAITING or JL_GC_STATE_SAFE) and that GC is not running on that thread // waitstate = 3 : wait for full suspend (gc_state == JL_GC_STATE_WAITING) -- this may never happen if thread is sleeping currently // if another thread comes along and calls jl_safepoint_resume, we also return early // return new suspend count on success, 0 on failure ``` Only magic number 2 is currently meaningful to the user though. The difference between waitstate 1 and 2 is only relevant in C code which is calling this from JL_GC_STATE_SAFE, since otherwise it is a priori known that GC isn't running, else we too would be running the GC. But the distinction of those states might be useful if we have a concurrent collector. Very important warning: if the stopped thread is holding any locks (e.g. for codegen or types) that you then attempt to acquire, your thread will deadlock. This is very likely, unless you are very careful. A future update to this API may try to change the waitstate to give the option to wait for the thread to release internal or known locks. 06 October 2023, 13:32:59 UTC
0ab032a optimize: revise inlining costs (#51599) Add a bonus for Intrinsics called with mostly constant arguments. We know that simple expressions like `x*1 + 0` will get optimized later by LLVM, and also likely fold into other expressions, so try to reflect that in the cost estimated earlier. Additionally rebalance some of the other costs to more accurately reflect what they take in assembly. 06 October 2023, 13:24:03 UTC
f919e8f Fix infinite loop when inputs are `Inf` (#51554) 06 October 2023, 09:27:20 UTC
0d494e4 Mention allocation of `R` factor from QR (#51400) Co-authored-by: Ian McInerney <i.mcinerney17@imperial.ac.uk> 06 October 2023, 09:19:27 UTC
5487046 Add native support for BFloat16. (#51470) This PR adds native support for the LLVM `bfloat` type, through a new `BFloat16` type. It doesn't add any language-level functionality, only the bare minimum support (e.g. runtime conversion routines). Use of the BFloat16s.jl package is still required to use BFloat16 values. 06 October 2023, 08:49:20 UTC
20a5fa7 Use a simple error when reporting sysimg load failures. (#51598) `jl_errorexception_type` is undefined at the point we (fail to) load a sysimg. 05 October 2023, 15:14:12 UTC
5bdc1b3 correctly track element pointer in heap snapshot (#51592) Fixes https://github.com/JuliaLang/julia/issues/51576 on a simple snapshot I collected on my machine. 05 October 2023, 14:04:23 UTC
91f8020 Make REPL not slow-down if we load a valid cachefile (#51565) Fixes #51532. We have funny series of interactions. With the REPL and its dependencies being removed from the system image, we observed latency regressions when users create their own precompilation cache of REPL. During the precompilation of REPL we launch a subordinate process that we send statements too. Now we do want that process to use the existing cache of the REPL dependencies so we launch it with `--compiled-modules=existing`. Otherwise precompilation of REPL is even slower than it is now. When the user triggers recompilation of REPL due to the use of `-O3` the subordinate process sees a valid cache file for REPL itself. Thus no (or very few) precompilation statements are being generated. Leading to the cache file compiled with `-O3` to have a significant latency regression. In this PR I work around this by replaying the precompilation statements of REPL from the subordinate process. A bit hacky, but should be more reliable than trying to set up a "just right" depot, or filtering the REPL cache-file out. 05 October 2023, 13:45:57 UTC
0fd7f72 Aggressive constprop in LinearAlgebra.wrap (#51582) This helps with type-stability, as the flag `tA` is usually known from the type of the matrix. On master, ```julia julia> f(A) = LinearAlgebra.wrap(A, 'N') f (generic function with 1 method) julia> @code_typed f([1;;]) CodeInfo( 1 ─ %1 = invoke LinearAlgebra.wrap(A::Matrix{Int64}, 'N'::Char)::Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} └── return %1 ) => Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} ``` This PR ```julia julia> @code_typed f([1;;]) CodeInfo( 1 ─ return A ) => Matrix{Int64} ``` 05 October 2023, 12:52:47 UTC
c18e485 reset `maxprobe` on `empty!` (#51595) As pointed out in https://github.com/JuliaLang/julia/issues/51594#issuecomment-1747781744, this is necessary for the assertion added in https://github.com/JuliaLang/julia/pull/49447 to be valid. Fix #51594 05 October 2023, 12:29:49 UTC
25f510a avoid limiting Type{Any} to Type (#51512) Fix #51510 05 October 2023, 05:30:14 UTC
165f728 annotate method from `@ccallable` with `@__doc__` (#51587) This allows you to attach a docstring to a `@ccallable` method definition. Fixes #51586 04 October 2023, 21:20:08 UTC
f7e8f92 fix annotations on `sym_in` (#51573) This seems to be the right combination of annotations to fix both #50562 and an inference regression in PropertyDicts.jl on the 1.10 release branch. When backported the `@noinline` should be restored for 1.10. 04 October 2023, 21:16:41 UTC
9fb67c8 Improve deepcopy documentation to clarify reference behavior (#51569) The original text here: > For example, deep-copying an array produces a new array whose elements are deep copies of the original elements reads to me that its implementation would do something like `deepcopy(array) = [deepcopy(element) for element in array]`. That's the wrong mental model — we preserve relationships. This is tricky to talk about, but I think this gets at the crux of it. 04 October 2023, 19:22:59 UTC
b790cf8 Revert "Don't mark nonlocal symbols as hidden" (#51571) 03 October 2023, 20:35:38 UTC
0dd8d43 Move LazyArtifacts out of the mono-repo (#51549) 03 October 2023, 20:29:04 UTC
f2d1276 Fix last startup & shutdown precompiles (#51557) 03 October 2023, 12:04:36 UTC
a988992 [LAPACK] Update the dispatch of getrf! (#51486) `getrf!` should take the vector `ipiv` as input the same way that `geqrf!` uses the vector `tau`. 03 October 2023, 10:30:07 UTC
6a1af76 Bump libunwind. (#51545) Fixes https://github.com/JuliaLang/julia/issues/51465, caused by https://github.com/libunwind/libunwind/pull/203. Ref https://github.com/JuliaPackaging/Yggdrasil/pull/7466 03 October 2023, 00:30:03 UTC
ac8246f Don't mark nonlocal symbols as hidden (#51530) Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 02 October 2023, 12:42:23 UTC
7b83eac Markdown Docs: specify necessary indent (#51456) Rationale: currently, the Markdown documentation specifies the necessary indent for code blocks and lists only. As there are people out there, who indent their lines by only two spaces (or whatever amount) documenting the indent could help in finding the reason for malformed Markdown. See #45622. For an example where this problem occurred see https://github.com/oscar-system/Oscar.jl/pull/1369#discussion_r893488230. 02 October 2023, 11:16:02 UTC
4119dcf Fix copy-paste mistake in docs of Test (#51539) 02 October 2023, 11:13:40 UTC
6ce15fc Fix string index error in tab completion code, fixes #51540 (#51541) 02 October 2023, 11:13:24 UTC
e9d633f Update libc.jl compatability note (#51535) Update libc.jl compatability note to julia 1.11 01 October 2023, 18:36:22 UTC
64fc7db Add Libc.mkfifo (#34587) 01 October 2023, 11:54:41 UTC
b685650 fix some test noise that has been accumulating (#51508) 01 October 2023, 11:14:04 UTC
ca862df fix `_tryonce_download_from_cache` (busybox.exe download error) (#51531) 30 September 2023, 21:12:35 UTC
a4562e6 [REPLCompletions] fix #51505, guard against empty tuple expression (#51522) 30 September 2023, 19:05:02 UTC
292562c [REPLCompletions] enable aggressive inference for uncached child frames (#51503) The REPL completion engine employs aggressive inference (incorporating aggressive global binding resolution and aggressive concrete evaluation, ignoring `:consistent`-cy), enabling completions in scenarios such as: ```julia julia> d = Dict{Symbol,Any}(:key => Any[Some(r"x")]) julia> d[:key][1].value.<TAB> compile_options match_options pattern regex ``` While this approach has proven to be quite effective, it has its limitations, given that aggressive inference was only activated for the top-level representing an input code. Therefore, it fails to apply to general cases like: ```julia julia> getkeyelem(d) = d[:key][1] julia> getkeyelem(d).<TAB> # no TAB completion ``` This limitation is the underlying cause of the first part of #51499. To rectify this, the commit implements the following: 1. generalizes aggressive inference to apply to all child frames, when they are not cached. 2. enables aggressive constant propagation, allowing the propagation of mutable Consts. With these changes, now we can get: ```julia julia> getkeyelem(d). # TAB completes julia> getkeyelem(d).value. compile_options match_options pattern regex ``` In conjunction with #51502, this resolves #51499. 30 September 2023, 15:39:23 UTC
f27619c codegen: check addresspace before doing a bitcast for small tags (#51517) Fixes https://github.com/JuliaGPU/GPUCompiler.jl/issues/504. Similar to https://github.com/JuliaLang/julia/pull/38424 30 September 2023, 15:33:39 UTC
af9a7af Make allocopt respect the GC verifier rules with non usual address spaces (#51520) On AMDGPU, this was generating a `addrspace(10)` pointer to an `alloca` which is illegal and lead to other issues. 30 September 2023, 15:27:10 UTC
5006db1 improve performance of searchsorted(range, lt=<) (#50365) No behavior change, just a performance improvement: searchsorted(range, lt=<) now performs exactly as fast as searchsorted(range). Passing lt=< allows searchsorted to find floating point values such as -0.0, so it's useful to make it fast - see https://github.com/JuliaLang/julia/issues/44102#issuecomment-1418152295. 30 September 2023, 15:17:14 UTC
d988f8f [REPLCompletions] suppress false positive field completions (#51502) Field completions can be wrong when `getproperty` and `propertynames` are overloaded for a target object type, since a custom `getproperty` does not necessarily accept field names. This commit simply suppresses field completions in such cases. Fixes the second part of #51499. 30 September 2023, 06:44:19 UTC
0a4bea6 compiler: remove unused `:noinbounds` argument (#51506) 30 September 2023, 04:36:37 UTC
ab992b9 MersenneTwister: hash seeds like for `Xoshiro` (#51436) This addresses a part of #37165: > It's common that sequential seeds for RNGs are not as independent as one might like. This clears out this problem for `MersenneTwister`, and makes it easy to add the same feature to other RNGs via a new `hash_seed` function, which replaces `make_seed`. This is an alternative to #37766. 29 September 2023, 20:06:36 UTC
3a85776 fix out of place entry in NEWS.md (#51459) `pmap` is part of the Distributed std lib 29 September 2023, 19:28:59 UTC
8436f68 add rand dispatch for tuple types (#50251) as suggested by https://github.com/JuliaLang/julia/issues/50236 29 September 2023, 15:24:10 UTC
8ab635d Random: allow negative seeds (#51416) Alternative to #46190, see that PR for background. There isn't a strong use-case for accepting negative seeds, but probably many people tried something like `seed = rand(Int); seed!(rng, seed)` and saw it failing. As it's easy to support, let's do it. This might "break" some random streams, those for which the upper bit of `make_seed(seed)[end]` was set, so it's rare. 29 September 2023, 10:52:59 UTC
b74daf5 define `Random.GLOBAL_RNG = TaskLocalRNG()` (#51388) `GLOBAL_RNG` is a relic from pre-v1.3 when our global RNG was not thread-safe: ``` const GLOBAL_RNG = MersenneTwister() ``` `GLOBAL_RNG` was never really specified, but was referred to in docstrings (of `rand` etc.), and people had to use it in packages in order to provide a default RNG to their functions. So we have to keep defining `Random.GLOBAL_RNG` for the time being. In v1.3, we didn't have anymore a unique global RNG, but instead one per thread; in order to keep code using `GLOBAL_RNG` working, we got this new definition as a clever hack: ``` struct _GLOBAL_RNG <: AbstractRNG end const GLOBAL_RNG = _GLOBAL_RNG() ``` I.e. `GLOBAL_RNG` is just a "handle", which refers to the actual threaded-RNG when passed to `rand` functions. This entails defining most functions taking a `default_rng()` to also accept `_GLOBAL_RNG`. See #41123, and #41235 which is not even merged. But since v1.7, we have `Random.default_rng()` (our now official way to refer to the default RNG) returning `TaskLocalRNG()`, which is itself a "handle" (singleton). So we can as well redefine `GLOBAL_RNG` to be `TaskLocalRNG()` instead of `_GLOBAL_RNG()`, with the advantage that all the relevant methods are already defined for `TaskLocalRNG`. The only expected difference in behavior is `seed!(GLOBAL_RNG, seed)`, which previously would update `Random.GLOBAL_SEED` (a hack used by `@testset`), but now is equivalent to `seed!(TaskLocalRNG(), seed)`, which doesn't update this global seed. This precise behavior was never documented (`GLOBAL_SEED` is purely internal), so this should be fine. 29 September 2023, 08:30:58 UTC
29f2b2f Random: reorganize some tests (#51480) This groups some toplevel tests together, and removes hardcoded random values generated by `MersenneTwister` for a given seed. 29 September 2023, 08:08:16 UTC
c099639 More tests for replace with AbstractDict (#50902) Co-authored-by: Rafael Fourquet <fourquet.rafael@gmail.com> 29 September 2023, 07:31:11 UTC
d3fb3b6 Update public keyword compat note (#51496) Co-authored-by: @IanButterworth Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> 29 September 2023, 03:37:08 UTC
66fe51f Throw clearer ArgumentError for strip with two string args (#51491) 28 September 2023, 19:57:19 UTC
2d93567 Add jump functions (`jump`, `long_jump`) for `Xoshiro` (#47743) Straightforward implementations given https://xoshiro.di.unimi.it/xoshiro256plusplus.c This is useful functionality which does not interfere with any existing code. Utility aside, it is arguable that the jump functions are necessary to complete the implementation of `xoshiro256++` tooling. In essence, given that the `xoshiro` family supports jump functions, we would be remiss to neglect this capability. For most users, I expect that the existing `TaskLocalRNG` is more than sufficient (hence, why I propose that this not be exported, just like `seed!`). However, if/when one does want to total control, jump functions are a requirement. Use cases arise when one wishes to utilize a single seed (with state advanced sufficiently far as to give non-overlapping subsequences) as the basis for a parallel computation. The alternative is manual seeding, which lacks the flexibility required for testing (imagine a program which requires a variable number of sub-sequences, one for each parallel portion). If further justification is needed, [good precedent](https://docs.rs/rand_xoshiro/latest/rand_xoshiro/struct.Xoshiro256PlusPlus.html) exists. 28 September 2023, 13:49:16 UTC
ed891d6 Remove fallback that assigns a module to inlined frames. (#51405) The work I did in #41099 introduced code which, if method information could not be found for an inlined frame, would fall back to use the module of the next-higher stack frame. This often worked there because the only frames that would not be assigned a module at this point would be e.g., `macro expansion` frames. However, due to the performance impact of the way method roots are currently encoded, the extra method roots were removed in #50546. The result is that inlined frames were being assigned a potentially incorrect module, rather than being left blank. Example: ``` julia> @btime plot([1 2 3], seriestype = :blah) ... [13] #invokelatest#2 @ BenchmarkTools ./essentials.jl:901 [inlined] [14] invokelatest @ BenchmarkTools ./essentials.jl:896 [inlined] ... ``` 28 September 2023, 13:47:25 UTC
bf3eb09 REPLCompletions: remove unnecessary copy of top-level `CodeInfo` (#51490) 28 September 2023, 13:04:21 UTC
daeb1b4 Random.default_rng: clarify and expand documentation (#51385) Co-authored-by: Nathan Zimmerberg <39104088+nhz2@users.noreply.github.com> 28 September 2023, 12:49:20 UTC
50146b2 Handle `AbstractQ` in concatenation (#51132) Handling `AbstractQ`s in concatenation got lost in the overhaul. This brings it back (though it seemed to not be used anywhere), and even better: pre-1.9 `Q`s where handled via `AbstractMatrix` fallbacks, so elementwise. Now, it first materializes the matrix, and then copies to the right place in the destination array. 27 September 2023, 19:57:54 UTC
5e8f8a9 codegen: add src alignment arg to emit_memcpy (#51152) This maybe allows for LLVM to optimize things a bit further since some passes check if both sides have correct/equal alignment Co-authored-by: Jameson Nash <vtjnash@gmail.com> 27 September 2023, 15:17:00 UTC
c105167 Bump libunwind JLL to include revert. (#51477) Alternative to https://github.com/JuliaLang/julia/pull/51472 27 September 2023, 15:00:57 UTC
b6a748f 🤖 [master] Bump the Pkg stdlib from cf0019fbb to 3960c692b (#51464) 27 September 2023, 13:23:50 UTC
7428d8a Correct stat docstring on blocks' blocksize (#51460) The block size when reporting `blocks` is _always_ 512, regardless of the filesystem, on all systems we currently know about and support, and in particular is typically not the same as blksize (which is commonly reported as 4096). Fixes #51447 27 September 2023, 11:03:49 UTC
cde964f Fix segfault if root task is NULL (#51471) In `jl_print_task_backtraces()`. Follow-on to https://github.com/JuliaLang/julia/pull/51430. 27 September 2023, 10:20:30 UTC
back to top