Repository navigation
D110: builtin parameter modes come from signatures, once - #2274
Merged
Merged
Conversation
added 5 commits
October 8, 2026 08:53
The tree hand-rolled sorting at least seven times (O(n^2), allocating per insert) because Vec had no sort. Heapsort in place; elements move by swap, never by copy (2.3).
The hole's sub-parser saw `it` and dropped the fact; map(f"{it}") failed
with an undefined __it.
A Vec[i32] was accepted and read each pair of ints as a str's {ptr, len}:
it printed nothing, or crashed in memcpy.
Contributor
Author
|
Battery GREEN on the stack top 42c8b5a (seed-driven, |
ehartford
marked this pull request as ready for review
October 8, 2026 23:37
ehartford
pushed a commit
that referenced
this pull request
Oct 9, 2026
Sorting comes from the migrated corpora (docs/proposals/ stdlib_sourcing_plan.md, D37): STC's algorithm layer, migrated whole and exposed through the std.algorithms facade in Phase 3, which closes #940. libstd-spec §1.2: "Nothing native is written for this section." The heapsort added in #2274 was the native rewrite the ruling rejects, under public names no spec text defines (and unstable, which Python's and Rust's `sort` are not). Nothing outside its own test called it.
ehartford
added a commit
that referenced
this pull request
Oct 9, 2026
Sorting comes from the migrated corpora (docs/proposals/ stdlib_sourcing_plan.md, D37): STC's algorithm layer, migrated whole and exposed through the std.algorithms facade in Phase 3, which closes #940. libstd-spec §1.2: "Nothing native is written for this section." The heapsort added in #2274 was the native rewrite the ruling rejects, under public names no spec text defines (and unstable, which Python's and Rust's `sort` are not). Nothing outside its own test called it. Co-authored-by: Eric Hartford <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D110: builtin parameter modes come from signatures, once.
src/BuiltinSigs.wdeclares each builtin's signature with its parameter modes. Sema loads the table once, resolves the row when it checks the call and stores it on the call node; MIR and codegen read that row. No lookup on the hot path.method_arg_consumes_key(SemaCheck), theMAP_GET or MAP_CONTAINS or MAP_REMOVEobserver test (MirLower), the per-intrinsic key-drop decisions (CodegenDispatch). A builtin has no second ownership system.incrementleaked its key;join/expectblanked their argument;Vec.joinover non-str elements read garbage (now refused). AddedVec.sort/Vec.swap(heapsort, elements move by swap) anditin f-string holes (§9.3.1).behav_2265_*_key_stays_live).