diff --git a/base/compiler/compiler.jl b/base/compiler/compiler.jl index 6fe313b010cac..c8356611da4ab 100644 --- a/base/compiler/compiler.jl +++ b/base/compiler/compiler.jl @@ -111,7 +111,7 @@ include("compiler/typeinfer.jl") include("compiler/optimize.jl") # TODO: break this up further + extract utilities include("compiler/bootstrap.jl") -ccall(:jl_set_typeinf_func, Cvoid, (Any,), typeinf_ext) +ccall(:jl_set_typeinf_func, Cvoid, (Any,), typeinf_ext_toplevel) end # baremodule Compiler )) diff --git a/base/compiler/ssair/inlining.jl b/base/compiler/ssair/inlining.jl index 0b2378df34fd5..7c42385f28a98 100644 --- a/base/compiler/ssair/inlining.jl +++ b/base/compiler/ssair/inlining.jl @@ -1198,7 +1198,7 @@ function early_inline_special_case(ir::IRCode, s::Signature, e::Expr, params::Op return nothing end -function late_inline_special_case!(ir::IRCode, sig::Signature, idx::Int, stmt::Expr, params::Params) +function late_inline_special_case!(ir::IRCode, sig::Signature, idx::Int, stmt::Expr, params::OptimizationParams) typ = ir.types[idx] f, ft, atypes = sig.f, sig.ft, sig.atypes if params.inlining && length(atypes) == 3 && istopfunction(f, :!==) diff --git a/base/compiler/typeinfer.jl b/base/compiler/typeinfer.jl index 5367fa40f3b40..0e367bb3f6449 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -596,9 +596,9 @@ function typeinf_type(interp::AbstractInterpreter, method::Method, @nospecialize return widenconst(frame.result) end -# This is a bridge for the C code calling `jl_typinf_func()` -typeinf_ext(mi::MethodInstance, world::UInt) = typeinf_ext(NativeInterpreter(world), mi, world) -function typeinf_ext(interp::AbstractInterpreter, linfo::MethodInstance, world::UInt) +# This is a bridge for the C code calling `jl_typeinf_func()` +typeinf_ext_toplevel(mi::MethodInstance, world::UInt) = typeinf_ext_toplevel(NativeInterpreter(world), mi) +function typeinf_ext_toplevel(interp::AbstractInterpreter, linfo::MethodInstance) if isa(linfo.def, Method) # method lambda - infer this specialization via the method cache src = typeinf_ext(interp, linfo)