natives: audit and reduce the manifest of natives to a kernel #52
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
Every native of
std/is work for every back end. Reducecompiler/src/backend/c/natives.trbto integer and float arithmetic, comparisons, raw storage and bytes to numbers.Source
Acceptance criteria
Dependencies
None known.
Notes
Adds or changes a native, syntax or a name the compiler looks up: land it in two commits (teach both forms, refresh the seed, then migrate), as
CLAUDE.md"Seed and breaking changes" says.Moved from the planning lists of the docs; the design record stays the specification.
native fnbodies as IR andnative { }blocks #53[loop:torbscript] intake: in scope (author orion, label loop), source ROADMAP.md kernel of natives, not a duplicate. Large and seed-relevant (two-commit rule); the audit table is the first slice and a design record, the rewrites follow measured costs (decided with numbers, no owner question); refine splits it. next: refine, waiting (ready buffer full: #4, #163, #164, #223 are ready) until 2026-10-10T04:00:00Z
native fnbodies as IR andnative { }blocks #53[loop:torbscript] claim refine by session:loop-torbscript-20261023 until 2026-10-23T03:49:37Z
[loop:torbscript] decided by the loop: #52 is an epic and is split just in time. Step 1 is #407, the audit table as a design record (
docs/design/NATIVES.md), docs and a drift check only, no seed impact. Why first: the verdict per native is a pure reading of the manifest (about 318nativedeclarations instd/, 19NativeEntryrows grouped by target kind), and every later rewrite and #53/#55 depend on it. The rewrites follow as further steps once the table exists, each decided by a measurement in forge CI (not asked), each under the two-commit rule where it adds or changes a native; the seed refresh stays Torben's.[loop:torbscript] refine: epic; first step filed as #407 and marked
ready(not this issue). Remaining steps (to file when each starts): measure the cost of therewriterows, rewrite them in TorbScript in slices, align with #53 and #55. Tokens used by this refine run: about 60k.next: waiting (epic waits on its steps)
native fnandnative { }(step 1 of #53) #410native fnbodies as IR andnative { }blocks #53ArrayList, the hash tables and the tries onBuffer(step 1 of #55) #413