Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI on nightly #594

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/abstractinterpret/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,41 @@
return ret
end

# N.B. this overload essentially reverts JuliaLang/julia#50469 for type stability,
# but this is safe since `AbstractAnalyzer` doesn't currently support any compositions
# with other abstract interpreters
function CC._typeinf(analyzer::AbstractAnalyzer, frame::InferenceState)
CC.typeinf_nocycle(analyzer, frame) || return false # frame is now part of a higher cycle

Check warning on line 449 in src/abstractinterpret/typeinfer.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L448-L449

Added lines #L448 - L449 were not covered by tests
# with no active ip's, frame is done
frames = frame.callers_in_cycle
isempty(frames) && push!(frames, frame)
valid_worlds = WorldRange()
for caller in frames
@assert !(caller.dont_work_on_me)
caller.dont_work_on_me = true

Check warning on line 456 in src/abstractinterpret/typeinfer.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L451-L456

Added lines #L451 - L456 were not covered by tests
# might might not fully intersect these earlier, so do that now
valid_worlds = CC.intersect(caller.valid_worlds, valid_worlds)
end
for caller in frames
caller.valid_worlds = valid_worlds
CC.finish(caller, #=CHANGED caller.interp=#analyzer)
end
for caller in frames
opt = caller.result.src
if opt isa OptimizationState{typeof(analyzer)} # CHANGED: added {typeof(analyzer)}
CC.optimize(#=CHANGED caller.interp=#analyzer, opt, caller.result)

Check warning on line 467 in src/abstractinterpret/typeinfer.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L458-L467

Added lines #L458 - L467 were not covered by tests
end
end
for caller in frames
finish!(#=CHANGED caller.interp=#analyzer, caller)
if CC.is_cached(caller)
CC.cache_result!(#=CHANGED caller.interp=#analyzer, caller.result)

Check warning on line 473 in src/abstractinterpret/typeinfer.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L469-L473

Added lines #L469 - L473 were not covered by tests
end
end
empty!(frames)
return true

Check warning on line 477 in src/abstractinterpret/typeinfer.jl

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L475-L477

Added lines #L475 - L477 were not covered by tests
end

else

# in this overload we can work on `frame.src::CodeInfo` (and also `frame::InferenceState`)
Expand Down
Loading