@@ -117,15 +117,15 @@ static int8_t jl_cachearg_offset(jl_methtable_t *mt)
117117/// ----- Insertion logic for special entries ----- ///
118118
119119// get or create the LambdaInfo for a specialization
120- JL_DLLEXPORT jl_lambda_info_t * jl_specializations_get_linfo (jl_method_t * m , jl_tupletype_t * type , jl_svec_t * sparams )
120+ JL_DLLEXPORT jl_lambda_info_t * jl_specializations_get_linfo (jl_method_t * m , jl_tupletype_t * type , jl_svec_t * sparams , int allow_exec )
121121{
122122 JL_LOCK (& m -> writelock );
123123 jl_typemap_entry_t * sf = jl_typemap_assoc_by_type (m -> specializations , type , NULL , 1 , /*subtype*/ 0 , /*offs*/ 0 );
124124 if (sf && jl_is_lambda_info (sf -> func .value ) && ((jl_lambda_info_t * )sf -> func .value )-> code != jl_nothing ) {
125125 JL_UNLOCK (& m -> writelock );
126126 return (jl_lambda_info_t * )sf -> func .value ;
127127 }
128- jl_lambda_info_t * li = jl_get_specialized (m , type , sparams , 1 );
128+ jl_lambda_info_t * li = jl_get_specialized (m , type , sparams , allow_exec );
129129 JL_GC_PUSH1 (& li );
130130 // TODO: fuse lookup and insert steps
131131 jl_typemap_insert (& m -> specializations , (jl_value_t * )m , type , jl_emptysvec , NULL , jl_emptysvec , (jl_value_t * )li , 0 , & tfunc_cache , NULL );
@@ -758,7 +758,7 @@ static jl_lambda_info_t *cache_method(jl_methtable_t *mt, union jl_typemap_t *ca
758758 }
759759
760760 // here we infer types and specialize the method
761- newmeth = jl_specializations_get_linfo (definition , type , sparams );
761+ newmeth = jl_specializations_get_linfo (definition , type , sparams , allow_exec );
762762
763763 if (cache_with_orig ) {
764764 // if there is a need to cache with one of the original signatures,
@@ -827,7 +827,7 @@ static jl_lambda_info_t *jl_mt_assoc_by_type(jl_methtable_t *mt, jl_datatype_t *
827827 sig = join_tsig (tt , entry -> sig );
828828 jl_lambda_info_t * nf ;
829829 if (!cache ) {
830- nf = jl_get_specialized (m , sig , env , allow_exec );
830+ nf = jl_specializations_get_linfo (m , sig , env , allow_exec );
831831 }
832832 else {
833833 nf = cache_method (mt , & mt -> cache , (jl_value_t * )mt , sig , tt , entry , env , allow_exec );
@@ -1593,7 +1593,7 @@ static void _compile_all_deq(jl_array_t *found)
15931593 if (m -> isstaged )
15941594 linfo = templ ;
15951595 else
1596- linfo = jl_specializations_get_linfo (m , ml -> sig , jl_emptysvec );
1596+ linfo = jl_specializations_get_linfo (m , ml -> sig , jl_emptysvec , 1 );
15971597
15981598 if (linfo -> jlcall_api == 2 )
15991599 continue ;
0 commit comments