Skip to content

Commit

Permalink
add minimum adjustments to JuliaLang/julia#52233 (#612)
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 85d913b commit 5dd6e1d
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)
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"
add_jet_callback!(mi, analysis_cache)
end
return analysis_cache[mi] = codeinst
end

Expand Down

0 comments on commit 5dd6e1d

Please sign in to comment.