Skip to content

Commit

Permalink
Rename one typeinf_ext method to typeinf_ext_toplevel
Browse files Browse the repository at this point in the history
This disambiguates the two methods, allowing us to eliminate the
redundant `world::UInt` parameter.
  • Loading branch information
staticfloat committed Jan 28, 2020
1 parent 8514cfe commit 3c7a59b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion base/compiler/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
6 changes: 3 additions & 3 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c7a59b

Please sign in to comment.