Skip to content

Commit 510d0e4

Browse files
KDr2femtomcdevmotion
authored
Fix code_inferred under v1.8 (#14)
* fix #13 * Update src/CodeInfoTools.jl Co-authored-by: David Widmann <[email protected]> * Update src/CodeInfoTools.jl Co-authored-by: David Widmann <[email protected]> Co-authored-by: McCoy R. Becker <[email protected]> Co-authored-by: David Widmann <[email protected]>
1 parent ef30d9f commit 510d0e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CodeInfoTools.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,11 @@ function code_inferred(mi::Core.Compiler.MethodInstance;
558558
src.inferred && return src
559559
Core.Compiler.validate_code_in_debug_mode(result.linfo,
560560
src, "lowered")
561-
frame = Core.Compiler.InferenceState(result, src, false, interp)
561+
frame = @static if VERSION < v"1.8.0-DEV.472"
562+
Core.Compiler.InferenceState(result, src, false, interp)
563+
else
564+
Core.Compiler.InferenceState(result, src, :no, interp)
565+
end
562566
frame === nothing && return nothing
563567
if Core.Compiler.typeinf(interp, frame)
564568
opt_params = Core.Compiler.OptimizationParams(interp)

0 commit comments

Comments
 (0)