From f89d64c0386a6862ea7f8c6b54aa75fd4d477a16 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sat, 28 Nov 2020 11:25:20 -0600 Subject: [PATCH] Allow parametrization of `optimize` by `interp`. Fixes #100 This changed in https://github.com/JuliaLang/julia/pull/38287 --- src/reflection.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reflection.jl b/src/reflection.jl index 9a11ce91..1128794a 100644 --- a/src/reflection.jl +++ b/src/reflection.jl @@ -250,7 +250,8 @@ if isdefined(Core.Compiler, :AbstractInterpreter) if Compiler.typeinf(interp, frame) && run_optimizer oparams = Core.Compiler.OptimizationParams(interp) opt = Compiler.OptimizationState(frame, oparams, interp) - Compiler.optimize(opt, oparams, result.result) + Base.VERSION >= v"1.6.0-DEV.1410" ? Compiler.optimize(interp, opt, oparams, result.result) : + Compiler.optimize(opt, oparams, result.result) opt.src.inferred = true end ccall(:jl_typeinf_end, Cvoid, ())