Skip to content

Commit

Permalink
print more information for debugging method invalidations
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Feb 7, 2019
1 parent c6c3d72 commit 8dee5bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,10 @@ static int invalidate_backedges(jl_typemap_entry_t *oldentry, struct typemap_int
jl_datatype_t *gf = jl_first_argument_datatype((jl_value_t*)m->sig);
assert(jl_is_datatype(gf) && gf->name->mt && "method signature invalid?");
jl_typemap_visitor(gf->name->mt->cache, set_max_world2, (void*)&def);
if (JL_DEBUG_METHOD_INVALIDATION) {
jl_static_show(JL_STDOUT, (jl_value_t*)def.replaced);
jl_uv_puts(JL_STDOUT, "\n", 1);
}
}

// invalidate backedges
Expand All @@ -1466,7 +1470,7 @@ static int invalidate_backedges(jl_typemap_entry_t *oldentry, struct typemap_int
size_t i, l = jl_array_len(backedges);
jl_method_instance_t **replaced = (jl_method_instance_t**)jl_array_ptr_data(backedges);
for (i = 0; i < l; i++) {
invalidate_method_instance(replaced[i], closure->max_world, 0);
invalidate_method_instance(replaced[i], closure->max_world, 1);
}
}
closure->invalidated = 1;
Expand Down

0 comments on commit 8dee5bf

Please sign in to comment.