Repository navigation
Migrator contracts, step 3 (D159, #2615): STC re-promoted, the facades call the engine's methods - #2624
Merged
Conversation
added 4 commits
October 25, 2026 02:34
…ator's functions are named after it A first parameter the body indexes or steps (`p[k]`, `p + k`), itself or through a corpus callee (the sort wrapper hands its array to the indexer), is an array of records: `unproved: indexed as an array`, never `self` (a safe method on one element writing n of them would be unsafety). A function on an `_iter` record that carries the collection's prefix (`stc_word_stack_next` on `stc_word_stack_iter`) is `next`. Both are basic-test rows.
…all the engine's methods The corpus and its test programs are today's migrator output: a mutating receiver is a `pub mut fn` of its shape. The collections call them as methods, no unsafe: `self.words.push(w)`, `self.slots.pop()`, `cursor.next()`; 47 engine-call unsafe blocks gone across the facades (370 to 323). What stays unsafe is the read-only surface (size, top, at, front, drop), which the ruling left out, and the slot pushes, which store a pointer the engine never frees (stored-unknown).
The first rewrite matched only `stc_word_`/`stc_slot_` calls wrapped in an `unsafe { }` on their line; `cbits_*` (STC's bit set) and a bare `stc_word_list_next` inside an `unsafe:` block were missed, and a generic body's stale call surfaces only at instantiation (the behavior tests, not the build). Facade unsafe: 370 to 318.
Contributor
Author
|
Battery green on bc6374a, seed-driven under nightly-20261025-local-1-c88f3eeff0bc (tools/battery.w: gate, uat, battery-checks); corpus-migrator-gate green on every corpus's fresh migration. |
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.
D159 step 3 (#2615): the STC corpus re-promoted under
migrator-pin:#2615; the facades call the engine's methods.refs[i],p + k), itself or through a corpus callee, is an array of records and no receiver (std.algorithmssorts n records throughstc_slotrefs_sort(refs, n); a method on one would write past it); an iterator record's functions are named after it (stc_word_stack_nextonstc_word_stack_iterisnext). Both are basic-test rows.self.words.push(w),self.slots.pop(),cursor.next()— and 47 engine-callunsafeblocks are gone (370 → 323 across lib/std/collections). What stays unsafe is what the ruling left out: the read-only surface (a&selfbrief is the follow-up) and the slot pushes (stored-unknown).Battery: seed-driven, posted below when green.