From 06fd6b55a3100649e02e7c2a857576881ff97a1c Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 30 Jun 2024 18:17:27 -0500 Subject: [PATCH 1/2] Fix in-frame global naming Any method defined in-frame will be in the same module. We can check the type of the `global` arg to ensure it's a Symbol and not a GlobalRef. --- src/signatures.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/signatures.jl b/src/signatures.jl index 18e2890..3812876 100644 --- a/src/signatures.jl +++ b/src/signatures.jl @@ -146,10 +146,12 @@ function identify_framemethod_calls(frame) for (i, stmt) in enumerate(frame.framecode.src.code) isa(stmt, Expr) || continue if stmt.head === :global && length(stmt.args) == 1 - key = stmt.args[1]::Symbol - # We don't know for sure if this is a reference to a method, but let's - # tentatively cue it - push!(refs, key=>i) + key = stmt.args[1] + if isa(key, Symbol) + # We don't know for sure if this is a reference to a method, but let's + # tentatively cue it + push!(refs, key=>i) + end elseif stmt.head === :thunk && stmt.args[1] isa CodeInfo tsrc = stmt.args[1]::CodeInfo if length(tsrc.code) == 1 From 03784d2ea7a927d719e7c05e5352f440cf75947c Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Sun, 30 Jun 2024 18:17:53 -0500 Subject: [PATCH 2/2] Bump to 2.4.8 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 1273203..607d756 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LoweredCodeUtils" uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" authors = ["Tim Holy "] -version = "2.4.7" +version = "2.4.8" [deps] JuliaInterpreter = "aa1ae85d-cabe-5617-a682-6adf51b2e16a"