Repository navigation
Adapt to JuliaLowering's IR - #174
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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
topolarity
left a comment
There was a problem hiding this comment.
LGTM
One contrived case to worry about - Apologies for the late review
| 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 |
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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
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