https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
8a44d26 Merge branch 'master' into dk/blaspromo 01 April 2024, 17:34:13 UTC
e9d25ca Add `Base.isrelocatable(pkg)` (#53906) This PR adds a utility function `isrelocatable(pkg)` that can be used to check if `pkg` is already precompiled and if the associated cachefile is relocatable. The reason to implicitly perform the `isprecompiled` check is that the exact same computation needs to be done to find the right `.ji`. A `pkg` is said to be relocatable if 1. all `include()` paths are relocatable (they start with `@depot`), 2. all `include_dependency()` paths are relocatable (they start with `@depot` and `track_content=true` was used to include them). 01 April 2024, 05:34:51 UTC
a3f710e Copy for `CartesianIndices`/`LinearIndices` need not materialize (#53901) Currently, ```julia julia> C = CartesianIndices((1:2, 1:2)) CartesianIndices((1:2, 1:2)) julia> copy(C) 2×2 Matrix{CartesianIndex{2}}: CartesianIndex(1, 1) CartesianIndex(1, 2) CartesianIndex(2, 1) CartesianIndex(2, 2) ``` However, seeing that a `CartesianIndices` is equivalent to an n-D range, there doesn't seem to be a need to materialize the result. This PR also ensures that `copy(C)` returns the same type as `C`. After this PR: ```julia julia> C = CartesianIndices((1:2, 1:2)) CartesianIndices((1:2, 1:2)) julia> copy(C) CartesianIndices((1:2, 1:2)) ``` Also, a similar change for `LinearIndices` is added. 31 March 2024, 01:56:46 UTC
313f933 curl: remove patch (#53892) This upstream patch needs to be removed because in latest curl, it's already applied. This currently prevents a build from source. (And I am wondering why that was not caught?) 30 March 2024, 14:04:42 UTC
24ff6f4 no need to check whether mq_master is nil in the GC work-stealing loop (#53899) This is not needed after https://github.com/JuliaLang/julia/pull/53355. 30 March 2024, 04:18:49 UTC
d10a0fb curl: fix RPATH to find nghttp2 and libssh2 (#53894) Fixes https://github.com/JuliaLang/julia/issues/48820 I think this is the proper fix, and there might be a configure option to curl or nghttp2 to set it, but I haven't been found it. So we'll do it that way. 29 March 2024, 16:51:02 UTC
e26d140 add initial support for OpenBSD (#53633) These commits add initial support of OpenBSD in julia. It isn't strictly enough to make julia runable on OpenBSD (see #53632), but it covers the larger part. --------- Co-authored-by: Max Horn <max@quendi.de> Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 29 March 2024, 16:47:07 UTC
09b356f fix relocatable upgrades test (#53889) Fixes https://github.com/JuliaLang/julia/issues/53885 Not the first time MacOS serving tempdir via a symlink has caused obscure issues.. 29 March 2024, 13:27:51 UTC
b2e8eb2 Revert change to checksum for llvm-julia (#53870) Should fix #53399. I think this is the correct fix. Makes it so you can build Julia with `USE_BINARYBUILDER=0`. 29 March 2024, 12:28:12 UTC
11517f2 fix typos in codegen.cpp (#53888) Not sure why this typo didn't mess up the CI, but it looks like a clear problem, let's correct it. I'd appreciate any idea on how to exercise this change. - fixes JuliaDebug/JuliaInterpreter.jl#621 29 March 2024, 10:42:09 UTC
a3438d0 fix `NoMethodError` of `changed_lineinfo` (#53890) I will add a test case for this later. xref: https://github.com/JuliaDiff/Diffractor.jl/actions/runs/8476871477/job/23226991456 29 March 2024, 08:49:09 UTC
b18d2cc use flisp cprimitives for lowering large longs (#53860) This addresses the previous limitation to `Base.literal_pow`, where it would only apply to literals between $\pm2\^{61}$ (or 29). 28 March 2024, 20:41:19 UTC
1e50a99 Utilize bitshifts correctly in signals-mach.c when storing/reading the previous GC state (#53868) I have not succeed in writing a test for this, but this was found on a CI hang together with @keno and @vtjnash. In essence if we hit a safepoint while GC_SAFE things can go wrong <img width="748" alt="image" src="https://github.com/JuliaLang/julia/assets/28694980/7d8170ee-11ab-43de-9bb1-9219aa5a2d80"> 28 March 2024, 19:27:52 UTC
3530c8f Consistently format Julia in the docstring for Base.DEPOT_PATH (#53873) It is unclear what `Julia` exactly means in this docstring, but the two occurences of the word have different formatting. The guidelines say > in docstrings refer to the language as "Julia" and the executable as "`julia`". Given that we are not talking about the executable here, I removed the backticks. 28 March 2024, 18:35:45 UTC
89d59a9 optimize: Delete incoming unreachable edges from PhiNode (#53877) Incoming IR very rarely contains PhiNodes, but we do allow it to make things easier on downstream packages like Diffractor that want to generate the same code structures in both typed and untyped mode. However, this does of course mean that once inference is finished, any PhiNodes in the original source must be adjusted to maintain IRCode invariants. One particular important invariant here is that the edges list in a PhiNode must match the predecessor list, so in particular if a predecessor becomes unreachable during inference, we must filter that edge before passing it on to the optimizer. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 28 March 2024, 17:59:05 UTC
6f51966 Improve error message when source length is wrong in reshape (#53883) 28 March 2024, 16:00:19 UTC
2a944fa RNG reproducibility discussion - rm confusing ref to MenneTwister (#53879) There was an odd phrase "in particular if `MersenneTwister` is used" in the reproducibility discussion, which made it seem like the discussion was specific to `MersenneTwister` (which we don't even use by default anymore). I just deleted this clause. 28 March 2024, 15:20:54 UTC
e07c0f1 inference: Fix correctness and ensure termination in the presence of PhiNodes (#53876) There's two related, but distinct, issues here: 1. We were not using `tmerge` for merging SSA results inside loops, which could cause infinite looping. In the absence of PhiNodes, things usually have to go through a slot to be able to make the round trip, which would usually put a PhiNode on the path, but it's possible there may be other ways to smuggle things around (e.g. through exception handling). 2. We were not properly accounting for the fact that PhiNode uses do not need to be linearly ordered in the same BB, so we were getting the type of the testcase here incorrect by failing to re-schedule the PhiNode. The first of these shows up in the Diffractor test suite, the second was found by writing the test case. 28 March 2024, 03:09:07 UTC
4ee1022 opaque_closure: Lookup optimized oc source inside code instance (#53878) This is an alternative to #53852. I don't think it's semantically legal to put optimized source into the :source field of a method, but it should be fine to just look it up from the CodeInstance. That said, this is a bit of an unusual configuration. In particular it wasn't even reachable with the surface APIs, which assumed that inferred IR was always supposed to be compiled. 27 March 2024, 19:44:33 UTC
f4866b7 Update p7zip to 17.05 (#53863) Following https://github.com/JuliaPackaging/Yggdrasil/pull/8352 27 March 2024, 15:40:54 UTC
bb3b09d add invokelatest to on_done callback in bracketed paste (#53696) fixes #52120 27 March 2024, 15:20:10 UTC
0e2409a inference: Fix handling of :throw_undef_if_not (#53875) This stmt type doesn't usually get introduced until IR conversion, but we do allow it in inference (to allow it to be emitted by packages like Diffractor). However, we didn't have a test for it, so the code path grew a bug. Fix that and also allow this as a frontend form, so it can be tested without resorting to generated functions. 27 March 2024, 14:29:46 UTC
a3616a8 Print more info when backtrace test fails (#53874) This test fails intermittently on win32. Let's try to print some more info in that case to see if we can find out anything. 27 March 2024, 14:02:22 UTC
7a62dff Harmonize and add docs for `--math-mode` (#53818) The behavior was changed and the CLI doc was removed in #41638, though we current still allow users to selectively use the `@fastmath` macro. This adds back the CLI docs and makes a minor clarification about behavior. Co-authored-by: Matt Bauman <mbauman@juliahub.com> 27 March 2024, 13:38:29 UTC
f413b01 Remove duplicate small integer union constants (#53866) 27 March 2024, 13:18:58 UTC
6737a1d Update SuiteSparse to 7.6.1 (#53864) Following https://github.com/JuliaPackaging/Yggdrasil/pull/8355 27 March 2024, 00:45:27 UTC
d4d34b9 chore: fix some comments (#53861) Signed-off-by: crazeteam <lilujing@outlook.com> 27 March 2024, 00:44:31 UTC
fc2d3af precompilepkgs: fix error reporting (#53862) 27 March 2024, 00:37:46 UTC
653c0ae precompilepkgs: don't confuse single package in project with requesting single package (#53865) Followup to https://github.com/JuliaLang/julia/pull/53653 Separate from #53862 because this one is just broken on master Without this if you precompile a project with a single dep it thought the user was calling `precompile Dep` or `using Dep` so went into live print mode, which is confusing. 26 March 2024, 23:22:36 UTC
64de065 Update libgit2 to 1.8.0 (#53840) According to the release notes, three breaking (ABI) changes are handled here: - `GIT_CONFIG_LEVEL_WORKTREE` constant (and modification to value of `GIT_CONFIG_LEVEL_APP`) - `git_config_entry` structure - `git_push_options` structure https://github.com/libgit2/libgit2/releases/tag/v1.8.0 26 March 2024, 12:56:03 UTC
86a697c 🤖 [master] Bump the Pkg stdlib from 6859d6857 to 162634c56 (#53846) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 6859d6857 New commit: 162634c56 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @KristofferC Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/6859d68579e7970daf00720901cf487563dca0da...162634c5615d12b889e4b64f3cff95d1c377f189 ``` $ git log --oneline 6859d6857..162634c56 162634c56 Add workspace feature (#3841) a4ec712eb Remove outdated UUID instructions (#3855) 9c6356fa9 collect e.g. weak deps from project even if it is not a package (#3852) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 26 March 2024, 09:20:13 UTC
4607d53 lowering: Don't bother rewrapping bare linenumbers in hygienic-scope (#53850) JuliaInterpreter tries to do some very questionable pre-lowering introspection to find line numbers, but doesn't properly handle hygienic scope. That should be fixed, but as I was about to put in a hack there, I figured we might as well not bother re-wrapping bare LineNumberNodes in hygienic scopes. They just get discarded again immediately anyway. No functional change in that this is semantically equivalent to what we had before, just with a slightly more compact lowering result and additional JuliaInterpreter test passing. 26 March 2024, 08:51:28 UTC
018152f Update zlib to 1.3.1 (#53841) Released January 22, 2024 26 March 2024, 03:46:12 UTC
bf9079a update PCRE2 to 10.43.0 (#53838) Released on 16 February 2024. Among the changes is support for Unicode 15.0.0 26 March 2024, 01:30:06 UTC
324e353 Update patchelf to 0.18.0 (#53845) Released Apr 23, 2023: https://github.com/NixOS/patchelf/releases/tag/0.18.0 26 March 2024, 01:23:27 UTC
cd523fe Update nghttp2 to 1.60.0 (#53842) Released 1st March 2024: https://github.com/nghttp2/nghttp2/releases/tag/v1.60.0 26 March 2024, 01:21:39 UTC
61caaa8 update MPFR to 4.2.1 (#53837) MPFR 4.2.1 was released on 22 August 2023. It contains bugfixes. 25 March 2024, 17:54:09 UTC
944f180 Add Xoshiro reference to Random module docstring (#53784) Since currently `Xoshiro` is a default random number generator I propose to add it to the docstring of `Random` module. 25 March 2024, 15:18:44 UTC
9636ef7 create phantom task for GC threads (#53815) A common idiom used throughout the codebase is to get a pointer to thread-local-state through `jl_current_task->ptls`. Create a phantom task for GC threads so that we can make use of this idiom when running in the GC threads as well. Idea originally suggested by @vchuravy, bugs are mine. 25 March 2024, 13:23:54 UTC
4a2c593 add code loading + precompilation support for workspaces (#53653) This is similar to workspaces in cargo where multiple projects share a manifest https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html and upon resolving the dependencies and compat of all projects in the workspace is adhered to. The idea is to use this for e.g. test, doc environments where you want to "overlay" a dependency graph on top of a base one. The code change in Base adds support for the code loading and precompilation part of this, those changes are: - Finding the manifest from any active project in the workspace - Merge preferences among projects in a workspace. - Allowing one to pass `manifest=true` to `precompilepkgs` to compile every package in the manifest. - The effect of giving no packages to `precompilepkgs` was changed from compiling all packages in the manifest to only those in the active project (which is equivalent in case of no workspace being used but different when it is used). 23 March 2024, 21:32:02 UTC
9bd7343 Retry downloads in toml tests (#53828) 23 March 2024, 21:12:32 UTC
243f67d Add docstring for Base.Sort.SMALL_ALGORITHM (#53807) Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> Co-authored-by: Steven G. Johnson <stevenj@mit.edu> 23 March 2024, 15:49:07 UTC
63e365f REPL: Expand macros before looking for `using` statements (#53821) Currently, in order to give the nice prompt for missing packages, we look for any `using`/`import` statements in the AST before evaluation. However, this misses any `using` statements introduced by macros: ``` julia> using Pkg julia> using BenchmarkTools │ Package BenchmarkTools not found, but a package named BenchmarkTools is │ available from a registry. │ Install package? │ (@v1.11) pkg> add BenchmarkTools └ (y/n/o) [y]: n ERROR: ArgumentError: Package BenchmarkTools not found in current path. - Run `import Pkg; Pkg.add("BenchmarkTools")` to install the BenchmarkTools package. Stacktrace: [1] macro expansion @ Base ./loading.jl:1781 [inlined] [2] macro expansion @ Base ./lock.jl:267 [inlined] [3] __require(into::Module, mod::Symbol) @ Base ./loading.jl:1762 [4] #invoke_in_world#3 @ Base ./essentials.jl:963 [inlined] [5] invoke_in_world @ Base ./essentials.jl:960 [inlined] [6] require(into::Module, mod::Symbol) @ Base ./loading.jl:1755 julia> macro foo() :(using BenchmarkTools) end @foo (macro with 1 method) julia> @foo ERROR: ArgumentError: Package BenchmarkTools not found in current path. - Run `import Pkg; Pkg.add("BenchmarkTools")` to install the BenchmarkTools package. Stacktrace: [1] macro expansion @ Base ./loading.jl:1781 [inlined] [2] macro expansion @ Base ./lock.jl:267 [inlined] [3] __require(into::Module, mod::Symbol) @ Base ./loading.jl:1762 [4] #invoke_in_world#3 @ Base ./essentials.jl:963 [inlined] [5] invoke_in_world @ Base ./essentials.jl:960 [inlined] [6] require(into::Module, mod::Symbol) @ Base ./loading.jl:1755 [7] top-level scope @ REPL[4]:1 ``` Generally, it doesn't matter, but embedded DSLs may want to do this kind of thing, so we might as well try to support it. 23 March 2024, 05:18:55 UTC
6172020 reland "small changes to make Base more statically compileable (#53778)" (#53820) This makes it easier to fully-statically-type Base and init methods. The changes are from gb/small-image2. 23 March 2024, 04:23:21 UTC
5ed51d3 Bump libuv (#53822) Fixes https://github.com/JuliaDebug/Cthulhu.jl/issues/541 by picking up https://github.com/libuv/libuv/commit/3ecce914105590e6112cd0c6d4f6b30ac6a6c24f. 23 March 2024, 03:31:30 UTC
d68a04e Revert "small changes to make Base more statically compileable" (#53808) Reverts JuliaLang/julia#53778 which appears to have introduced a windows failure See https://github.com/JuliaLang/julia/pull/53778#issuecomment-2013100312 22 March 2024, 16:10:24 UTC
9291845 precompilepkgs: simplify custom config printing if only one (#53805) Currently it's a bit excessive in the `Pkg.test` precompile job ![Screenshot 2024-03-20 at 12 04 03 PM](https://github.com/JuliaLang/julia/assets/1694067/7600f0b8-6e4b-43b2-9c42-c8d5d16b8d57) This PR ``` Precompiling project for configuration --code-coverage=none --color=yes --check-bounds=yes --warn-overwrite=yes --depwarn=yes --inline=yes --startup-file=no --track-allocation=none... 354.9 ms ✓ RFFT 1 dependency successfully precompiled in 1 seconds. 38 already precompiled. ``` Pkg could also just set the non-default flags to minimize the list. 22 March 2024, 13:40:53 UTC
3e37e17 also check that UUID of project is non-null when treating it as a package (#53789) Fixes https://github.com/JuliaLang/julia/issues/53788 22 March 2024, 13:39:21 UTC
9145571 Use jl_filename/jl_lineno less (#53799) I don't like `jl_filename`/`jl_lineno`. They are weird internal state, and they are also not thread safe, so if different threads are evaling different things at the same time, line numbers can get confused. This PR changes the core function `jl_toplevel_eval_flex` to keep track of its current file/line context on the stack, so at least there is no confusion within one call to this function. With this PR and #53797, the global `jl_filename`/`jl_lineno` are used for three purposes: 1. To initialize the filename/lineno used by lowering from `Core.eval`. 2. To give binding deprecation warnings. 3. For `jl_critical_error`. 4. By humans in the debugger. I think 3 and 4 are fine, they are exceptional cases. Case 2, I think could be changed to plumb through locations explicitly, but it's a bit annoying, so I didn't tackle it here. Case 1, I think can probably just be changed to consistently initialize, and if you want a proper line number, you need to put it in there explicitly. However, I didn't change that in this PR, because I think it could be slightly breaking, so should be pkgeval'd. 22 March 2024, 09:37:18 UTC
6c22dfd Remove fl_julia_current_{file, line} (#53797) These flisp accessor functions make use of the `jl_filename` and `jl_lineno` globals. I was looking at removing these globals for unrelated reasons, when I saw that one of the primary uses was in these flisp accessor, which appear entirely unnecessary. They are only used to provide a default for an error message, but the place that puts the error message into a list to return to julia does actually already have access to this information, so there's no need for these to look at the globals. While we're at it, also add a test for this code path, which was otherwise unexercised in our test suite. 22 March 2024, 01:04:28 UTC
52fc796 Add missing GC_POP() in emit_cfunction (#53809) ~~Apparently somewhere in codegen inside `emit_codeinst`some piece of code is relying on the implicit try catch gcstack restoring. I haven't got the analyzer working on that file yet (it has hundreds of issues and it doesn't like C++ code that much + the file is tens of thousands of lines after includes so it struggles).~~ This fixes the compileall segfault in apple-aarch64 ci. https://github.com/JuliaLang/julia/issues/53811 22 March 2024, 00:32:17 UTC
09400e4 Switch LLVM codegen of Ptr{T} to an actual pointer type. (#53687) This PR switches our code generation for `Ptr{T}` from `i64` to an actual LLVM pointer type (`ptr` when using opaque pointers, an untyped `i8*` otherwise). The main motivation is to simplify `llvmcall` usage (doing away with the `inttoptr`/`ptrtoint` conversions), and also make it possible to simply use `ccall` to call intrinsics with `Ptr`-valued arguments (where we currently always need `llvmcall` for converting to an actual pointer). Changing codegen like this is a breaking change for `llvmcall` users, but I've added backwards compatibility and a deprecation warning. Before: ```llvm julia> @code_llvm pointer([]) define i64 @julia_pointer_1542(ptr noundef nonnull align 8 dereferenceable(24) %"x::Array") #0 { top: ; ┌ @ pointer.jl:65 within `cconvert` %0 = load ptr, ptr %"x::Array", align 8 ; └ ; ┌ @ pointer.jl:90 within `unsafe_convert` ; │┌ @ pointer.jl:30 within `convert` %bitcast_coercion = ptrtoint ptr %0 to i64 ret i64 %bitcast_coercion ; └└ } ``` After: ```llvm julia> @code_llvm pointer([]) define ptr @julia_pointer_3880(ptr noundef nonnull align 8 dereferenceable(24) %"x::Array") #0 { top: ; ┌ @ pointer.jl:65 within `cconvert` %0 = load ptr, ptr %"x::Array", align 8 ; └ ; ┌ @ pointer.jl:90 within `unsafe_convert` ; │┌ @ pointer.jl:30 within `convert` ret ptr %0 ; └└ } ``` This also simplifies "real code", e.g., when `ccall` converts an Array to a pointer, resulting in some more optimization opportunities. 21 March 2024, 12:10:08 UTC
8e8b533 minor followups on recent `CodeInstance` refactors (#53581) - ~~simplifies the signature of `transform_result_for_cache`~~ - ~~make `jl_uncompress_ir` take `MethodInstance` instead of `CodeInstance` and simplifies the inlining algorithm~~ - renames of `codeinst::CodeInstace` objects - removal of dead code 21 March 2024, 03:14:52 UTC
72b1c9e Document LazyString in performance tips (#53779) Does what it says. Doc-changes only. Recent motivating example: https://github.com/FluxML/Flux.jl/issues/2399 21 March 2024, 02:55:02 UTC
55afecc Printf: don't zero pad Inf or NaN (#53785) We currently have ``` julia> @sprintf("%07f", -Inf) "-000Inf" julia> @sprintf("%07f", NaN) "0000NaN" ``` With this PR ``` julia> @sprintf("%07f", -Inf) " -Inf" julia> @sprintf("%07f", NaN) " NaN" ``` which is the same as Julia 1.5.4 and agrees with the C standard. 20 March 2024, 22:10:23 UTC
a30feec Update LICENSE.md - update copyright years (#53758) 20 March 2024, 22:07:33 UTC
bc7ba3d compiler: Refactor `concrete_eval_invoke` (#53771) This passes slightly more information into this function (the full `inst` rather than just the `stmt`) in order to allow external absint to access additional fields (the flags and the info) if necessary to make concrete evaluation decisions. It also splits out the actual concrete evaluation from the part that just maps the `inst` to a CodeInstance. 20 March 2024, 06:35:46 UTC
e0bb95a small changes to make Base more statically compileable (#53778) This makes it easier to fully-statically-type Base and init methods. The changes are from gb/small-image2. 20 March 2024, 00:38:51 UTC
cc27a7b Add two missing whitespaces to error messages (#53782) 20 March 2024, 00:36:10 UTC
1c2b9ad compileall: Print error on failure (#53770) This test appears to be failing intermittently on aarch64 darwin, so stop suppressing any errors that might be happening. 20 March 2024, 00:09:27 UTC
5c891de Remove some duplicates from emitted compilation traces (#53774) When multiple threads concurrently attempt to compile the same method, `--trace-compile` could emit duplicate `precompile` statements. This small tweak eliminates one source of these duplicates. 19 March 2024, 14:39:25 UTC
9df47f2 post-opt: add more test cases for `visit_conditional_successors` (#53642) This commit fixes the first problem that was found while digging into JuliaLang/julia#53613. It turns out that the post-domtree constructed from regular `IRCode` doesn't work for visiting conditional successors for post-opt analysis in cases like: ```julia julia> let code = Any[ # block 1 GotoIfNot(Argument(2), 3), # block 2 ReturnNode(Argument(3)), # block 3 (we should visit this block) Expr(:call, throw, "potential throw"), ReturnNode(), # unreachable ] ir = make_ircode(code; slottypes=Any[Any,Bool,Bool]) visited = BitSet() @test !Core.Compiler.visit_conditional_successors(CC.LazyPostDomtree(ir), ir, #=bb=#1) do succ::Int push!(visited, succ) return false end @test 2 ∉ visited @test 3 ∈ visited end Test Failed at REPL[14]:16 Expression: 2 ∉ visited Evaluated: 2 ∉ BitSet([2]) ``` This might mean that we need to fix on the `postdominates` end, but for now, this commit tries to get around it by using the augmented post domtree in `visit_conditional_successors`. Since the augmented post domtree is enforced to have a single return, we can keep using the current `postdominates` to fix the issue. However, this commit isn't enough to fix the NeuralNetworkReachability segfault as reported in #53613, and we need to tackle the second issue reported there too (https://github.com/JuliaLang/julia/issues/53613#issuecomment-1983243419). 19 March 2024, 11:10:11 UTC
2775c9a Fix handling of virtual exit node in `PostDomTree` (#53739) This is an alternative to https://github.com/JuliaLang/julia/pull/53642 The `dom_edges()` for an exit block in the CFG are empty when computing the PostDomTree so the loop below this may not actually run. In that case, the right semidominator is the ancestor from the DFSTree, which is the "virtual" -1 block. This resolves half of the issue in https://github.com/JuliaLang/julia/issues/53613: ```julia julia> let code = Any[ # block 1 GotoIfNot(Argument(2), 3), # block 2 ReturnNode(Argument(3)), # block 3 (we should visit this block) Expr(:call, throw, "potential throw"), ReturnNode(), # unreachable ] ir = make_ircode(code; slottypes=Any[Any,Bool,Bool]) visited = BitSet() @test !Core.Compiler.visit_conditional_successors(CC.LazyPostDomtree(ir), ir, #=bb=#1) do succ::Int push!(visited, succ) return false end @test 2 ∈ visited @test 3 ∈ visited end Test Passed ``` This needs some tests (esp. since I don't think we have any DomTree tests at all right now), but otherwise should be good to go. 19 March 2024, 08:20:16 UTC
8f76c69 minor refactoring on `find_method_matches` (#53741) So that it can be tested in isolation easier. 19 March 2024, 05:42:23 UTC
8e67f99 fix functional assert statements (#53737) We currently never remove asserts but I still think this is not a good practice. 18 March 2024, 21:08:32 UTC
a9611ce precompilepkgs: fix error path & adjust messaging (#53772) Fixes issues with the handling of errored dependencies 18 March 2024, 11:20:55 UTC
1d532f4 remove dllexport `jl_arraylen` which no longer exists (#53765) 17 March 2024, 15:05:53 UTC
0b1587c Add an IndexStyle example to the diagind docstring (#53757) Also, simplifies the docstring by splitting the usage into two lines. 17 March 2024, 13:01:25 UTC
912460b Use Julian way `≥(0)` in `findall` docs (#53740) I'm pretty sure the manual advises against `x -> x >= 0` :) 15 March 2024, 04:46:03 UTC
67cdb9b Enable analyzegc checks for try catch and fix found issues (#53527) This PR also makes a successful `JL_TRY` not do so much work + fixes clang not finding the sdk when running those tests in macos. Fixes https://github.com/JuliaLang/julia/issues/ Co-authored-by: Cody Tapscott <84105208+topolarity@users.noreply.github.com> Co-authored-by: Jameson Nash <vtjnash@gmail.com> 15 March 2024, 02:17:44 UTC
3c4af03 enhance the effectiveness of the test cases introduced in #53300 (#53478) While experimenting with precompilation for external absints on builds just after #53300 was merged, I found that the test case for `CustomAbstractInterpreterCaching2.jl` fails if the test case for `CustomAbstractInterpreterCaching1.jl` isn't run in the same session beforehand. That is probably because of the previous lack of support for proper `CodeInstance` caching. To address this, I've changed the tests to run in separate processes in this commit. Note that it appears that a recent refactor concerning `CodeInstance` might have resolved this issue, so the new test cases runs successfully on master. However, I suspect the fix hasn't been applied to v1.11 yet, we would need more research. 15 March 2024, 00:43:19 UTC
b730d33 inlining: bail out unless `match.spec_types <: match.method.sig` (#53720) As Jameson pointed out in the link below, while the union-split handles cases when there are uncovered matches, sometimes the expected condition `spec_types <: method.sig` that the union-split algorithm relies on isn't met in such cases, which caused issues like #52644. This commit fixes the problem by adding explicit checks for such cases. Note that this is based on #52092. The extra handling for single method match unmatched static parameters based on `only_method` that was removed in JuliaLang/#52092 has been ineffective and would otherwise cause problematic inlining on this PR. We'll likely need to come back to this later and figure out a safe and effective way to deal with such cases in the future when the handling for either case turns out to be necessary. - closes #52644 - xref: <https://github.com/JuliaLang/julia/pull/53600#pullrequestreview-1917272781> 15 March 2024, 00:39:56 UTC
0f04b33 Default to the medium code model in x86 linux (#53391) This shouldn't have any cost on smaller images because the only thing that gets put into ldata is the system image data, which is only reference via `dlsym`. This allows for images larger than 2gb (tested by putting a 2gb array in the base image) I did not test how this might be handled in other platforms (Windows doesn't support it). 14 March 2024, 19:30:40 UTC
a910f04 Fix some issues with precompilation with threads on (#53697) This doesn't fix all issues, but should make some of them more correct than before. These fixes may also enable exiting julia with threads running safer in the future. 14 March 2024, 14:52:20 UTC
cb47b01 codegen: change tbaa of ptr_phi to tbaa_value (#53655) Fixes https://github.com/JuliaLang/julia/issues/53612 14 March 2024, 14:51:10 UTC
c4ab0d4 Increase build precompilation (#53682) - Bake precompilepkgs into the sysimage - Enable compilation in stdlib JLLs @staticfloat I guess this is ok now we have pkgimages? - Add some hardcoded precompiles encountered locally - Disable a problematic llvm test, with a note With this there's no compilation loading Pkg in interactive mode ``` % ./julia --trace-compile=stderr --start=no -q julia> ] (@v1.12) pkg> ``` Before ``` % time julia +nightly --start=no --trace-compile=stderr -q -e "using Pkg" precompile(Tuple{typeof(Base.setindex!), Base.Dict{Symbol, Union{Nothing, Bool, Int64, String}}, Int64, Symbol}) precompile(Tuple{typeof(Base.haskey), Base.Dict{String, Any}, String}) precompile(Tuple{typeof(MbedTLS_jll.__init__)}) precompile(Tuple{typeof(LibSSH2_jll.__init__)}) precompile(Tuple{typeof(LibGit2_jll.__init__)}) precompile(Tuple{typeof(nghttp2_jll.__init__)}) precompile(Tuple{typeof(LibCURL_jll.__init__)}) precompile(Tuple{typeof(MozillaCACerts_jll.__init__)}) precompile(Tuple{typeof(Base.Filesystem.normpath), String, String, Vararg{String}}) precompile(Tuple{typeof(p7zip_jll.__init__)}) precompile(Tuple{typeof(p7zip_jll.init_p7zip_path)}) precompile(Tuple{typeof(Base.append!), Array{String, 1}, Array{String, 1}}) precompile(Tuple{typeof(Base.join), Array{String, 1}, Char}) julia +nightly --start=no --trace-compile=stderr -q -e "using Pkg" 1.48s user 0.40s system 206% cpu 0.910 total ``` PR ``` % time ./julia --start=no --trace-compile=stderr -q -e "using Pkg" ./julia --start=no --trace-compile=stderr -q -e "using Pkg" 1.62s user 0.13s system 402% cpu 0.433 total ``` 14 March 2024, 14:23:58 UTC
b507330 Remove specialized IndexStyle method for SubArray (#53726) The fallback method `IndexStyle(::Type{<:AbstractArray})` does the same, so this is unnecessary. 14 March 2024, 14:04:50 UTC
8287943 Remove specialized view method for `OneTo` arguments (#53725) This seems unnecessary, as the fallback method on line 221 does the same. 14 March 2024, 14:03:01 UTC
5023ee2 replace `REPL.TerminalMenus.terminal` with type stable function (#53704) 14 March 2024, 11:15:40 UTC
612393c Avoid macro-expand recursion into `Expr(:toplevel, ...)` (#53515) Here's an example output from macroexpand: ``` Expr head: Symbol thunk args: Array{Any}((1,)) 1: Core.CodeInfo code: Array{Any}((2,)) 1: Expr head: Symbol toplevel args: Array{Any}((17,)) 1: Expr head: Symbol hygienic-scope args: Array{Any}((3,)) 1: LineNumberNode 2: Module Base.Enums 3: LineNumberNode 2: Expr head: Symbol hygienic-scope args: Array{Any}((3,)) 1: Expr 2: Module Base.Enums 3: LineNumberNode 3: Expr head: Symbol hygienic-scope args: Array{Any}((3,)) 1: LineNumberNode 2: Module Base.Enums 3: LineNumberNode 4: Expr head: Symbol hygienic-scope args: Array{Any}((3,)) 1: Expr 2: Module Base.Enums 3: LineNumberNode ... ``` Currently fails during bootstrap with: ``` LoadError("sysimg.jl", 3, LoadError("Base.jl", 542, ErrorException("cannot document the following expression:\n\n#= mpfr.jl:65 =# @enum MPFRRoundingMode begin\n #= mpfr.jl:66 =#\n MPFRRoundNearest\n #= mpfr.jl:67 =#\n MPFRRoundToZero\n #= mpfr.jl:68 =#\n MPFRRoundUp\n #= mpfr.jl:69 =#\n MPFRRoundDown\n #= mpfr.jl:70 =#\n MPFRRoundFromZero\n #= mpfr.jl:71 =#\n MPFRRoundFaithful\n end\n\n'@enum' not documentable. See 'Base.@__doc__' docs for details.\n"))) ``` Perhaps we can do better than wrapping each `Expr(:toplevel, ...)` arg individually, or I should be filtering out the LineNumberNodes? --------- Co-authored-by: Keno Fischer <keno@juliacomputing.com> Co-authored-by: Keno Fischer <keno@juliahub.com> 14 March 2024, 11:01:22 UTC
f24364a Don't recurse lowering symbol renaming through `Expr(:toplevel)` (#53730) Fixes #53729. 14 March 2024, 08:07:25 UTC
48e89db bump number of GC threads to the number of compute threads (as opposed to half of it) (#53608) The GC scheduler seems to have matured enough for us to do this. 13 March 2024, 22:06:55 UTC
2e876fc inlining: remove ineffective handling for unmatched params (#52092) The deleted branch was added in #45062, although it had not been tested. I tried the following diff to find cases optimized by that, but I just found the handling proved to be in vain in all cases I tried. ```diff diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 318b21b09b..7e42a65aa4 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -1473,6 +1473,14 @@ function compute_inlining_cases(@nospecialize(info::CallInfo), flag::UInt32, sig handle_any_const_result!(cases, result, match, argtypes, info, flag, state; allow_abstract=true, allow_typevars=true) fully_covered = handled_all_cases = match.fully_covers + if length(cases) == 1 && fully_covered + println("first case: ", only_method) + elseif length(cases) == 1 + atype = argtypes_to_type(sig.argtypes) + if atype isa DataType && cases[1].sig isa DataType + println("second case: ", only_method) + end + end elseif !handled_all_cases # if we've not seen all candidates, union split is valid only for dispatch tuples filter!(case::InliningCase->isdispatchtuple(case.sig), cases) ``` 13 March 2024, 16:23:57 UTC
3d34f11 typeintersect: fix potential free `TypeVar` caused by chained inner var. (#53675) Noticed when working on 02f27c24929ab2561bcb21d3f58c1d313ae5d6e8. The substitution and re-sorting of inner vars are incomplete on master. This commit re-organized the code by: 1. Flatten the inner vars into a reversed list and handling them just like vars in norm bindings. 2. Then perform a global re-sorting on all vars. 3. After that, the inner vars get frozen and dependent bounds are refreshed. 13 March 2024, 15:52:05 UTC
8d31f33 Move `isexecutable, isreadable, iswritable` to `filesystem.jl` (#53699) This PR migrates the methods `isexecutable, isreadable, iswritable` from `Sys` to `Base`, but also generates an alias in `Sys` for backwards compatibility. Furthermore, `iswriteable` is renamed to `iswritable` in order to match the already existing `Base.iswritable` method. Suggested in https://github.com/JuliaLang/julia/pull/53320#issuecomment-1989217973. 13 March 2024, 09:04:08 UTC
9ae7eab Implement proper macro scope resolution for generator/for (#53674) I'm not super familiar with this code, but it appears to me that these need to be treated as equivalent to implicit let blocks for the purposes of macro hygiene, so add appropriate logic to the macroexpander. Fixes #53673. 13 March 2024, 07:31:51 UTC
b1dd26a remove duplicate definition of is_anonfn_typename (#53711) They seem to be doing the same thing. Centralize the definition in a single place. 13 March 2024, 05:09:25 UTC
7613c69 Make some improvements to the Scoped Values documentation. (#53628) Fixes #53471. One thing to note, I changed the signature in the `with` docstring from this: ```julia with(f, (var::ScopedValue{T} => val::T)...) ``` to this: ```julia with(f, (var::ScopedValue{T} => val)...) ``` ...since the original signature in the docstring was too strict. I also added this sentence to the docstring: ```julia `val` will be converted to type `T`. ``` I added a couple tests that verify the conversion behavior. 12 March 2024, 20:24:51 UTC
df28bf7 use afoldl instead of tail recursion for tuples (#53665) It is easy to accidentally call these functions (they are used by vcat, which is syntax) with very long lists of values, causing inference to crash and take a long time. The `afoldl` function can handle that very well however, while naive recursion did not. Fixes #53585 12 March 2024, 18:30:20 UTC
2a72d65 🤖 [master] Bump the Pkg stdlib from e0821116e to 6859d6857 (#53703) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: e0821116e New commit: 6859d6857 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/e0821116e9f4364a2b37a77183e93d055a111f4d...6859d68579e7970daf00720901cf487563dca0da ``` $ git log --oneline e0821116e..6859d6857 6859d6857 precompile: update kwargs (#3838) 4d73d60aa move threads assignment after precompilation (#3840) 28bbbd46f remove line about changing UUID to dev in readme (#3837) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 12 March 2024, 13:47:06 UTC
7eb5cb8 set `slot_syms` for methods of OCs constructed via `Core.OpaqueClosure` (#53650) Previously `oc` constructed via `Core.OpaqueClosure` does not set `oc.source.slot_syms` set, which caused segfaults either when trying to `show` `oc.source` or if invocation of `oc(...)` threw an error. This commit fixes that by making sure `oc.source.slot_syms` is set for `oc` created with `jl_new_opaque_closure_from_code_info`. 12 March 2024, 11:57:25 UTC
22602a2 Slightly improve grammar in precompilation info text (#53700) Uses the singular "configuration" if `length(configs) == 1`, instead of the current "configurations" 12 March 2024, 10:28:37 UTC
0b95caf Fix `--compile=all` mode after CodeInstance refactor (#53421) This codepath does not have tests, so it wasn't quite correct. Hopefully this fixes it. 12 March 2024, 10:21:38 UTC
8e7751c propagate_inbounds to inline in indexing CartesianIndices{0} (#53701) There's no indexing call in this method which an `@inbounds` may be propagated to. 12 March 2024, 08:48:04 UTC
2c81e5d Linalg: remove unnecessary matprod_dest specializations (#53620) These methods are not necessary, as the fallback methods for `StructuredArrays` on line 577 and 578 do the same. 12 March 2024, 02:05:27 UTC
dcd1fb2 LAPACK: validate input parameters to throw informative errors (#53631) This PR validates the input parameters to the Julia LAPACK wrappers, so that the error messages are more informative. On nightly ```julia julia> using LinearAlgebra julia> LAPACK.geev!('X', 'X', rand(2,2)) ** On entry to DGEEV parameter number 1 had an illegal value ERROR: ArgumentError: invalid argument #1 to LAPACK call ``` This PR ```julia julia> using LinearAlgebra julia> LAPACK.geev!('X', 'X', rand(2,2)) ERROR: ArgumentError: argument #1: jobvl must be one of ('N', 'V'), but 'X' was passed ``` Secondly, moved certain allocations (e.g. in `geevx`) below the validation checks, so that these only happen for valid parameter values. Thirdly, added `require_one_based_indexing` checks to functions where these were missing. 12 March 2024, 02:04:25 UTC
dcfad21 Add throw option in wait(::Task) (#53685) As we discussed with @vtjnash in PR #53341, it might be useful to introduce the `throw` option in the `wait` function for `Task`. If `throw=false` is specified, `wait` behaves like `_wait`; it prevents throwing a `TaskFailedException`. 11 March 2024, 23:45:00 UTC
a4783b0 Also don't increment it for gc threads 11 March 2024, 22:25:27 UTC
2d24401 Don't double increment nrunning when starting threads 11 March 2024, 21:51:26 UTC
a0cee55 add check for invalid state in `_growend!` slow-path (#53513) This only triggers in cases where the user has done something pretty bad (e.g. modified the size incorrectly, or calling `push!` from multiple threads on the same vector without a lock). I'm very unsure if `ConcurrencyViolationError` is the right error to throw here, but I think most of the time, that is going to be the cause. This check is in the slow path because adding extra checks here is basically free (since it will run rarely, and will be batched with O(n) work to copy everything over). 11 March 2024, 21:13:44 UTC
back to top