~ninjin/julia-nix

60423e22a57f6f72e1b475c14456e7aafe39e2cc — Jeff Bezanson 2 years ago 8db1d89
precompile methods marked ccallable (#42153)

1 files changed, 2 insertions(+), 2 deletions(-)

M src/precompile.c
M src/precompile.c => src/precompile.c +2 -2
@@ 344,8 344,8 @@ static int precompile_enq_specialization_(jl_method_instance_t *mi, void *closur
static int precompile_enq_all_specializations__(jl_typemap_entry_t *def, void *closure)
{
    jl_method_t *m = def->func.method;
    if (m->name == jl_symbol("__init__") && jl_is_dispatch_tupletype(m->sig)) {
        // ensure `__init__()` gets strongly-hinted, specialized, and compiled
    if ((m->name == jl_symbol("__init__") || m->ccallable) && jl_is_dispatch_tupletype(m->sig)) {
        // ensure `__init__()` and @ccallables get strongly-hinted, specialized, and compiled
        jl_method_instance_t *mi = jl_specializations_get_linfo(m, m->sig, jl_emptysvec);
        jl_array_ptr_1d_push((jl_array_t*)closure, (jl_value_t*)mi);
    }