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 776cbd5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/jlgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ end

## method overrides

@static if isdefined(Base.Experimental, Symbol("@overlay"))
if isdefined(Base.Experimental, Symbol("@overlay"))

# use an overlay method table

Expand Down 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 776cbd5

Please sign in to comment.