fix(compiler): == / != on references is identity; only text compares by content
emit_bin_vals lowered every pointer-typed ==/!= to @lp_str_eq, so two distinct records compared their bytes up to the first zero byte. Content compare now needs both sides to be text (string, or the untyped pointer/ptr runtime code carries text in); other references use icmp eq ptr, and string vs a non-text reference is a compile error. Adds selfhost/tests/identity.ludic; both seeds regenerated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e010c2cecc
commit
1900f9ca80
7 changed files with 19750 additions and 19403 deletions
|
|
@ -82,6 +82,7 @@ function cmd_selfhost_test() -> int {
|
|||
|
||||
print("== the self-host compiler is correct ==")
|
||||
sh_case("structs", "7 9 109 2 42")
|
||||
sh_case("identity", "0 1 1 1 1 1")
|
||||
sh_case("slices", "0 20 361 777")
|
||||
sh_case("sort", "0 39 20 1 2 3 3 1 30 10 20 40 2 8")
|
||||
sh_case("control", "55 4 15 1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue