Neven Sajko
Neven Sajko
The new implementation is more elegant and flexible, doing away with the code duplication and extreme amounts of constant-hardcoding. FTR, this PR is part of a series of changes which...
Return type inference improvement example: ```julia f(g, t::Tuple) = invoke(map, Tuple{Any,Tuple}, g, t) Core.Compiler.return_type(f, Tuple{typeof(sqrt),Tuple{Vararg{Int}}}) # master: `Tuple{Float64, Vararg{Any}}` # PR: `Tuple{Vararg{Float64}}` ``` FTR, this PR is part of a...
FTR, this PR is part of a series of changes which (re)implement many of the operations on tuples using a new recursive technique. The ultimate goal is to hopefully increase...
On v1.10: ```julia-repl julia> Core.Compiler.return_type(reverse, Tuple{Tuple}) Tuple julia> Core.Compiler.return_type(reverse, Tuple{Tuple{Vararg{Int}}}) Tuple{Vararg{Int64}} julia> versioninfo() Julia Version 1.10.3 Commit 0b4590a5507 (2024-04-30 10:59 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux...
Better type inference example: ```julia-repl julia> Core.Compiler.return_type(Base._findlast_rec, Tuple{typeof(_ -> rand(Bool)),Tuple}) Union{Nothing, Int64} ``` Example of better effects: ```julia-repl julia> Base.infer_effects(Base._findlast_rec, Tuple{typeof(Returns(true)),Tuple{Vararg{Any,50}}}) (+c,+e,+n,+t,+s,?m,+u) julia> Base.infer_effects(Base._findlast_rec, Tuple{typeof(Returns(false)),Tuple{Vararg{Any,50}}}) (+c,+e,+n,+t,+s,?m,+u) ``` FTR, this PR...
```julia-repl julia> Core.Compiler.return_type(Base.setindex, Tuple{Tuple,Nothing,Int}) versioninfo() Julia Version 1.12.0-DEV.495 Commit 3c966a5107a (2024-05-09 11:53 UTC) Build Info: Official https://julialang.org/ release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 8 × AMD Ryzen 3 5300U...
MWE: ```julia struct Frac{T} end Base.:+(a::Frac{
``` $ ./julia -g2 _ _ _ _(_)_ | Documentation: https://docs.julialang.org (_) | (_) (_) | _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg...
`Base.MainInclude.include` was deleted from `Base.MainInclude` for v1.11, even though it's documented. The explanation is that `Base.MainInclude` is intended as a mere implementation detail: https://github.com/JuliaLang/julia/issues/54057. In that case remaining references to...