@@ -4381,7 +4381,7 @@ static jl_llvm_functions_t
4381
4381
jl_method_instance_t *lam,
4382
4382
jl_code_info_t *src,
4383
4383
jl_value_t *abi,
4384
- jl_value_t *rettype ,
4384
+ jl_value_t *jlrettype ,
4385
4385
jl_codegen_params_t ¶ms);
4386
4386
4387
4387
static 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)
5533
5533
return jl_get_ci_mi(ci)->specTypes;
5534
5534
}
5535
5535
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,
5537
5537
ArrayRef<jl_cgval_t> argv, size_t nargs, jl_returninfo_t::CallingConv *cc, unsigned *return_roots, jl_value_t *inferred_retty, Value *age_ok)
5538
5538
{
5539
5539
jl_method_instance_t *mi = jl_get_ci_mi(ci);
5540
5540
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,
5542
5542
specFunctionObject, fromexternal, argv, nargs, cc, return_roots, inferred_retty, age_ok);
5543
5543
}
5544
5544
@@ -5688,7 +5688,7 @@ static jl_cgval_t emit_invoke(jl_codectx_t &ctx, const jl_cgval_t &lival, ArrayR
5688
5688
jl_returninfo_t::CallingConv cc = jl_returninfo_t::CallingConv::Boxed;
5689
5689
unsigned return_roots = 0;
5690
5690
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);
5692
5692
else
5693
5693
result = emit_call_specfun_boxed(ctx, codeinst->rettype, protoname, external ? codeinst : nullptr, argv, nargs, rt, age_ok);
5694
5694
if (need_to_emit) {
@@ -10029,7 +10029,8 @@ jl_llvm_functions_t jl_emit_code(
10029
10029
orc::ThreadSafeModule &m,
10030
10030
jl_method_instance_t *li,
10031
10031
jl_code_info_t *src,
10032
- jl_value_t *abi,
10032
+ jl_value_t *abi_at,
10033
+ jl_value_t *abi_rt,
10033
10034
jl_codegen_params_t ¶ms)
10034
10035
{
10035
10036
JL_TIMING(CODEGEN, CODEGEN_LLVM);
@@ -10038,10 +10039,8 @@ jl_llvm_functions_t jl_emit_code(
10038
10039
assert((params.params == &jl_default_cgparams /* fast path */ || !params.cache ||
10039
10040
compare_cgparams(params.params, &jl_default_cgparams)) &&
10040
10041
"functions compiled with custom codegen params must not be cached");
10041
- if (!abi)
10042
- abi = li->specTypes;
10043
10042
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);
10045
10044
auto stream = *jl_ExecutionEngine->get_dump_emitted_mi_name_stream();
10046
10045
if (stream) {
10047
10046
jl_printf(stream, "%s\t", decls.specFunctionObject.c_str());
@@ -10112,7 +10111,7 @@ jl_llvm_functions_t jl_emit_codeinst(
10112
10111
return jl_llvm_functions_t(); // user error
10113
10112
}
10114
10113
//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);
10116
10115
return decls;
10117
10116
}
10118
10117
0 commit comments