Skip to content

Commit

Permalink
updates with 1.8 backports (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Mar 16, 2022
1 parent d01b20b commit 72227ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72227ca

Please sign in to comment.