@@ -117,15 +117,15 @@ static int8_t jl_cachearg_offset(jl_methtable_t *mt)
117
117
/// ----- Insertion logic for special entries ----- ///
118
118
119
119
// 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 )
121
121
{
122
122
JL_LOCK (& m -> writelock );
123
123
jl_typemap_entry_t * sf = jl_typemap_assoc_by_type (m -> specializations , type , NULL , 1 , /*subtype*/ 0 , /*offs*/ 0 );
124
124
if (sf && jl_is_lambda_info (sf -> func .value ) && ((jl_lambda_info_t * )sf -> func .value )-> code != jl_nothing ) {
125
125
JL_UNLOCK (& m -> writelock );
126
126
return (jl_lambda_info_t * )sf -> func .value ;
127
127
}
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 );
129
129
JL_GC_PUSH1 (& li );
130
130
// TODO: fuse lookup and insert steps
131
131
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
758
758
}
759
759
760
760
// 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 );
762
762
763
763
if (cache_with_orig ) {
764
764
// 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 *
827
827
sig = join_tsig (tt , entry -> sig );
828
828
jl_lambda_info_t * nf ;
829
829
if (!cache ) {
830
- nf = jl_get_specialized (m , sig , env , allow_exec );
830
+ nf = jl_specializations_get_linfo (m , sig , env , allow_exec );
831
831
}
832
832
else {
833
833
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)
1593
1593
if (m -> isstaged )
1594
1594
linfo = templ ;
1595
1595
else
1596
- linfo = jl_specializations_get_linfo (m , ml -> sig , jl_emptysvec );
1596
+ linfo = jl_specializations_get_linfo (m , ml -> sig , jl_emptysvec , 1 );
1597
1597
1598
1598
if (linfo -> jlcall_api == 2 )
1599
1599
continue ;
0 commit comments