EIR VM: assert-eq uses structural equality, not handle identity#84
Conversation
[assert-eq {:a 1} {:a 1}] failed on the EIR VM because Built::AssertEq
compared raw Val handles; two separately-allocated but structurally
equal heap values (maps, vecs, non-interned strings) never matched.
Route it through the same val_eq that = already uses, and add a
backend-parity regression test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Choji review — Looks good Correct one-line fix: routing No findings — looks good. Verified by ChojiChoji ran your change live — checks passed. 1 check.
The ticket asked for No issues found in the running app. Reviewed |
What
Built::AssertEqin the EIR VM compared rawValhandles, so[assert-eq {:a 1} {:a 1}]failed on two separately-allocated but structurally equal values (maps, vecs, non-interned strings). It now routes through the sameval_eqthe=builtin already uses.Why
Found while writing law-checking tests for a monoid-action sketch:
assert-eqon two identical map literals reported{:log "a" :val "b"} != {:log "a" :val "b"}. Any loon test asserting on collections was silently un-passable on the EIR VM.Notes for review
vm.rsplus a backend-parity regression test (assert-eq-structural, order-independent map keys).cargo test --workspaceis green.()on map destructures) was spun off into its own task.🤖 Generated with Claude Code