Skip to content

Adapt to JuliaLowering's IR - #174

Merged
mlechu merged 2 commits into
JuliaDebug:masterfrom
mlechu:julialowering
Oct 29, 2026
Merged

mlechu merged 2 commits into
JuliaDebug:masterfrom
mlechu:julialowering

Conversation

@mlechu

@mlechu mlechu commented Oct 24, 2026

Copy link
Copy Markdown
Member

LLM-assisted tweaks to make pattern-matching work as intended with the IR
JuliaLowering produces.

Tests will still need tweaking under JL, but should pass with this PR under
flisp lowering. JuliaInterpreter (JuliaDebug/JuliaInterpreter.jl#788) will also need a bump.

Assisted-by: Claude Opus 5.5

@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.66%. Comparing base (04a0231) to head (e1119b1).
⚠️ Report is 66 commits behind head on master.

Files with missing lines Patch % Lines
src/signatures.jl 60.00% 4 Missing ⚠️
src/codeedges.jl 50.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #174       +/-   ##
===========================================
+ Coverage   76.95%   89.66%   +12.71%     
===========================================
  Files           6        5        -1     
  Lines        1523     1548       +25     
===========================================
+ Hits         1172     1388      +216     
+ Misses        351      160      -191     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

LLM-assisted tweaks to make pattern-matching work as intended with the IR
     JuliaLowering produces.

Tests will still need tweaking under JL, but should pass with this PR under
    flisp lowering.  JuliaInterpreter will also need a bump.

Assisted-by: Claude Opus 5.5
@mlechu
mlechu merged commit 6f5c109 into JuliaDebug:master Oct 29, 2026
11 of 12 checks passed

@topolarity topolarity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

One contrived case to worry about - Apologies for the late review

Comment thread src/signatures.jl
if isa(newex, Expr)
if newex.head === :new && length(newex.args) >= 2 && is_global_ref(newex.args[1], Core, :GeneratedFunctionStub)
mkey = newex.args[2]
if newex.head === :new && length(newex.args) >= 3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the consequences are too bad here, but boy does it feel icky to match any :new in :meta :generated and assume it's a @generated stub. Can't wait for the re-work.

Comment thread src/codeedges.jl
rhs = stmt
target = P(SSAValue(i), cl.ssapreds[i])
elseif isexpr(stmt, :call) && isanonymous_typedef(stmt)
push!(get!(Vector{Int}, cl.nameassigns, GlobalRef(stmt.args[2]::Module, (stmt.args[3]::QuoteNode).value::Symbol)), i)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit adversarial example-wise, but these accesses are stricter than what isanonymous_typedef checks:

using LoweredCodeUtils
eval_closure_type(x) = x
macro m() :($eval_closure_type(1)) end
CodeEdges(Main, Meta.lower(Main, :(@m)).args[1]) # TypeError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants