diff --git a/base/compiler/compiler.jl b/base/compiler/compiler.jl index 6ed55bdc05918..fd420d5c8e0f3 100644 --- a/base/compiler/compiler.jl +++ b/base/compiler/compiler.jl @@ -109,7 +109,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/typeinfer.jl b/base/compiler/typeinfer.jl index 1e69e4a766c78..d9d86d58eb947 100644 --- a/base/compiler/typeinfer.jl +++ b/base/compiler/typeinfer.jl @@ -600,9 +600,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)