@@ -582,6 +582,7 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
582
582
if ci_cache_lookup (cache, job. source, job. world, job. world) === nothing
583
583
ci_cache_populate (interp, cache, job. source, job. world, job. world)
584
584
end
585
+ @assert ci_cache_lookup (cache, job. source, job. world, job. world) != = nothing
585
586
586
587
# create a callback to look-up function in our cache,
587
588
# and keep track of the method instances we needed.
@@ -698,9 +699,10 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
698
699
ccall (:jl_get_function_id , Nothing,
699
700
(Ptr{Cvoid}, Any, Ptr{Int32}, Ptr{Int32}),
700
701
native_code, ci, llvm_func_idx, llvm_specfunc_idx)
702
+ @assert llvm_func_idx[] != - 1 || llvm_specfunc_idx[] != - 1 " Static compilation failed"
701
703
702
704
# get the function
703
- llvm_func = if llvm_func_idx[] >= 1
705
+ llvm_func = if llvm_func_idx[] >= 1
704
706
llvm_func_ref = ccall (:jl_get_llvm_function , LLVM. API. LLVMValueRef,
705
707
(Ptr{Cvoid}, UInt32), native_code, llvm_func_idx[]- 1 )
706
708
@assert llvm_func_ref != C_NULL
@@ -709,7 +711,7 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
709
711
nothing
710
712
end
711
713
712
- llvm_specfunc = if llvm_specfunc_idx[] >= 1
714
+ llvm_specfunc = if llvm_specfunc_idx[] >= 1
713
715
llvm_specfunc_ref = ccall (:jl_get_llvm_function , LLVM. API. LLVMValueRef,
714
716
(Ptr{Cvoid}, UInt32), native_code, llvm_specfunc_idx[]- 1 )
715
717
@assert llvm_specfunc_ref != C_NULL
0 commit comments