Skip to content

Commit 5ec0608

Browse files
authored
Export jl_debug_method_invalidation. (#35729)
* Export jl_debug_method_invalidation. * Don't write trailing null to stdout.
2 parents 9d175a0 + ffde1b2 commit 5ec0608

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ static void jl_insert_methods(jl_array_t *list)
22852285
}
22862286
}
22872287

2288-
extern int JL_DEBUG_METHOD_INVALIDATION;
2288+
extern int jl_debug_method_invalidation;
22892289

22902290
// verify that these edges intersect with the same methods as before
22912291
static void jl_verify_edges(jl_array_t *targets, jl_array_t **pvalids)
@@ -2377,7 +2377,7 @@ static void jl_insert_backedges(jl_array_t *list, jl_array_t *targets)
23772377
}
23782378
}
23792379
else {
2380-
if (JL_DEBUG_METHOD_INVALIDATION) {
2380+
if (jl_debug_method_invalidation) {
23812381
jl_static_show(JL_STDOUT, (jl_value_t*)caller);
23822382
jl_uv_puts(JL_STDOUT, "<<<\n", 4);
23832383
}

src/gf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,12 +1489,12 @@ static void update_max_args(jl_methtable_t *mt, jl_value_t *type)
14891489
mt->max_args = na;
14901490
}
14911491

1492-
int JL_DEBUG_METHOD_INVALIDATION = 0;
1492+
JL_DLLEXPORT int jl_debug_method_invalidation = 0;
14931493

14941494
// recursively invalidate cached methods that had an edge to a replaced method
14951495
static void invalidate_method_instance(jl_method_instance_t *replaced, size_t max_world, int depth)
14961496
{
1497-
if (JL_DEBUG_METHOD_INVALIDATION) {
1497+
if (jl_debug_method_invalidation) {
14981498
int d0 = depth;
14991499
while (d0-- > 0)
15001500
jl_uv_puts(JL_STDOUT, " ", 1);
@@ -1626,8 +1626,8 @@ static int invalidate_mt_cache(jl_typemap_entry_t *oldentry, void *closure0)
16261626
}
16271627
}
16281628
if (intersects) {
1629-
if (JL_DEBUG_METHOD_INVALIDATION) {
1630-
jl_uv_puts(JL_STDOUT, "-- ", 4);
1629+
if (jl_debug_method_invalidation) {
1630+
jl_uv_puts(JL_STDOUT, "-- ", 3);
16311631
jl_static_show(JL_STDOUT, (jl_value_t*)mi);
16321632
jl_uv_puts(JL_STDOUT, "\n", 1);
16331633
}
@@ -1776,7 +1776,7 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method
17761776
}
17771777
}
17781778
}
1779-
if (invalidated && JL_DEBUG_METHOD_INVALIDATION) {
1779+
if (invalidated && jl_debug_method_invalidation) {
17801780
jl_uv_puts(JL_STDOUT, ">> ", 3);
17811781
jl_static_show(JL_STDOUT, (jl_value_t*)method);
17821782
jl_uv_puts(JL_STDOUT, " ", 1);

0 commit comments

Comments
 (0)