You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
analyze src/main.w audit:all: one MIR type, two LLVM struct names (LspDocument's HashMap[str, Vec[str]], 5 violations) #1984
Found while working #1647 (D65). with analyze src/main.w audit:all on main 9307016 (stage1 built at that commit) reports 5 codegen place-type violations, all in LspDocument (src/Lsp.w): a field of MIR type HashMap[str, Vec[str]] projects to one LLVM struct while the MIR type itself lowers to another, differently named one:
violation: place 29 in LspDocument.new: projection lowers to LLVM type %"HashMap__str__struct{ptr,i64,i64,i64}" = type { ptr } but its MIR type 945 (HashMap[str, Vec[str]]) lowers to %__with.HashMap.str.__with.Vec.str = type { ptr }; base _16: LspDocument (ty 946) proj[0]=kind0:24065 got-int-width=-1 want-int-width=-1
violation: place 93 in LspDocument.ensure_analyzed: projection lowers to LLVM type %"HashMap__str__struct{ptr,i64,i64,i64}" = type { ptr } but its MIR type 945 (HashMap[str, Vec[str]]) lowers to %__with.HashMap.str.__with.Vec.str = type { ptr }; base _1: LspDocument (ty 946) proj[0]=kind0:24065 got-int-width=-1 want-int-width=-1
violation: place 136 in LspDocument.ensure_analyzed: projection lowers to LLVM type %"HashMap__str__struct{ptr,i64,i64,i64}" = type { ptr } but its MIR type 945 (HashMap[str, Vec[str]]) lowers to %__with.HashMap.str.__with.Vec.str = type { ptr }; base _1: LspDocument (ty 946) proj[0]=kind0:24065 got-int-width=-1 want-int-width=-1
violation: place 264 in LspDocument.ensure_analyzed: projection lowers to LLVM type %"HashMap__str__struct{ptr,i64,i64,i64}" = type { ptr } but its MIR type 945 (HashMap[str, Vec[str]]) lowers to %__with.HashMap.str.__with.Vec.str = type { ptr }; base _1: LspDocument (ty 946) proj[0]=kind0:24065 got-int-width=-1 want-int-width=-1
violation: place 11 in LspDocument.trait_methods_for_type: projection lowers to LLVM type %"HashMap__str__struct{ptr,i64,i64,i64}" = type { ptr } but its MIR type 945 (HashMap[str, Vec[str]]) lowers to %__with.HashMap.str.__with.Vec.str = type { ptr }; base _1: &LspDocument (ty 11665) proj[0]=kind2:0 proj[1]=kind0:24065 got-int-width=-1 want-int-width=-1
One Sema type has two LLVM identities: HashMap__str__struct{ptr,i64,i64,i64} (named from the LLVM layout of Vec[str]) and __with.HashMap.str.__with.Vec.str (named from the Sema type). The struct body is { ptr } either way, so the program runs, but per D65 the generic instance's LLVM name must be derived once from the Sema type, never from an LLVM layout. #1647's acceptance (audit:all green over src/main.w) needs this fixed.
Repro: out/bootstrap/bin/with-stage1 analyze src/main.w audit:all on a 9307016 worktree; the 8 other violations of the 13 are #1983.
Activity
D65: methods and trait impls of same-named types are their declaratio…
ehartford commentedon Oct 3, 2026
Fixed on main by 0f0d76b (#2012, battery green on 6644771). audit:all over src/main.w: 13 violations → 0.
Every struct field path takes its LLVM type from Sema's field type (#…
Every struct field path takes its LLVM type from Sema's field type (#…
#1647 phases 2–4 completion: owner facts in codegen, per-instance Sem…