Skip to content

Commit 8644cb2

Browse files
committed
Return CodeInstance
1 parent c565f91 commit 8644cb2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Compiler/src/typeinfer.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,10 +1284,10 @@ end
12841284
function typeinf_ext_toplevel(mi::MethodInstance, world::UInt, source_mode::UInt8)
12851285
interp = NativeInterpreter(world)
12861286
ci = typeinf_ext(interp, mi, source_mode)
1287-
source_mode == SOURCE_MODE_ABI || return
1288-
ci isa CodeInstance && !ci_has_invoke(ci) || return
1287+
source_mode == SOURCE_MODE_ABI || return ci
1288+
ci isa CodeInstance && !ci_has_invoke(ci) || return ci
12891289
codegen = codegen_cache(interp)
1290-
codegen === nothing && return
1290+
codegen === nothing && return ci
12911291
inspected = IdSet{CodeInstance}()
12921292
tocompile = Vector{CodeInstance}()
12931293
push!(tocompile, ci)
@@ -1317,6 +1317,7 @@ function typeinf_ext_toplevel(mi::MethodInstance, world::UInt, source_mode::UInt
13171317
collectinvokes!(tocompile, src)
13181318
ccall(:jl_add_codeinst_to_jit, Cvoid, (Any, Any), callee, src)
13191319
end
1320+
return ci
13201321
end
13211322

13221323
# This is a bridge for the C code calling `jl_typeinf_func()` on set of Method matches

0 commit comments

Comments
 (0)