Skip to content

Commit 98c47ac

Browse files
committed
add minimum adjustments to JuliaLang/julia#52233
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.
1 parent b44ed4f commit 98c47ac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/abstractinterpret/typeinfer.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ end
150150
# global
151151
# ------
152152

153+
@static if VERSION v"1.11.0-DEV.1552"
154+
CC.cache_owner(analyzer::AbstractAnalyzer) = AnalysisCache(analyzer)
155+
end
156+
153157
function CC.code_cache(analyzer::AbstractAnalyzer)
154158
view = AbstractAnalyzerView(analyzer)
155159
worlds = WorldRange(get_inference_world(analyzer))
@@ -225,7 +229,9 @@ end
225229

226230
function CC.setindex!(wvc::WorldView{<:AbstractAnalyzerView}, codeinst::CodeInstance, mi::MethodInstance)
227231
analysis_cache = AnalysisCache(wvc)
232+
@static if VERSION < v"1.11.0-DEV.1552"
228233
add_jet_callback!(mi, analysis_cache)
234+
end
229235
return analysis_cache[mi] = codeinst
230236
end
231237

0 commit comments

Comments
 (0)