@@ -6356,8 +6356,8 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaidx_
6356
6356
}
6357
6357
else if (head == jl_cfunction_sym) {
6358
6358
assert (nargs == 5 );
6359
- jl_cgval_t fexpr_rt = emit_expr (ctx, args[1 ]);
6360
- return emit_cfunction (ctx, args[0 ], fexpr_rt , args[2 ], (jl_svec_t *)args[3 ]);
6359
+ jl_cgval_t fexpr_val = emit_expr (ctx, args[1 ]);
6360
+ return emit_cfunction (ctx, args[0 ], fexpr_val , args[2 ], (jl_svec_t *)args[3 ]);
6361
6361
}
6362
6362
else if (head == jl_assign_sym) {
6363
6363
assert (nargs == 2 );
@@ -7576,7 +7576,7 @@ static const char *derive_sigt_name(jl_value_t *jargty)
7576
7576
// Get the LLVM Function* for the C-callable entry point for a certain function
7577
7577
// and argument types.
7578
7578
// here argt does not include the leading function type argument
7579
- static jl_cgval_t emit_cfunction (jl_codectx_t &ctx, jl_value_t *output_type, const jl_cgval_t &fexpr_rt , jl_value_t *declrt, jl_svec_t *argt)
7579
+ static jl_cgval_t emit_cfunction (jl_codectx_t &ctx, jl_value_t *output_type, const jl_cgval_t &fexpr_val , jl_value_t *declrt, jl_svec_t *argt)
7580
7580
{
7581
7581
jl_unionall_t *unionall_env = (jl_is_method (ctx.linfo ->def .method ) && jl_is_unionall (ctx.linfo ->def .method ->sig ))
7582
7582
? (jl_unionall_t *)ctx.linfo ->def .method ->sig
@@ -7634,8 +7634,8 @@ static jl_cgval_t emit_cfunction(jl_codectx_t &ctx, jl_value_t *output_type, con
7634
7634
// compute+verify the dispatch signature, and see if it depends on the environment sparams
7635
7635
bool approx = false ;
7636
7636
sigt = (jl_value_t *)jl_alloc_svec (nargt + 1 );
7637
- jl_svecset (sigt, 0 , fexpr_rt .typ );
7638
- if (!fexpr_rt .constant && (!jl_is_concrete_type (fexpr_rt .typ ) || jl_is_kind (fexpr_rt .typ )))
7637
+ jl_svecset (sigt, 0 , fexpr_val .typ );
7638
+ if (!fexpr_val .constant && (!jl_is_concrete_type (fexpr_val .typ ) || jl_is_kind (fexpr_val .typ )))
7639
7639
approx = true ;
7640
7640
for (size_t i = 0 ; i < nargt; i++) {
7641
7641
jl_value_t *jargty = jl_svecref (argt, i);
@@ -7664,25 +7664,25 @@ static jl_cgval_t emit_cfunction(jl_codectx_t &ctx, jl_value_t *output_type, con
7664
7664
unionall_env = NULL ;
7665
7665
}
7666
7666
7667
- bool nest = (!fexpr_rt .constant || unionall_env);
7667
+ bool nest = (!fexpr_val .constant || unionall_env);
7668
7668
if (ctx.emission_context .TargetTriple .isAArch64 () || ctx.emission_context .TargetTriple .isARM () || ctx.emission_context .TargetTriple .isPPC64 ()) {
7669
7669
if (nest) {
7670
7670
emit_error (ctx, " cfunction: closures are not supported on this platform" );
7671
7671
JL_GC_POP ();
7672
7672
return jl_cgval_t ();
7673
7673
}
7674
7674
}
7675
- const char *name = derive_sigt_name (fexpr_rt .typ );
7675
+ const char *name = derive_sigt_name (fexpr_val .typ );
7676
7676
Value *F = gen_cfun_wrapper (
7677
7677
jl_Module, ctx.emission_context ,
7678
- sig, fexpr_rt .constant , name,
7678
+ sig, fexpr_val .constant , name,
7679
7679
declrt, sigt,
7680
7680
unionall_env, sparam_vals, &closure_types);
7681
7681
bool outboxed;
7682
7682
if (nest) {
7683
7683
// F is actually an init_trampoline function that returns the real address
7684
7684
// Now fill in the nest parameters
7685
- Value *fobj = boxed (ctx, fexpr_rt );
7685
+ Value *fobj = boxed (ctx, fexpr_val );
7686
7686
jl_svec_t *fill = jl_emptysvec;
7687
7687
if (closure_types) {
7688
7688
assert (ctx.spvals_ptr );
@@ -7722,7 +7722,7 @@ static jl_cgval_t emit_cfunction(jl_codectx_t &ctx, jl_value_t *output_type, con
7722
7722
jl_aliasinfo_t ai = jl_aliasinfo_t::fromTBAA (ctx, tbaa);
7723
7723
ai.decorateInst (ctx.builder .CreateStore (F, derived_strct));
7724
7724
ai.decorateInst (ctx.builder .CreateStore (
7725
- ctx.builder .CreatePtrToInt (literal_pointer_val (ctx, fexpr_rt .constant ), ctx.types ().T_size ),
7725
+ ctx.builder .CreatePtrToInt (literal_pointer_val (ctx, fexpr_val .constant ), ctx.types ().T_size ),
7726
7726
ctx.builder .CreateConstInBoundsGEP1_32 (ctx.types ().T_size , derived_strct, 1 )));
7727
7727
ai.decorateInst (ctx.builder .CreateStore (Constant::getNullValue (ctx.types ().T_size ),
7728
7728
ctx.builder .CreateConstInBoundsGEP1_32 (ctx.types ().T_size , derived_strct, 2 )));
0 commit comments