From bddc0c127e0ff60bf5256064c90990893a654595 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 3 Mar 2022 10:56:11 +0900 Subject: [PATCH] update to JuliaLang/julia#44389 JuliaLang/julia#44389 removed `method_table(::AbstractInterpreter, ::InferenceState)` interface, and now we should overload `method_table(::AbstractInterpreter)` instead. --- src/jlgen.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jlgen.jl b/src/jlgen.jl index a9680e0b..8aa359de 100644 --- a/src/jlgen.jl +++ b/src/jlgen.jl @@ -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)