Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JuliaLang/julia#44389 removed `method_table(::AbstractInterpreter, ::InferenceState)` interface,
and now we should overload `method_table(::AbstractInterpreter)` instead.
  • Loading branch information
aviatesk committed Mar 3, 2022
1 parent 55ae222 commit bddc0c1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,19 @@ end
Core.Compiler.may_optimize(interp::GPUInterpreter) = true
Core.Compiler.may_compress(interp::GPUInterpreter) = true
Core.Compiler.may_discard_trees(interp::GPUInterpreter) = true
@static if VERSION >= v"1.7.0-DEV.577"
if VERSION >= v"1.7.0-DEV.577"
Core.Compiler.verbose_stmt_info(interp::GPUInterpreter) = false
end

@static if isdefined(Base.Experimental, Symbol("@overlay"))
if isdefined(Base.Experimental, Symbol("@overlay"))
using Core.Compiler: OverlayMethodTable
if VERSION >= v"1.9.0-DEV.120"
Core.Compiler.method_table(interp::GPUInterpreter) =
OverlayMethodTable(interp.world, interp.method_table)
else
Core.Compiler.method_table(interp::GPUInterpreter, sv::InferenceState) =
OverlayMethodTable(interp.world, interp.method_table)
end
else
Core.Compiler.method_table(interp::GPUInterpreter, sv::InferenceState) =
WorldOverlayMethodTable(interp.world)
Expand Down

0 comments on commit bddc0c1

Please sign in to comment.