Skip to content

Commit 28d3bd5

Browse files
authored
inference: exclude uncached frames from callstack (#57743)
This is more consistent with how it is handled recursively and removes confusion here where the LimitedAccuracy could appear to happen from the top-level uncached frame. I was unable to make a reduced test-case showing this failing. Fixes #57634
1 parent fbe9c8b commit 28d3bd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Compiler/src/inferencestate.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,12 @@ ascending the tree from the given `AbsIntState`).
989989
Note that cycles may be visited in any order.
990990
"""
991991
struct AbsIntStackUnwind
992-
sv::AbsIntState
992+
callstack::Vector{AbsIntState}
993+
AbsIntStackUnwind(sv::AbsIntState) = new(sv.callstack::Vector{AbsIntState})
993994
end
994-
iterate(unw::AbsIntStackUnwind) = (unw.sv, length(unw.sv.callstack::Vector{AbsIntState}))
995-
function iterate(unw::AbsIntStackUnwind, frame::Int)
995+
function iterate(unw::AbsIntStackUnwind, frame::Int=length(unw.callstack))
996996
frame == 0 && return nothing
997-
return ((unw.sv.callstack::Vector{AbsIntState})[frame], frame - 1)
997+
return (unw.callstack[frame], frame - 1)
998998
end
999999

10001000
struct AbsIntCycle

0 commit comments

Comments
 (0)