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 authored and Keno committed May 10, 2020
1 parent c5fcd73 commit 10b572c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion base/compiler/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
2 changes: 1 addition & 1 deletion base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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, :!==)
Expand Down
6 changes: 3 additions & 3 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10b572c

Please sign in to comment.