Skip to content

Commit

Permalink
add minimum adjustments to JuliaLang/julia#52233
Browse files Browse the repository at this point in the history
This lacks invalidation support (since this commit still uses the
external code cache), but this lets JET to run on the latest nightly
at least.
  • Loading branch information
aviatesk committed Feb 13, 2024
1 parent b44ed4f commit 98c47ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/abstractinterpret/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ end
# global
# ------

@static if VERSION v"1.11.0-DEV.1552"
CC.cache_owner(analyzer::AbstractAnalyzer) = AnalysisCache(analyzer)

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

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L154

Added line #L154 was not covered by tests
end

function CC.code_cache(analyzer::AbstractAnalyzer)
view = AbstractAnalyzerView(analyzer)
worlds = WorldRange(get_inference_world(analyzer))
Expand Down Expand Up @@ -225,7 +229,9 @@ end

function CC.setindex!(wvc::WorldView{<:AbstractAnalyzerView}, codeinst::CodeInstance, mi::MethodInstance)
analysis_cache = AnalysisCache(wvc)
@static if VERSION < v"1.11.0-DEV.1552"

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

View check run for this annotation

Codecov / codecov/patch

src/abstractinterpret/typeinfer.jl#L232

Added line #L232 was not covered by tests
add_jet_callback!(mi, analysis_cache)
end
return analysis_cache[mi] = codeinst
end

Expand Down

0 comments on commit 98c47ac

Please sign in to comment.