From 756775bbc36e289e041815fed6433596e7f680bf Mon Sep 17 00:00:00 2001 From: d-netto Date: Thu, 21 Mar 2024 18:44:47 -0300 Subject: [PATCH] fix stacktrace & misc tests --- src/ast.c | 2 +- src/datatype.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ast.c b/src/ast.c index a8f7df243374aa..bf4c688ec6ae2d 100644 --- a/src/ast.c +++ b/src/ast.c @@ -250,7 +250,7 @@ static value_t fl_current_module_counter(fl_context_t *fl_ctx, value_t *args, ui // to avoid the counter being 0 or 1, which are reserved ptrhash_put(mod_table, funcname, (void*)(uintptr_t)((nxt + 1) << 2 | 3)); uv_mutex_unlock(&counter_table_lock); - snprintf(buf, sizeof(buf), "%s%d", funcname, nxt); + snprintf(buf, sizeof(buf), "<%s>%d", funcname, nxt); } else { snprintf(buf, sizeof(buf), "%d", jl_module_next_counter(ctx->module)); diff --git a/src/datatype.c b/src/datatype.c index 52b8b7f084687f..9242f90dcfd535 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -36,8 +36,9 @@ static jl_sym_t *jl_demangle_typename(jl_sym_t *s) JL_NOTSAFEPOINT len = strlen(n) - 1; else len = (end-n) - 1; // extract `f` from `#f#...` - if (is10digit(n[1]) || is_anonfn_typename(n)) + if (is10digit(n[1]) || n[1] == '<') { return _jl_symbol(n, len+1); + } return _jl_symbol(&n[1], len); }