Skip to content

fix: propagate mutable list replacements - #340

Merged
akonwi merged 1 commit into
mainfrom
fix/339-native-mutable-list-references
Jul 24, 2026
Merged

fix: propagate mutable list replacements#340
akonwi merged 1 commit into
mainfrom
fix/339-native-mutable-list-references

Conversation

@akonwi

@akonwi akonwi commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Context

What's changed

  • Lower native mutable-list references as pointers to slice descriptors.
  • Preserve the reference through forwarding, aliases, closures, function values, and generic functions.
  • Keep foreign Go ABI list parameters value-shaped as []T.
  • Reject descriptor-rebinding operations on foreign slice references while allowing independently owned value copies to grow.
  • Preserve foreign-ABI provenance through checker specialization and AIR lowering.
  • Amend ADR 0040 and ADR 0045 to document the native/foreign representation boundary.

Validation

  • cd compiler && go test ./... -count=1
  • gopls check on all changed Go files; only pre-existing redundant-break hints remain.
  • git diff --check
  • Downstream checks/builds and 158 tests passed across Tinear, Migrate, SQL, Maestro, and Dram.
  • Focused code review completed with no remaining material findings.

Lower native mutable list references as pointers to their slice descriptors so growth and whole-list replacement remain visible to callers. Preserve exact Go slice ABIs at foreign boundaries and reject descriptor-rebinding operations there.

Fixes #339
@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ard-lang-dev Ready Ready Preview, Comment Jul 24, 2026 10:23pm

@akonwi
akonwi merged commit 199e35d into main Jul 24, 2026
6 checks passed
@akonwi
akonwi deleted the fix/339-native-mutable-list-references branch July 24, 2026 22:27
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.

Silent data loss: list.push/prepend through a mut [T] parameter never reaches the caller (no diagnostic)

1 participant