@@ -1600,7 +1600,7 @@ static MDNode *best_tbaa(jl_tbaacache_t &tbaa_cache, jl_value_t *jt) {
1600
1600
// note that this includes jl_isbits, although codegen should work regardless
1601
1601
static bool jl_is_concrete_immutable (jl_value_t * t)
1602
1602
{
1603
- return jl_is_immutable_datatype (t) && ((jl_datatype_t *)t)->isconcretetype ;
1603
+ return jl_may_be_immutable_datatype (t) && ((jl_datatype_t *)t)->isconcretetype ;
1604
1604
}
1605
1605
1606
1606
static bool jl_is_pointerfree (jl_value_t * t)
@@ -7385,8 +7385,8 @@ static Function *gen_cfun_wrapper(
7385
7385
inputarg = mark_julia_type (ctx, val, false , jargty);
7386
7386
}
7387
7387
}
7388
- else if (static_at || (!jl_is_typevar (jargty) && !jl_is_immutable_datatype (jargty))) {
7389
- // must be a jl_value_t* (because it's mutable or contains gc roots)
7388
+ else if (static_at || (!jl_is_typevar (jargty) && !jl_is_concrete_immutable (jargty))) {
7389
+ // must be a jl_value_t* (because it's mutable, abstract, or contains gc roots)
7390
7390
inputarg = mark_julia_type (ctx, maybe_decay_untracked (ctx, val), true , jargty_proper);
7391
7391
}
7392
7392
else {
@@ -7980,7 +7980,7 @@ static jl_returninfo_t get_specsig_function(jl_codegen_params_t ¶ms, Module
7980
7980
param.addAttribute (Attribute::ReadOnly);
7981
7981
ty = PointerType::get (M->getContext (), AddressSpace::Derived);
7982
7982
}
7983
- else if (isboxed && jl_is_immutable_datatype (jt)) {
7983
+ else if (isboxed && jl_may_be_immutable_datatype (jt) && ! jl_is_abstracttype (jt)) {
7984
7984
param.addAttribute (Attribute::ReadOnly);
7985
7985
}
7986
7986
else if (jl_is_primitivetype (jt) && ty->isIntegerTy ()) {
0 commit comments