From 628e0960b651e7d60de32bdb5e0323c0704f8024 Mon Sep 17 00:00:00 2001 From: KDr2 Date: Wed, 23 Feb 2022 22:49:13 +0800 Subject: [PATCH 1/3] fix #13 --- src/CodeInfoTools.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CodeInfoTools.jl b/src/CodeInfoTools.jl index 34b4ee3..f0a1092 100644 --- a/src/CodeInfoTools.jl +++ b/src/CodeInfoTools.jl @@ -558,7 +558,11 @@ function code_inferred(mi::Core.Compiler.MethodInstance; src.inferred && return src Core.Compiler.validate_code_in_debug_mode(result.linfo, src, "lowered") - frame = Core.Compiler.InferenceState(result, src, false, interp) + frame = @static if VERSION.major == 1 && VERSION.minor < 8 + Core.Compiler.InferenceState(result, src, false, interp) + else + Core.Compiler.InferenceState(result, src, :no, interp) + end frame === nothing && return nothing if Core.Compiler.typeinf(interp, frame) opt_params = Core.Compiler.OptimizationParams(interp) From 5f4fa8c3376305acfe1bdc437680c209585b2613 Mon Sep 17 00:00:00 2001 From: "McCoy R. Becker" <34410036+femtomc@users.noreply.github.com> Date: Wed, 23 Feb 2022 11:16:18 -0500 Subject: [PATCH 2/3] Update src/CodeInfoTools.jl Co-authored-by: David Widmann --- src/CodeInfoTools.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeInfoTools.jl b/src/CodeInfoTools.jl index f0a1092..063b220 100644 --- a/src/CodeInfoTools.jl +++ b/src/CodeInfoTools.jl @@ -558,7 +558,7 @@ function code_inferred(mi::Core.Compiler.MethodInstance; src.inferred && return src Core.Compiler.validate_code_in_debug_mode(result.linfo, src, "lowered") - frame = @static if VERSION.major == 1 && VERSION.minor < 8 + frame = @static if VERSION < v"1.8" Core.Compiler.InferenceState(result, src, false, interp) else Core.Compiler.InferenceState(result, src, :no, interp) From cfd8a9d1a36226150a0f1107cc54ae895a1fa845 Mon Sep 17 00:00:00 2001 From: "McCoy R. Becker" <34410036+femtomc@users.noreply.github.com> Date: Wed, 23 Feb 2022 12:01:23 -0500 Subject: [PATCH 3/3] Update src/CodeInfoTools.jl Co-authored-by: David Widmann --- src/CodeInfoTools.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CodeInfoTools.jl b/src/CodeInfoTools.jl index 063b220..4dca14d 100644 --- a/src/CodeInfoTools.jl +++ b/src/CodeInfoTools.jl @@ -558,7 +558,7 @@ function code_inferred(mi::Core.Compiler.MethodInstance; src.inferred && return src Core.Compiler.validate_code_in_debug_mode(result.linfo, src, "lowered") - frame = @static if VERSION < v"1.8" + frame = @static if VERSION < v"1.8.0-DEV.472" Core.Compiler.InferenceState(result, src, false, interp) else Core.Compiler.InferenceState(result, src, :no, interp)