Skip to content

Commit

Permalink
Merge pull request #18430 from JuliaLang/jn/18080
Browse files Browse the repository at this point in the history
fix compile=all
  • Loading branch information
vtjnash committed Sep 9, 2016
2 parents 9d65572 + a78ad7b commit 1e02f7e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,13 +1595,26 @@ static void _compile_all_deq(jl_array_t *found)
else
linfo = jl_specializations_get_linfo(m, ml->sig, jl_emptysvec, 1);

if (linfo->jlcall_api == 2)
if (linfo->jlcall_api == 2) {
if (linfo != templ) {
templ->jlcall_api = 2;
templ->constval = linfo->constval;
}
continue;
}

// infer this function now, if necessary
if (!linfo->inferred || linfo->code == jl_nothing)
jl_type_infer(linfo, 1);

if (linfo->jlcall_api == 2) {
if (linfo != templ) {
templ->jlcall_api = 2;
templ->constval = linfo->constval;
}
continue;
}

// keep track of whether all possible signatures have been cached (and thus whether it can skip trying to compile the template function)
// this is necessary because many intrinsics try to call static_eval and thus are not compilable unspecialized
int complete = _compile_all_union(ml->sig, ml->tvars);
Expand Down

0 comments on commit 1e02f7e

Please sign in to comment.