Skip to content

Commit 08b0e69

Browse files
authored
Set types of boxed variables in abstract_eval_nonlinearized_foreigncall_name (#59921)
This prevents invalidations of `isready()` from loading Distributed on 1.12: ```julia inserting isready(pool::Distributed.WorkerPool) @ Distributed ~/.julia/juliaup/julia-1.12.1+0.x64.linux.gnu/share/julia/stdlib/v1.12/Distributed/src/workerpool.jl:168 invalidated: mt_backedges: 1: signature Tuple{typeof(isready), Any} triggered MethodInstance for (::Compiler.var"#evalargs#abstract_eval_nonlinearized_foreigncall_name##0"{Expr, Compiler.StatementState, Compiler.Future{Compiler.CallMeta}, Vector{Any}, Int64})(::Compiler.AbstractInterpreter, ::Compiler.InferenceState) (0 children) 2: signature Tuple{typeof(isready), Any} triggered MethodInstance for (::Compiler.var"#evalargs#abstract_eval_nonlinearized_foreigncall_name##0"{Expr, Compiler.StatementState, Compiler.Future{Compiler.CallMeta}, Vector{Any}, Int64})(::Compiler.NativeInterpreter, ::Compiler.InferenceState) (0 children) 3: signature Tuple{typeof(isready), Any} triggered MethodInstance for (::Compiler.var"#evalargs#abstract_eval_nonlinearized_foreigncall_name##0"{Expr, Compiler.StatementState, Compiler.Future{Compiler.CallMeta}, Vector{Any}, Int64})(::Compiler.AbstractInterpreter, ::Compiler.InferenceState) (249 children) ``` I think ideally it wouldn't use a closure at all, but I'm not familiar enough with the code to refactor it that much. I'm making the PR against the `release-1.12` branch because this function is deleted entirely on master by #59165.
1 parent 287a587 commit 08b0e69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/src/abstractinterpretation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3458,7 +3458,7 @@ function abstract_eval_nonlinearized_foreigncall_name(
34583458
callresult = Future{CallMeta}()
34593459
i::Int = 1
34603460
nextstate::UInt8 = 0x0
3461-
local ai, res
3461+
local ai::Future, res::Future
34623462
function evalargs(interp, sv)
34633463
if nextstate === 0x1
34643464
@goto state1

0 commit comments

Comments
 (0)