Skip to content

Commit

Permalink
make Infiltrator available within Core.Compiler.EscapeAnalysis
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Oct 4, 2024
1 parent db31af9 commit b5a4d58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Infiltrator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ macro infiltrate(cond = true)
# XXX Dict isn't available in Core.Compiler, so make it available now
Core.eval(Core.Compiler, :(using .Main: Dict))
Core.eval(Core.Compiler, :(setindex!(x::Dict, args...) = Main.setindex!(x, args...)))
elseif @static isdefined(Core.Compiler, :EscapeAnalysis) &&
__module__ === Core.Compiler.EscapeAnalysis && !isdefined(Core.Compiler.EscapeAnalysis, :Dict)
Core.eval(Core.Compiler.EscapeAnalysis, :(using .Main: Dict))
Core.eval(Core.Compiler.EscapeAnalysis, :(setindex!(x::Dict, args...) = Main.setindex!(x, args...)))
end
quote
if $(esc(cond))
Expand Down

0 comments on commit b5a4d58

Please sign in to comment.