https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
9b51354 Make it possible to register a LLVM type constructor for codegen. 20 July 2023, 13:26:20 UTC
bd8350b Fix memory corruption if task is launched inside finalizer (#50597) In #48919, the tid selection logic inside `enq_task` gained a `!GC.in_finalizer()` condition. However, this made it possible for `workqueue_at` to be reached with `tid==0`, which would attempt and out-of-bounds write under `@inbounds`, corrupting memory. This was not caught in the test suite despite `--check-bounds=yes`, because our `--check-bounds=yes` is currently best effort. That would be fixed by #50239, which exposed this bug. This PR attempts to fix this by marking any tasks launched inside a finalizer as not sticky. Finalizers don't have any thread they run on semantically, so i don't think there's a meaningful sense in which tasks launched inside finalizers could be sticky. 19 July 2023, 19:36:59 UTC
077efd4 Rename ENV variable `JULIA_USE_NEW_PARSER` -> `JULIA_USE_FLISP_PARSER` (#50595) Closes #50470 19 July 2023, 19:19:10 UTC
d256f92 Fix visibility of assert on GCC12/13 (#50516) 19 July 2023, 18:31:21 UTC
de2c37a gf: make method overwrite/delete an error during precompile (#50578) Previously, this was only a WARNING message, which was often missed during CI runs. Closes https://github.com/JuliaLang/julia/issues/50451 19 July 2023, 17:48:18 UTC
bd8734f Add `--compiled-modules=existing` command line option (#50586) Occasionally when developing new compiler features, it is not possible for me to precompile the package I'm developing (because it relies on the new compiler features, which are only available if Revise'd in). `--compiled-modules=no` is an option, but for packages with deep dependency stacks, this is not practical (in addition to slowing down use of development utilities like Revise, Cthulhu or Plots). Originally I tried to add a mode to `--compiled-modules` that would avoid using compiled modules for anything that's dev'ed, but that's a pretty complicated thing to figure out in the loading code, because you could have a non-`dev`'ed package that depends on a `dev`'ed package and you'd want to avoid loading that as well, but we don't technically have explicit dependency links at the loading level. This sidesteps all that and just adds a simpler option: `existing`. This option simply uses any pre-existing cache files if they exist, but refuses to create new ones. This does effectively the same thing, because the only packages with stale cache files are usually the ones that I've edited. However, the semantics are much simpler for loading to implement. 19 July 2023, 17:40:32 UTC
1116d7c rename env var JULIA_USE_NEW_PARSER -> JULIA_USE_FLISP_PARSER 19 July 2023, 10:06:55 UTC
0f56da8 inlining: NFC simplifications on the inlining algorithm (#50593) - pack return value of `ir_prepare_inlining!` into a struct and pass it around - improved handling of `linetable` argument 19 July 2023, 09:09:04 UTC
c5e4621 inference: refine `PartialStruct` with declared method signature (#50590) At present, in very rare cases, `PartialStruct` used for const-prop' might have type information that's less strict than type information that can be derived from the method's type signature, e.g.: ```julia Base.@constprop :aggressive function refine_partial_struct((a, b)::Tuple{String,Int}) if iszero(b) println("b=0") # to prevent semi-concrete eval return nothing else return a end end @test Base.return_types((AbstractString,)) do s refine_partial_struct((s, 42)) end |> only === String ``` This commit enhances the accuracy of const-prop' by propagating `tmeet` of `PartialStruct` and the declared type in such situations. 19 July 2023, 05:01:21 UTC
0bf560a NFC changes on base/compiler/inferenceresult.jl (#50589) - specialize `va_hanlder!` - tidy up the implementation of `cache_lookup` @nanosoldier `runbenchmarks("inference", vs=":master")` 19 July 2023, 00:56:08 UTC
7288095 Require -g2 for llvm names, set code_llvm to -g2 (#50585) 18 July 2023, 22:06:42 UTC
b3f766c lowering: Disallow splatting in non-final default value (#50563) Pop quiz: Do you know what the following will do? ``` julia> function g1(a=(1,2)..., b...=3) b end julia> g1() julia> function g2(a=(1,2)..., b=3, c=4) (b, c) end julia> g2() julia> function g3(a=(1,2)..., b=3, c...=4) (b, c) end julia> g3() julia> g3(1) ``` I don't either and I don't think it's particularly well defined. Splatting a default argument makes sense on the last argument, which can be a vararg, and it is desirable to be able to specify the default for the whole varargs tuple at once (although arguably that should just be the non-`...` behavior, but that'd be too breaking a change). Ref #50518. However, for other arguments, there isn't really a sensible semantic meaning. This PR disallows this in lowering. This is technically a minor change, but I doubt anybody is using this. Splatting in default values wasn't really ever supposed to work anyway, it just happened to fall out of our lowering. --------- Co-authored-by: Jeff Bezanson <jeff.bezanson@gmail.com> 18 July 2023, 21:40:21 UTC
d270a71 isassigned for ranges with BigInt indices (#50587) This fixes certain possible regressions in `isassigned` for ranges to restore the 1.9-like behavior. On v1.9 ```julia julia> r = 1:big(2)^65 1:36893488147419103232 julia> isassigned(r, lastindex(r)) true julia> isassigned(r, true) ERROR: ArgumentError: invalid index: true of type Bool ``` On v1.10.0-alpha1 ```julia julia> isassigned(r, lastindex(r)) ERROR: InexactError: Int64(36893488147419103232) julia> isassigned(r, true) # Bool is converted to Int true julia> r[true] # but indexing with Bool doesn't work ERROR: ArgumentError: invalid index: true of type Bool ``` This PR ```julia julia> isassigned(r, lastindex(r)) true julia> isassigned(r, true) ERROR: ArgumentError: invalid index: true of type Bool ``` This still leaves ```julia julia> isassigned(collect(1:3), true) true ``` so that should perhaps be changed as well. 18 July 2023, 19:54:51 UTC
2cee483 use atomic compare exchange when setting the GC mark-bit (#50576) Fixes https://github.com/JuliaLang/julia/issues/50574. 18 July 2023, 03:32:56 UTC
7b40a36 minor `Core.Compiler` code quality improvements (#50569) 18 July 2023, 02:57:38 UTC
34ba62f Fix off-by-one in generator nospecialize (#50571) I had an off-by-one in #50556, since the argument slots actually start at 2 and `iota` starts at `0`. This was breaking StaticArrays precompiles, which attempts to precompile a generator with its abstract signature and without the nospecialize, those signatures are not compileable. Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 18 July 2023, 02:57:09 UTC
c0d5352 Add more names to the generated LLVM IR (#50557) 18 July 2023, 01:51:28 UTC
f19c9cf Add getfield/setfield names, propagate names through more places (#50565) This makes field names show up when we lower setfield/getfield, and tries to ensure that names are propagated through operations. 17 July 2023, 23:50:23 UTC
5eddb81 Improve "too many parameters" error (#50539) I'm still not satisfied with this but ```julia ERROR: too many parameters for type AbstractTriangular Stacktrace: [1] top-level scope @ REPL[3]:1 ``` is slightly better than ```julia ERROR: too many parameters for type Stacktrace: [1] top-level scope @ REPL[3]:1 ``` 17 July 2023, 18:58:35 UTC
3a9345c precompile: ensure globals are not accidentally created where disallowed (#50541) Usually this is caught by use of `eval`, but we should try to move away from that broad rule to specific functions such as this one, such that eventually we can remove that rule from `eval`. Fix #50538 17 July 2023, 18:54:17 UTC
ffe1a07 read(io, Char): fix read with too many leading ones (#50552) Fixes #50532. The `read(io, Char)` method didn't correctly handle the case where the lead byte starts with too many leading ones; this fix makes it handle that case correctly, which makes `read(io, Char)` match `collect(s)` in its interpretation of what a character is in all invalid cases. Also fix and test `read(::File, Char)` which has the same bug. 17 July 2023, 14:16:00 UTC
7141e73 Print LLVM module when verification fails (#50566) 17 July 2023, 13:48:58 UTC
1964621 remove `:boundscheck` argument from `Core._svec_ref` (#50561) `Core._svec_ref` has accepted `boundscheck`-value as the first argument since it was added in #45062. Nonetheless, `Core._svec_ref` simply calls `jl_svec_ref` in either the interpreter or the codegen, and thus the `boundscheck` value isn't utilized in any optimizations. Rather, even worse, this `boundscheck`-argument negatively influences the effect analysis (xref #50167 for details) and has caused type inference regressions as reported in #50544. For these reasons, this commit simply eliminates the `boundscheck` argument from `Core._svec_ref`. Consequently, `getindex(::SimpleVector, ::Int)` is now being concrete-eval eligible. closes #50544 17 July 2023, 03:46:58 UTC
024edd6 Add proper error for attempted use of undef slot (#50556) Fixes the segfault in #50518 and turns it into a proper error at both the syntax level (to catch lowering generating bad slot references) as well as at the codegen level (to catch e.g. bad generated functions and opaque closures). However, note that the latter case is technically undefined behavior, because we do not model the possibility that an otherwise-defined argument could throw at access time. Of course, throwing an error is allowable as undefined behavior and preferable to a segfault. 16 July 2023, 16:31:25 UTC
c22b1c1 typeintersect: also record chained `innervars` (#50551) On master, we only record direct `innervars` (`T` -> `S<:Val{T}`). And chained `innervars` might be ignored (`T` -> `S<:Val{V<:T}`. Before https://github.com/JuliaLang/julia/pull/48228, those chained `innervars` would have been wrapped into an `UnionAll`, thus we just need to check outer vars' lb/ub. Test added. ~Note: this only fix https://github.com/JuliaLang/julia/issues/50456#issuecomment-1632611284, the other MWE still get stackoverflow.~ 16 July 2023, 12:05:45 UTC
18d18dc Add unwrapping mechanism for triangular mul and solves (#50058) This adds an unwrapping mechanism to triangular matrices, basically following the BLAS example in terms of characters encoding wrappers. It mirrors the `AdjOrTransOrHermOrSym` mechanism closely. Packages that want to overload by storage type can overload `generic_trimatmul!` (and potentially `generic_matrimul!`). Note the similarity to `generic_matvecmul!` and `generic_matmatmul!`. There is, unfortunately, some added code due to the fact that lazy conjugate wrappers have a different "wrapper depth" compared to the classic, e.g., `*Triangular{<:Any,<:Adjoint}`. I believe that with this PR we cover all wrappers of typically dense matrices with the unwrapping mechanism. ~~An analogous approach could be applied to `ldiv!`, if that's of interest and of benefit to the ecosystem.~~ 16 July 2023, 10:04:41 UTC
e67ddaa Add unwrapping mechanism for triangular matrices 16 July 2023, 07:30:51 UTC
38ae975 Merge branch 'master' into kf/unusederror 15 July 2023, 17:02:29 UTC
d215d91 Expand kwcall lowering positional default check to vararg (#50559) Fixes the case from #50518, but we actually have two test cases in the tests that also hit this (e.g. this one: ``` f40964(xs::Int...=1; k = 2) = (xs, k) ``` ), but just happened not to hit the bad codegen path. #50556, once merged would have complained on those definitions as well, without this fix. 15 July 2023, 17:01:26 UTC
191256e Assume size is non-negative for increased efficiency (#50530) I noticed [here](https://github.com/JuliaLang/julia/pull/50467#discussion_r1260299610) that `lastindex(x::Base.OneTo)` is not simply `x.stop`. This PR performs that optimization and many more by assuming `size` always returns positive numbers. ``` julia> @code_native lastindex(Base.OneTo(5)) # master .section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 .globl _julia_lastindex_81 ; -- Begin function julia_lastindex_81 .p2align 2 _julia_lastindex_81: ; @julia_lastindex_81 ; ┌ @ abstractarray.jl:423 within `lastindex` ; %bb.0: ; %top ; │┌ @ abstractarray.jl:386 within `eachindex` ; ││┌ @ abstractarray.jl:134 within `axes1` ; │││┌ @ range.jl:708 within `axes` ; ││││┌ @ range.jl:471 within `oneto` ; │││││┌ @ range.jl:469 within `OneTo` @ range.jl:454 ; ││││││┌ @ promotion.jl:532 within `max` ; │││││││┌ @ int.jl:83 within `<` ldr x8, [x0] ; │││││││└ ; │││││││┌ @ essentials.jl:642 within `ifelse` cmp x8, #0 csel x0, x8, xzr, gt ; │└└└└└└└ ret ; └ ; -- End function .subsections_via_symbols julia> @code_native lastindex(Base.OneTo(5)) # pr .section __TEXT,__text,regular,pure_instructions .build_version macos, 13, 0 .globl _julia_lastindex_13253 ; -- Begin function julia_lastindex_13253 .p2align 2 _julia_lastindex_13253: ; @julia_lastindex_13253 ; ┌ @ abstractarray.jl:423 within `lastindex` ; %bb.0: ; %top ldr x0, [x0] ret ; └ ; -- End function .subsections_via_symbols ``` Also removed `axes(r::AbstractRange) = (oneto(length(r)),)` (added in #40382, @vtjnash) as redundant with the general `axes` method. The obvious downside here is that if someone defines an object with negative size, its axes will include Base.OneTo with negative stop. I think that is acceptable, but if not, we can gate this optimization to a set of known types (all AbstractArray types defined in Base should have non-negative size) 15 July 2023, 17:00:05 UTC
99e2604 sroa: Fix accidentally dropped condition (#50555) Fixes the issue noted in [1] (#50522) and adds a test to make sure that it doesn't regress. [1] https://github.com/JuliaLang/julia/commit/9b73611072b32b40c0d3abe14700515380c26848#r121641452 15 July 2023, 15:46:07 UTC
7735556 Name LLVM function arguments (#50500) This makes it easier to correlate LLVM IR with the originating source code by including both argument name and argument type in the LLVM argument variable. <details> <summary>Example 1</summary> ```julia julia> function f(a, b, c, d, g...) e = a + b + c + d f = does_not_exist(e) + e f end f (generic function with 1 method) julia> @code_llvm f(0,0,0,0,0) ``` ```llvm ; @ REPL[1]:1 within `f` define nonnull {}* @julia_f_141(i64 signext %"a::Int64", i64 signext %"b::Int64", i64 signext %"c::Int64", i64 signext %"d::Int64", i64 signext %"g[0]::Int64") #0 { top: %0 = alloca [2 x {}*], align 8 %gcframe3 = alloca [4 x {}*], align 16 %gcframe3.sub = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 0 %1 = bitcast [4 x {}*]* %gcframe3 to i8* call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 32, i1 true) %thread_ptr = call i8* asm "movq %fs:0, $0", "=r"() #7 %tls_ppgcstack = getelementptr i8, i8* %thread_ptr, i64 -8 %2 = bitcast i8* %tls_ppgcstack to {}**** %tls_pgcstack = load {}***, {}**** %2, align 8 ; @ REPL[1]:3 within `f` %3 = bitcast [4 x {}*]* %gcframe3 to i64* store i64 8, i64* %3, align 16 %4 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 1 %5 = bitcast {}** %4 to {}*** %6 = load {}**, {}*** %tls_pgcstack, align 8 store {}** %6, {}*** %5, align 8 %7 = bitcast {}*** %tls_pgcstack to {}*** store {}** %gcframe3.sub, {}*** %7, align 8 %Main.does_not_exist.cached = load atomic {}*, {}** @0 unordered, align 8 %iscached.not = icmp eq {}* %Main.does_not_exist.cached, null br i1 %iscached.not, label %notfound, label %found notfound: ; preds = %top %Main.does_not_exist.found = call {}* @ijl_get_binding_or_error({}* nonnull inttoptr (i64 139831437630272 to {}*), {}* nonnull inttoptr (i64 139831600565400 to {}*)) store atomic {}* %Main.does_not_exist.found, {}** @0 release, align 8 br label %found found: ; preds = %notfound, %top %Main.does_not_exist = phi {}* [ %Main.does_not_exist.cached, %top ], [ %Main.does_not_exist.found, %notfound ] %8 = bitcast {}* %Main.does_not_exist to {}** %does_not_exist.checked = load atomic {}*, {}** %8 unordered, align 8 %.not = icmp eq {}* %does_not_exist.checked, null br i1 %.not, label %err, label %ok err: ; preds = %found call void @ijl_undefined_var_error({}* inttoptr (i64 139831600565400 to {}*)) unreachable ok: ; preds = %found %.sub = getelementptr inbounds [2 x {}*], [2 x {}*]* %0, i64 0, i64 0 ; @ REPL[1]:2 within `f` ; ┌ @ operators.jl:587 within `+` @ int.jl:87 %9 = add i64 %"b::Int64", %"a::Int64" %10 = add i64 %9, %"c::Int64" ; │ @ operators.jl:587 within `+` ; │┌ @ operators.jl:544 within `afoldl` ; ││┌ @ int.jl:87 within `+` %11 = add i64 %10, %"d::Int64" %12 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 3 store {}* %does_not_exist.checked, {}** %12, align 8 ; └└└ ; @ REPL[1]:3 within `f` %13 = call nonnull {}* @ijl_box_int64(i64 signext %11) %14 = getelementptr inbounds [4 x {}*], [4 x {}*]* %gcframe3, i64 0, i64 2 store {}* %13, {}** %14, align 16 store {}* %13, {}** %.sub, align 8 %15 = call nonnull {}* @ijl_apply_generic({}* nonnull %does_not_exist.checked, {}** nonnull %.sub, i32 1) store {}* %15, {}** %12, align 8 %16 = call nonnull {}* @ijl_box_int64(i64 signext %11) store {}* %16, {}** %14, align 16 store {}* %15, {}** %.sub, align 8 %17 = getelementptr inbounds [2 x {}*], [2 x {}*]* %0, i64 0, i64 1 store {}* %16, {}** %17, align 8 %18 = call nonnull {}* @ijl_apply_generic({}* inttoptr (i64 139831370516384 to {}*), {}** nonnull %.sub, i32 2) %19 = load {}*, {}** %4, align 8 %20 = bitcast {}*** %tls_pgcstack to {}** store {}* %19, {}** %20, align 8 ; @ REPL[1]:4 within `f` ret {}* %18 } ``` </details> <details> <summary>Example 2</summary> ```julia julia> function g(a, b, c, d; kwarg=0) a + b + c + d + kwarg end g (generic function with 1 method) julia> @code_llvm g(0,0,0,0,kwarg=0) ``` ```llvm ; @ REPL[3]:1 within `g` define i64 @julia_g_160([1 x i64]* nocapture noundef nonnull readonly align 8 dereferenceable(8) %"#1::NamedTuple", i64 signext %"a::Int64", i64 signext %"b::Int64", i64 signext %"c::Int64", i64 signext %"d::Int64") #0 { top: %0 = getelementptr inbounds [1 x i64], [1 x i64]* %"#1::NamedTuple", i64 0, i64 0 ; ┌ @ REPL[3]:2 within `#g#1` ; │┌ @ operators.jl:587 within `+` @ int.jl:87 %1 = add i64 %"b::Int64", %"a::Int64" %2 = add i64 %1, %"c::Int64" ; ││ @ operators.jl:587 within `+` ; ││┌ @ operators.jl:544 within `afoldl` ; │││┌ @ int.jl:87 within `+` %3 = add i64 %2, %"d::Int64" ; │││└ ; │││ @ operators.jl:545 within `afoldl` ; │││┌ @ int.jl:87 within `+` %unbox = load i64, i64* %0, align 8 %4 = add i64 %3, %unbox ; └└└└ ret i64 %4 } ``` </details> 15 July 2023, 15:36:26 UTC
f15eb4e Make `Broadcast.flatten(bc).f` more complier frendly. (better inferred and inlined) (#43322) A follow up attemp to fix #27988. (close #47493 close #50554) Examples: ```julia julia> using LazyArrays julia> bc = @~ @. 1*(1 + 1) + 1*1; julia> bc2 = @~ 1 .* 1 .- 1 .* 1 .^2 .+ 1 .* 1 .+ 1 .^ 3; ``` On master: <details><summary> click for details </summary> <p> ```julia julia> @code_typed Broadcast.flatten(bc).f(1,1,1,1,1) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 4)::Int64 │ %5 = Core.getfield(args, 5)::Int64 │ %6 = invoke Base.Broadcast.var"#13#14"{Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(+)}}(Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(+)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), +))(%1::Int64, %2::Int64, %3::Vararg{Int64}, %4, %5)::Tuple{Int64, Int64, Vararg{Int64}} │ %7 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %6)::Tuple{Int64, Int64} │ %8 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %6)::Tuple{Vararg{Int64}} │ %9 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#9#11", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(*)}(Base.Broadcast.var"#9#11"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), *), %8)::Tuple{Int64} │ %10 = Core.getfield(%7, 1)::Int64 │ %11 = Core.getfield(%7, 2)::Int64 │ %12 = Base.mul_int(%10, %11)::Int64 │ %13 = Core.getfield(%9, 1)::Int64 │ %14 = Base.add_int(%12, %13)::Int64 └── return %14 ) => Int64 julia> @code_typed Broadcast.flatten(bc2).f(1,1,1,^,1,Val(2),1,1,^,1,Val(3)) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 5)::Int64 │ %5 = Core.getfield(args, 7)::Int64 │ %6 = Core.getfield(args, 8)::Int64 │ %7 = Core.getfield(args, 10)::Int64 │ %8 = invoke Base.Broadcast.var"#13#14"{Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}}(Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"()))), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"()))), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"()))), Base.literal_pow))(%3::Int64, ^::Function, %4::Vararg{Any}, $(QuoteNode(Val{2}())), %5, %6, ^, %7, $(QuoteNode(Val{3}())))::Tuple{Int64, Any, Vararg{Any}} │ %9 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %8)::Tuple{Int64, Any} │ %10 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %8)::Tuple │ %11 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#15#17"(), %10)::Tuple │ %12 = Core.getfield(%9, 1)::Int64 │ %13 = Core.getfield(%9, 2)::Any │ %14 = (*)(%12, %13)::Any │ %15 = Core.tuple(%14)::Tuple{Any} │ %16 = Core._apply_iterate(Base.iterate, Core.tuple, %15, %11)::Tuple{Any, Vararg{Any}} │ %17 = Base.mul_int(%1, %2)::Int64 │ %18 = Core.tuple(%17)::Tuple{Int64} │ %19 = Core._apply_iterate(Base.iterate, Core.tuple, %18, %16)::Tuple{Int64, Any, Vararg{Any}} │ %20 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %19)::Tuple{Int64, Any} │ %21 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %19)::Tuple │ %22 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#15#17", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}, typeof(*)}(Base.Broadcast.var"#15#17"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"())), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), *), %21)::Tuple{Any, Vararg{Any}} │ %23 = Core.getfield(%20, 1)::Int64 │ %24 = Core.getfield(%20, 2)::Any │ %25 = (-)(%23, %24)::Any │ %26 = Core.tuple(%25)::Tuple{Any} │ %27 = Core._apply_iterate(Base.iterate, Core.tuple, %26, %22)::Tuple{Any, Any, Vararg{Any}} │ %28 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"())), %27)::Tuple{Any, Any} │ %29 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"())), %27)::Tuple │ %30 = Core._apply_iterate(Base.iterate, Base.Broadcast.var"#16#18"{Base.Broadcast.var"#9#11", Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}, Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}, Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}, typeof(Base.literal_pow)}(Base.Broadcast.var"#9#11"(), Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}}(Base.Broadcast.var"#13#14"{Base.Broadcast.var"#15#17"}(Base.Broadcast.var"#15#17"()))), Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}}(Base.Broadcast.var"#23#24"{Base.Broadcast.var"#25#26"}(Base.Broadcast.var"#25#26"()))), Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}}(Base.Broadcast.var"#19#20"{Base.Broadcast.var"#21#22"}(Base.Broadcast.var"#21#22"()))), Base.literal_pow), %29)::Tuple{Any} │ %31 = Core.getfield(%28, 1)::Any │ %32 = Core.getfield(%28, 2)::Any │ %33 = (+)(%31, %32)::Any │ %34 = Core.getfield(%30, 1)::Any │ %35 = (+)(%33, %34)::Any └── return %35 ) => Any ``` </p> </details> On this PR ```julia julia> @code_typed Broadcast.flatten(bc).f(1,1,1,1,1) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 4)::Int64 │ %5 = Core.getfield(args, 5)::Int64 │ %6 = Base.add_int(%2, %3)::Int64 │ %7 = Base.mul_int(%1, %6)::Int64 │ %8 = Base.mul_int(%4, %5)::Int64 │ %9 = Base.add_int(%7, %8)::Int64 └── return %9 ) => Int64 julia> @code_typed Broadcast.flatten(bc2).f(1,1,1,^,1,Val(2),1,1,^,1,Val(3)) CodeInfo( 1 ─ %1 = Core.getfield(args, 1)::Int64 │ %2 = Core.getfield(args, 2)::Int64 │ %3 = Core.getfield(args, 3)::Int64 │ %4 = Core.getfield(args, 5)::Int64 │ %5 = Core.getfield(args, 7)::Int64 │ %6 = Core.getfield(args, 8)::Int64 │ %7 = Core.getfield(args, 10)::Int64 │ %8 = Base.mul_int(%1, %2)::Int64 │ %9 = Base.mul_int(%4, %4)::Int64 │ %10 = Base.mul_int(%3, %9)::Int64 │ %11 = Base.sub_int(%8, %10)::Int64 │ %12 = Base.mul_int(%5, %6)::Int64 │ %13 = Base.add_int(%11, %12)::Int64 │ %14 = Base.mul_int(%7, %7)::Int64 │ %15 = Base.mul_int(%14, %7)::Int64 │ %16 = Base.add_int(%13, %15)::Int64 └── return %16 ) => Int64 ``` 15 July 2023, 12:40:08 UTC
e464218 tabs to space 15 July 2023, 05:49:48 UTC
3c9522d sroa: Fix accidentally dropped condition Fixes the issue noted in [1] (#50522) and adds a test to make sure that it doesn't regress. [1] https://github.com/JuliaLang/julia/commit/9b73611072b32b40c0d3abe14700515380c26848#r121641452 15 July 2023, 05:49:48 UTC
cd74337 Also record chained `innervars` At present we only record direct `innervars` (`T` -> `S<:Val{T}`). And chained `innervars` might be ignored (`T` -> `S<:Val{V<:T}`\ This commit fix it. 15 July 2023, 04:35:13 UTC
d406c7e make flattened `Broadcasted` more compiler friendly. 1. make `cat_nested` better inferred by switching to direct self-recursion. 2. `make_makeargs` now create a tuple of functions which take in the whole argument list and return the corresponding input for the broadcasted function. 15 July 2023, 02:11:49 UTC
cae9576 fix typo 14 July 2023, 21:52:58 UTC
22ac24a Remove mentions of “home project” in documentation and output (#50527) The concept of “home project” was removed in #36434. 14 July 2023, 21:33:45 UTC
c272236 Expand kwcall lowering positional default check to vararg Fixes the case from #50518, but we actually have two test cases in the tests that also hit this (e.g. this one: ``` f40964(xs::Int...=1; k = 2) = (xs, k) ```), but just happened not to hit the bad codegen path. #50556, once merged would have complained on those definitions as well, without this fix. 14 July 2023, 21:09:24 UTC
547d85d update testhelpers 14 July 2023, 20:20:24 UTC
eb37e92 Add proper error for attempted use of undef slot Fixes the segfault in #50518 and turns it into a proper error at both the syntax level (to catch lowering generating bad slot references) as well as at the codegen level (to catch e.g. bad generated functions and opaque closures). However, note that the latter case is technically undefined behavior, because we do not model the possibility that an otherwise-defined argument could throw at access time. Of course, throwing an error is allowable as undefined behavior and preferable to a segfault. 14 July 2023, 19:43:41 UTC
ae08077 improve some assertions in base/compiler/ssair/passes.jl (#50547) 14 July 2023, 15:18:15 UTC
b9da60f improve some assertions in base/compiler/ssair/passes.jl 14 July 2023, 09:17:05 UTC
7662661 gf: remove unnecessary assert cycle==depth (#50542) We do not care about this condition (the point of this fast path is to skip checking it). Fix #50450 14 July 2023, 06:48:53 UTC
15bcf1b gf: remove unnecessary assert cycle==depth We do not care about this condition (the point of this fast path is to skip checking it). Fix #50450 13 July 2023, 21:01:33 UTC
fabc519 gc: remove over-eager assertion (#50540) Fixes #50451. Fortunately, this wasn't anything more than an unnecessary assertion. 13 July 2023, 20:51:28 UTC
5a922fa improve cat design / performance (#49322) This used to make a lot of references to design issues with the SparseArrays package (https://github.com/JuliaLang/julia/issues/2326 / https://github.com/JuliaLang/julia/pull/20815), which result in a non-sensical dispatch arrangement, and contribute to a slow loading experience do to the nonsense Unions that must be checked by subtyping. 13 July 2023, 18:24:30 UTC
f4f1ecf gc: remove over-eager assertion Fixes #50451 13 July 2023, 18:16:13 UTC
dcca46b gc: fix conservative GC support (#50533) Ensure `internal_obj_base_ptr` checks whether objects past freelist pointer are in freelist. Fixes #50434 13 July 2023, 17:24:32 UTC
1a7fb51 Use `oneto` in CartesianIndices when given sizes (#50534) 13 July 2023, 17:21:35 UTC
cdec4c2 ssair: Correctly handle stmt insertion at end of basic block (#50528) In the presence of `attach_after` insertions, we have to be careful to extend the basic block to include everything up to the last insertion. We were accounting for "new" nodes (before the compaction point), but not "pending" nodes (after the compaction point). Fixes https://github.com/JuliaLang/julia/issues/50379. 13 July 2023, 15:54:09 UTC
9091cb0 cleanups to copyuntil (#50485) * remove duplicate readuntil(s::IO, delim::UInt8) method, some cleanup * more conservative ensureroom in copyuntil * whoops * tweak * test fallbacks 13 July 2023, 11:58:56 UTC
9b73611 SROA: don't use `unswitchtupleunion` and explicitly use type name only (#50522) Since construction of `UnionAll` of `Union`s can be expensive. The SROA pass just needs to look at type name information and do not need to propagate full type objects. - xref: <https://github.com/JuliaLang/julia/pull/50511#issuecomment-1632384357> - closes #50511 13 July 2023, 07:50:15 UTC
824cdf1 Merge pull request #50525 from oscardssmith/fix-generic_lu_fact-check=false only check that values are finite in `generic_lufact` when `check=true` 13 July 2023, 03:50:40 UTC
2984f9c Couple of extra comments 13 July 2023, 02:39:38 UTC
9122376 remove unnecessary `::REPLDisplay == ::REPLDisplay` method (#50520) 13 July 2023, 02:34:50 UTC
a4f40eb Assume length is non-negative for increased efficiency 12 July 2023, 21:29:14 UTC
6ef6a0c typo 12 July 2023, 20:45:31 UTC
66f9f9c Remove mentions of “home project” in documentation and output The concept of “home project” was removed in #36434. 12 July 2023, 19:36:24 UTC
bfbff0f add tests 12 July 2023, 19:33:25 UTC
1c71fda only check that values are finite when check=true 12 July 2023, 19:25:32 UTC
9f62658 Address review comments 12 July 2023, 14:53:57 UTC
28720ff Fix visibility of assert on GCC12/13 12 July 2023, 08:26:09 UTC
4995d3f REPLCompletions: allow field completions for `Union` results (#50503) This generalizes the idea of #50483 and enables field completions when the result type is inferred to be `Union{A,B}` where `A` is not necessarily the same type as `B`. 12 July 2023, 06:09:15 UTC
e64d201 fix typo in the --gcthreads argument description (#50461) 12 July 2023, 02:36:22 UTC
5baaafd Rework introduction to SSA-IR in dev docs (#49796) Primary authorship credits for this go to Oscar Smith. This reworks the introduction to the SSA-IR section of the manual to give a brief introduction to SSA to prepare the reader with a short example. We also rework the Background and IR Node types sections. Co-authored-by: Oscar Smith <oscardssmith@gmail.com> 11 July 2023, 19:32:47 UTC
5a33c70 Clarify definition of cyclic permutation in randcycle docstring (#50487) 11 July 2023, 18:57:16 UTC
3995278 SROA: generalize `unswitchtupleunion` optimization (#50502) This commit improves SROA pass by extending the `unswitchtupleunion` optimization to handle the general parametric types, e.g.: ```julia julia> struct A{T} x::T end; julia> function foo(a1, a2, c) t = c ? A(a1) : A(a2) return getfield(t, :x) end; julia> only(Base.code_ircode(foo, (Int,Float64,Bool); optimize_until="SROA")) ``` > Before ``` 2 1 ─ goto #3 if not _4 │ 2 ─ %2 = %new(A{Int64}, _2)::A{Int64} │╻ A └── goto #4 │ 3 ─ %4 = %new(A{Float64}, _3)::A{Float64} │╻ A 4 ┄ %5 = φ (#2 => %2, #3 => %4)::Union{A{Float64}, A{Int64}} │ 3 │ %6 = Main.getfield(%5, :x)::Union{Float64, Int64} │ └── return %6 │ => Union{Float64, Int64} ``` > After ``` julia> only(Base.code_ircode(foo, (Int,Float64,Bool); optimize_until="SROA")) 2 1 ─ goto #3 if not _4 │ 2 ─ nothing::A{Int64} │╻ A └── goto #4 │ 3 ─ nothing::A{Float64} │╻ A 4 ┄ %8 = φ (#2 => _2, #3 => _3)::Union{Float64, Int64} │ │ nothing::Union{A{Float64}, A{Int64}} 3 │ %6 = %8::Union{Float64, Int64} │ └── return %6 │ => Union{Float64, Int64} ``` 11 July 2023, 17:53:28 UTC
39638cf Minor fixes 11 July 2023, 17:26:23 UTC
cab1fe3 Fix some test issues 11 July 2023, 15:13:26 UTC
0f6bfd6 Profile: Add specifying dir for `take_heap_snapshot` and handling if current dir is unwritable (#50476) Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 11 July 2023, 12:33:41 UTC
2d4d096 unify `shuffle` and `randperm` (#50318) 11 July 2023, 07:22:55 UTC
680e3b3 REPLCompletions: unswitch `Union` of same `UnionAll` results (#50483) With this commit the inference-base REPL completion algorithm converts `Union` result of same `UnionAll` instances to `UnionAll` of `Union`s so that it can use the field information of the `UnionAll`. This allows us to get completions for cases like: ```julia julia> union_somes() = rand() < 0.5 ? Some(1) : Some(2.); julia> union_somes().| # completes to `value` ``` 11 July 2023, 04:57:30 UTC
25eeba4 🤖 [master] Bump the Pkg stdlib from e8197dd0e to 80e64bcd3 (#50501) 11 July 2023, 03:51:26 UTC
3a36e1a sroa: Don't use unwrapped type for type constraint (#50499) In SROA, when we lift getfields over branches (ifelse or phi), we try to exclude branches that we know to not contribute by their types. However, we were incorrectly using the `unwrap_unionall`'ed version of the type. Type intersection has a bunch of fallbacks for free typevars, but the results are not necessarily correct (e.g. in the test case where `hasintersect(Wrap1{Wrap{Int}}, Wrap1{Wrap{T}})` gives false). We should ideally get around to just making type-quries for things with free typevars an error, but for now, just fix the particular issue in sroa, by using the non-unwrapped type. 11 July 2023, 02:59:50 UTC
b26f3b2 Update SparseArrays.jl stdlib for SuiteSparse 7 (#48977) * Use SparseArrays.jl updated to work with SuiteSparse 7, and with Int32 indices * SuiteSparse_jll Update to v7.2.0 (Using @Wimmerer's SuiteSparse fork for 32-bit QR) --------- Co-authored-by: Francois-Xavier Coudert <fxcoudert@gmail.com> Co-authored-by: Will Kimmerer <kimmerer@mit.edu> 11 July 2023, 01:01:40 UTC
39aff78 Name LLVM function arguments 11 July 2023, 00:24:23 UTC
a134076 Revise sort.md and docstrings in sort.jl (#48363) Co-authored-by: Jeremie Knuesel <knuesel@gmail.com> 10 July 2023, 22:30:48 UTC
8dd58a4 whitespace fix in randcycle (#50493) 10 July 2023, 16:45:27 UTC
e2e34f6 correction in `Base.isassigned` with `Tridiagonal` boundscheck error (#50488) See https://github.com/JuliaLang/julia/pull/49827#discussion_r1252566082 10 July 2023, 14:21:37 UTC
db6193c doc: add spaces after commas in some function calls (#50478) 10 July 2023, 12:22:02 UTC
7530a63 Clarify compat note in randcycle (#50482) 10 July 2023, 11:46:54 UTC
4051769 clarify documentation for r"..."x mode (#50462) 10 July 2023, 10:17:48 UTC
206e59a Fix compat annotation for italic printstyled (#50490) 10 July 2023, 10:16:28 UTC
7b435d0 Fix minor typos in comments / docs (#50489) 10 July 2023, 10:15:23 UTC
8e877cb relax assertion involving pg->nold to reflect that it may be a bit inaccurate with parallel marking (#50466) 10 July 2023, 00:40:14 UTC
84ef74f minor cleanup on `Core.Compiler.type_annotate!` (#50484) 10 July 2023, 00:39:01 UTC
7c80589 maximum is for array reduction, not max. (#50481) 09 July 2023, 19:17:01 UTC
fe2eead Document llvm passes in more depth (#50319) 09 July 2023, 14:12:08 UTC
236c23b docs: Fix a `!!! note` which was miscapitalized (#50474) 08 July 2023, 19:54:20 UTC
2e0e3d5 report if task has started in show method (#50464) 08 July 2023, 17:32:07 UTC
d60f9b3 Refactor and pass correct interpreter to typeinf finish loop (#50469) When we have an inference loop with different interpreters, the current code was trying to cache everything with the top level interpreter of the loop, yielding some unexpected behavior. I don't think that it's necessarily super well defined what should happen here, as it depends on the interpreters, in question, but I think it's better to try to cache each frame with the interpreter that created it, since they may have different lattices, etc. Doing this fixes an error I saw downstream that had just such a situation. --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 08 July 2023, 06:52:22 UTC
e20274f Remove FATAL_TYPE_BOUND_ERROR (#50465) 08 July 2023, 02:34:18 UTC
085c3d1 Make `(1:3:4)[6148914691236517207]` throw (#50118) 07 July 2023, 22:16:25 UTC
a660798 Improve documentation of sort-related functions (#48387) * document the `order` keyword in `sort!` * list explicitly the required properties of `lt` in `sort!` * clarify the sequence of "by" transformations if both `by` and `order` are given * show default values in the signatures for `searchsorted` and related functions * note that `by` is also applied to searched value in `searchsorted` and related * add `isunordered` to the manual (it's already exported) --------- Co-authored-by: Lilith Orion Hafner <lilithhafner@gmail.com> 07 July 2023, 22:14:40 UTC
b99f251 Merge new `reinterpret` with essentials.jl `reinterpret` (#50367) 07 July 2023, 19:11:29 UTC
930838b Add exports to `Example` module for the test workflow in the docs (#50459) The tests are not supposed to work if the toy module `Example` does not export its functions See https://discourse.julialang.org/t/workflow-for-testing-packages/101305 07 July 2023, 17:59:39 UTC
21bb0c7 Remove union penalties for inlining cost (#50429) I added this code back in #27057, when I first made Union-full signatures inlineable. The justification was to try to encourage the union splitting to happen on the outside. However (and I believe this changed since this code was introduced), these days inference is in complete control of union splitting and we do not take inlineability or non-inlineability of the non-unionsplit function into account when deciding how to inline. As a result, the only effect of the union split penalties was to prevent inlining of functions that are not union-split eligible (e.g. `+(::Vararg{Union{Int, Missing}, 3})`), but are nevertheless cheap by our inlining metric. There is really no reason not to try to inline such functions, so delete this logic. 07 July 2023, 15:43:52 UTC
0718995 Optimize getfield lowering to avoid boxing in some cases (#50444) 07 July 2023, 14:55:56 UTC
back to top