@@ -6356,8 +6356,8 @@ static jl_cgval_t emit_expr(jl_codectx_t &ctx, jl_value_t *expr, ssize_t ssaidx_
63566356 }
63576357 else if (head == jl_cfunction_sym) {
63586358 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 ]);
63616361 }
63626362 else if (head == jl_assign_sym) {
63636363 assert (nargs == 2 );
@@ -7576,7 +7576,7 @@ static const char *derive_sigt_name(jl_value_t *jargty)
75767576// Get the LLVM Function* for the C-callable entry point for a certain function
75777577// and argument types.
75787578// 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)
75807580{
75817581 jl_unionall_t *unionall_env = (jl_is_method (ctx.linfo ->def .method ) && jl_is_unionall (ctx.linfo ->def .method ->sig ))
75827582 ? (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
76347634 // compute+verify the dispatch signature, and see if it depends on the environment sparams
76357635 bool approx = false ;
76367636 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 )))
76397639 approx = true ;
76407640 for (size_t i = 0 ; i < nargt; i++) {
76417641 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
76647664 unionall_env = NULL ;
76657665 }
76667666
7667- bool nest = (!fexpr_rt .constant || unionall_env);
7667+ bool nest = (!fexpr_val .constant || unionall_env);
76687668 if (ctx.emission_context .TargetTriple .isAArch64 () || ctx.emission_context .TargetTriple .isARM () || ctx.emission_context .TargetTriple .isPPC64 ()) {
76697669 if (nest) {
76707670 emit_error (ctx, " cfunction: closures are not supported on this platform" );
76717671 JL_GC_POP ();
76727672 return jl_cgval_t ();
76737673 }
76747674 }
7675- const char *name = derive_sigt_name (fexpr_rt .typ );
7675+ const char *name = derive_sigt_name (fexpr_val .typ );
76767676 Value *F = gen_cfun_wrapper (
76777677 jl_Module, ctx.emission_context ,
7678- sig, fexpr_rt .constant , name,
7678+ sig, fexpr_val .constant , name,
76797679 declrt, sigt,
76807680 unionall_env, sparam_vals, &closure_types);
76817681 bool outboxed;
76827682 if (nest) {
76837683 // F is actually an init_trampoline function that returns the real address
76847684 // Now fill in the nest parameters
7685- Value *fobj = boxed (ctx, fexpr_rt );
7685+ Value *fobj = boxed (ctx, fexpr_val );
76867686 jl_svec_t *fill = jl_emptysvec;
76877687 if (closure_types) {
76887688 assert (ctx.spvals_ptr );
@@ -7722,7 +7722,7 @@ static jl_cgval_t emit_cfunction(jl_codectx_t &ctx, jl_value_t *output_type, con
77227722 jl_aliasinfo_t ai = jl_aliasinfo_t::fromTBAA (ctx, tbaa);
77237723 ai.decorateInst (ctx.builder .CreateStore (F, derived_strct));
77247724 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 ),
77267726 ctx.builder .CreateConstInBoundsGEP1_32 (ctx.types ().T_size , derived_strct, 1 )));
77277727 ai.decorateInst (ctx.builder .CreateStore (Constant::getNullValue (ctx.types ().T_size ),
77287728 ctx.builder .CreateConstInBoundsGEP1_32 (ctx.types ().T_size , derived_strct, 2 )));
0 commit comments