@@ -4381,7 +4381,7 @@ static jl_llvm_functions_t
43814381 jl_method_instance_t *lam,
43824382 jl_code_info_t *src,
43834383 jl_value_t *abi,
4384- jl_value_t *rettype ,
4384+ jl_value_t *jlrettype ,
43854385 jl_codegen_params_t ¶ms);
43864386
43874387static void emit_hasnofield_error_ifnot (jl_codectx_t &ctx, Value *ok, jl_datatype_t *type, jl_cgval_t name);
@@ -5533,12 +5533,12 @@ static jl_value_t *get_ci_abi(jl_code_instance_t *ci)
55335533 return jl_get_ci_mi (ci)->specTypes ;
55345534}
55355535
5536- static jl_cgval_t emit_call_specfun_other (jl_codectx_t &ctx, jl_code_instance_t *ci, jl_value_t *jlretty, StringRef specFunctionObject, jl_code_instance_t *fromexternal,
5536+ static jl_cgval_t emit_call_specfun_other (jl_codectx_t &ctx, jl_code_instance_t *ci, StringRef specFunctionObject, jl_code_instance_t *fromexternal,
55375537 ArrayRef<jl_cgval_t > argv, size_t nargs, jl_returninfo_t ::CallingConv *cc, unsigned *return_roots, jl_value_t *inferred_retty, Value *age_ok)
55385538{
55395539 jl_method_instance_t *mi = jl_get_ci_mi (ci);
55405540 bool is_opaque_closure = jl_is_method (mi->def .value ) && mi->def .method ->is_for_opaque_closure ;
5541- return emit_call_specfun_other (ctx, is_opaque_closure, get_ci_abi (ci), jlretty , NULL ,
5541+ return emit_call_specfun_other (ctx, is_opaque_closure, get_ci_abi (ci), ci-> rettype , NULL ,
55425542 specFunctionObject, fromexternal, argv, nargs, cc, return_roots, inferred_retty, age_ok);
55435543}
55445544
@@ -5688,7 +5688,7 @@ static jl_cgval_t emit_invoke(jl_codectx_t &ctx, const jl_cgval_t &lival, ArrayR
56885688 jl_returninfo_t ::CallingConv cc = jl_returninfo_t ::CallingConv::Boxed;
56895689 unsigned return_roots = 0 ;
56905690 if (specsig)
5691- result = emit_call_specfun_other (ctx, codeinst, codeinst-> rettype , protoname, external ? codeinst : nullptr , argv, nargs, &cc, &return_roots, rt, age_ok);
5691+ result = emit_call_specfun_other (ctx, codeinst, protoname, external ? codeinst : nullptr , argv, nargs, &cc, &return_roots, rt, age_ok);
56925692 else
56935693 result = emit_call_specfun_boxed (ctx, codeinst->rettype , protoname, external ? codeinst : nullptr , argv, nargs, rt, age_ok);
56945694 if (need_to_emit) {
@@ -10029,7 +10029,8 @@ jl_llvm_functions_t jl_emit_code(
1002910029 orc::ThreadSafeModule &m,
1003010030 jl_method_instance_t *li,
1003110031 jl_code_info_t *src,
10032- jl_value_t *abi,
10032+ jl_value_t *abi_at,
10033+ jl_value_t *abi_rt,
1003310034 jl_codegen_params_t ¶ms)
1003410035{
1003510036 JL_TIMING (CODEGEN, CODEGEN_LLVM);
@@ -10038,10 +10039,8 @@ jl_llvm_functions_t jl_emit_code(
1003810039 assert ((params.params == &jl_default_cgparams /* fast path */ || !params.cache ||
1003910040 compare_cgparams (params.params , &jl_default_cgparams)) &&
1004010041 " functions compiled with custom codegen params must not be cached" );
10041- if (!abi)
10042- abi = li->specTypes ;
1004310042 JL_TRY {
10044- decls = emit_function (m, li, src, abi, src-> rettype , params);
10043+ decls = emit_function (m, li, src, abi_at, abi_rt , params);
1004510044 auto stream = *jl_ExecutionEngine->get_dump_emitted_mi_name_stream ();
1004610045 if (stream) {
1004710046 jl_printf (stream, " %s\t " , decls.specFunctionObject .c_str ());
@@ -10112,7 +10111,7 @@ jl_llvm_functions_t jl_emit_codeinst(
1011210111 return jl_llvm_functions_t (); // user error
1011310112 }
1011410113 // assert(jl_egal((jl_value_t*)jl_atomic_load_relaxed(&codeinst->debuginfo), (jl_value_t*)src->debuginfo) && "trying to generate code for a codeinst for an incompatible src");
10115- jl_llvm_functions_t decls = jl_emit_code (m, jl_get_ci_mi (codeinst), src, get_ci_abi (codeinst), params);
10114+ jl_llvm_functions_t decls = jl_emit_code (m, jl_get_ci_mi (codeinst), src, get_ci_abi (codeinst), codeinst-> rettype , params);
1011610115 return decls;
1011710116}
1011810117
0 commit comments