From 72227cab9a7444197a26ba4de925afcdd2eb67f6 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Wed, 16 Mar 2022 17:45:11 +0900 Subject: [PATCH] updates with 1.8 backports (#279) --- src/interpreter.jl | 6 +++--- test/runtests.jl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interpreter.jl b/src/interpreter.jl index 6d67d234..7ec14c65 100644 --- a/src/interpreter.jl +++ b/src/interpreter.jl @@ -49,11 +49,11 @@ Compiler.get_inference_cache(interp::CthulhuInterpreter) = get_inference_cache(i # No need to do any locking since we're not putting our results into the runtime cache Compiler.lock_mi_inference(interp::CthulhuInterpreter, mi::MethodInstance) = nothing Compiler.unlock_mi_inference(interp::CthulhuInterpreter, mi::MethodInstance) = nothing -@static if VERSION >= v"1.9.0-DEV.120" +@static if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" Compiler.method_table(interp::CthulhuInterpreter) = method_table(interp.native) -else # @static if VERSION >= v"1.9.0-DEV.120" +else # if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" Compiler.method_table(interp::CthulhuInterpreter, sv::InferenceState) = method_table(interp.native, sv) -end # @static if VERSION >= v"1.9.0-DEV.120" +end # if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" struct CthulhuCache cache::Dict{MethodInstance, CodeInstance} end diff --git a/test/runtests.jl b/test/runtests.jl index 062a7e98..f166276a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -813,11 +813,11 @@ import Base.Experimental: @MethodTable, @overlay @newinterp MTOverlayInterp @MethodTable(OverlayedMT) -@static if VERSION >= v"1.9.0-DEV.120" +@static if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" CC.method_table(interp::MTOverlayInterp) = CC.OverlayMethodTable(CC.get_world_counter(interp), OverlayedMT) -else # @static if VERSION >= v"1.9.0-DEV.120" +else # if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" CC.method_table(interp::MTOverlayInterp, sv::CC.InferenceState) = CC.OverlayMethodTable(CC.get_world_counter(interp), OverlayedMT) -end # @static if VERSION >= v"1.9.0-DEV.120" +end # if v"1.8-beta2" <= VERSION < v"1.9-" || VERSION >= v"1.9.0-DEV.120" @overlay OverlayedMT sin(x::Float64) = 1 let