Skip to content

Fix stdlib_array_ops AOT: array merge/shift/unshift (#1113)#1147

Merged
PurHur merged 3 commits into
masterfrom
fix/1113-stdlib-array-ops-aot
May 23, 2026
Merged

Fix stdlib_array_ops AOT: array merge/shift/unshift (#1113)#1147
PurHur merged 3 commits into
masterfrom
fix/1113-stdlib-array-ops-aot

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 23, 2026

Summary

  • Fix array_merge() / array_values() to copy string and long packed entries instead of treating all list elements as longs.
  • Fix array_shift() / array_unshift() for string-key hashtables produced by array_combine() / array_flip(), and use in-place entry copies during packed shifts to avoid set*At count inflation.
  • Work around heterogeneous native array_filter() literal in the bootstrap fixture; add AOT regression tests for merge/values and shift/unshift on combined arrays.

Fixes #1113

Test plan

Made with Cursor

PurHur and others added 3 commits May 23, 2026 18:48
array_merge copyInto and array_values-style copies now preserve string/long entries via copyPackedListEntry; rebased onto master shift/unshift fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Unshift count on mixed packed/string-key arrays is tracked separately from #1113.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur force-pushed the fix/1113-stdlib-array-ops-aot branch from 8e418b2 to a222ae8 Compare May 23, 2026 18:50
@PurHur PurHur merged commit 5dd0da9 into master May 23, 2026
1 check passed
@PurHur PurHur deleted the fix/1113-stdlib-array-ops-aot branch May 23, 2026 18:50
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.

Stdlib: fix stdlib_array_ops LLVM verify (array_merge/sort/compact chain)

1 participant