parallel: the Plain marker (CONCURRENCY gap 4, part of slice F) #155
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Gap 4 of CONCURRENCY.md, the first part of slice F, split out of #4: the marker
Plain, a bound that says "nothing reference counted inside". It is what lets a worker hold a borrowed pointer into the caller's heap without a count change (CONCURRENCY.md section 6, rule R2).Source
Goal
A trait
Plaininstd/corethat the checker grants to exactly the types whose layout hascontainsCounted == false, usable as a bound (Item: Plain), and never implementable by a user.Acceptance criteria
Plainis declared instd/coreand is importable by name; the checker answersT: Plainfrom the layout, the way it answers a derivedShow(semantics/checker/derive.trb), with no entry in any witness table.Int,Float,Bool, the sized numbers,Array<Float, 16>, a record or variant whose fields are allPlain, a tuple of them.String,List<_>,Map<_, _>, a record with one of those inside, everyshared type, every trait-typed value, a function value.with Plainorextend ... with Plainis an error that says the compiler grants it.Item: Plainaccepts exactly the granted types at the call site, and inside the generic bodyItemis known to be uncounted (probe: a genericfn first<Item: Plain>(items: List<Item>): Itemchecks and runs forIntandPoint, is refused forString).trb errorblock indocs/for the refusal diagnostic;docs check docsgreen.Touches the seed?
Showinderive.trbandwellknown.trb), but additively. One commit, no seed refresh, providedcompiler/srcandstd/do not themselves usePlainas a bound in this commit (the seed compiler builds them and does not know the trait yet).std/parallelwill use it in the follow-up (#4), after a seed refresh that is the owner's call.Size
One PR, one Conventional Commit:
feat(checker): grant Plain for a layout without counted fields. Touchescompiler/src/semantics/checkerandstd/core; the layout predicate already exists on the IR side (containsCountedType), the checker needs the same fixpoint (as it already computescontainsShared). Implementer: opus/high (compiler/src). Worker: both gatesaandbif the layout walk is shared withcompiler/src/ir.Dependencies
None.
Part of #4.
Windowandwindows(CONCURRENCY slice F, gap 6) #4Windowandwindows(CONCURRENCY slice F, gap 6) #4Windowandwindows(CONCURRENCY slice F, gap 6) #4[loop:torbscript] claim implement by session:loop-torbscript-20261007 until 2026-10-07T22:22:45Z
[loop:torbscript] implement:
Plainis granted by the checker from the layout (numbers exceptDecimal,Bool,Char,Arrayof a plain item, and records, variants and tuples of plain fields). Refusals name the field chain and the counted type, and a writtenwith Plainis an error. Includes the trait instd/core, docs, 21 checker tests and a conformance program, in one commit with no seed refresh. Locally: nightly check clean, 2630 compiler tests pass (the 20 failures are the VM-onlytorb_machine_installtests), and the new checker in the VM passes the conformance file. There is no C toolchain here, so the A/B gates and the conformance run are left to CI, which is queued. PR #160, next: review. Token usage: not readable from this session.[loop:torbscript] claim review by session:loop-torbscript-20261007 until 2026-10-07T21:20:05Z
[loop:torbscript] review: tier A was red on
c9ed0a6. The fix worker was interrupted by a restart before writing its result, but it had already pushed557d7cetoloop/155-plain-marker: the same single commitfeat(checker): grant Plain for a layout without counted fields, rebased onto main9e2ab91. The old commit rewrote whole files such ascompiler/src/semantics/checker/context.trb; the new one is a clean 16-file change (+952/-13). Forge CI on557d7ceis running. Worker token usage is not measurable. Claim 604 released, next: waiting (CI on557d7ce, then the merge gate)Windowandwindows(CONCURRENCY slice F, gap 6) #4