Repository navigation
t27b: ir_types law + the diff-cache glue lands (ladder steps 5 + the queued debt) - #13148
Merged
Merged
Conversation
…#13132) The IR type table moves into specs/tri/t27b/ir_types.t27 (module T27bIrTypes, 8 tests / 490 runtime asserts, 0 vacuous, seal t27b_T27bIrTypes): kind codes bool=0, u8=1, u16=2, u32=3, u64=4, i8=5, i16=6, i32=7, i64=8, ptr=9, f32=10, f64=11, i128=12, odd unsigned 100+n, odd signed 200+n; ty_bits / ty_signed / ty_is64 / ty_is_float / ty_is_int / ty_is_odd / ty_name, every arm of the old Rust tables mirrored and tested (all odd widths 1..=31 except 8/16, Ptr = 64 bits, bool = 8). cli/t27b/src/ir.rs keeps one law() kind mapping and one-line calls: numstat ir.rs 21 added / 76 deleted, the wholesale-table shape that pays the glue. The queued diff-cache glue lands paid: cli/t27b/tests/differential.rs +38 (suite key from harness text + test binary + knobs + host, row under ~/.cache/t27/diff-cache, T27B_DIFF_NOCACHE / T27B_DIFF_ONE bypass), cli/t27b/src/lib.rs +10 (diff_cache and ir_types mounts). Verified live: a cold run writes the row, the second run prints "diff-cache HIT (T27B_DIFF_NOCACHE=1 forces a rerun)" (15.1s cold -> 0.04s warm), and a codegen.rs change invalidates the key (full rerun, a new row). Whole-branch foreign numstat vs origin/master: added 69 <= 80, added <= deleted (69/76), per file 38 / 21 / 10 <= 40. T27B_DIFF_NOCACHE=1 cargo test -p t27b: 178 passed; 0 failed. tools/deletion_credits.txt: TRAP_PLAN_STUBS corrected 12/6 -> 35/27 (rehearsed 2026-11-03 in this worktree, lane F lands it); the IR_TYPES measurement (21/76) is recorded as landed, with no queue entry, because the queue only holds unlanded work. phi^2 + 1/phi^2 = 3 | TRINITY
Contributor
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.
Closes #13132 (ladder step 5, the Ty table).
What lands
ir_types.t27, the IR type table law (ladder step 5 over cli/t27b/src/ir.rs). specs/tri/t27b/ir_types.t27 (module T27bIrTypes, seal t27b_T27bIrTypes) owns the kind encoding - bool=0, u8=1, u16=2, u32=3, u64=4, i8=5, i16=6, i32=7, i64=8, ptr=9, f32=10, f64=11, i128=12, odd unsigned 100+n, odd signed 200+n - and the table: ty_bits, ty_signed, ty_is64, ty_is_float, ty_is_int, ty_is_odd, ty_name. Every arm of the old Rust tables is mirrored and tested: 8 tests, 490 runtime asserts, 0 vacuous, all 27 odd widths 1..=31 except 8/16, Ptr = 64 bits, bool = 8 (a 0/1 byte). ir.rs keeps ONE law() kind mapping (15 packed arms) and one-line method calls; the UN_NAMES/IN_NAMES tables and every duplicated doc are gone - the spec header is the home.
The queued diff-cache glue, now paid. cli/t27b/tests/differential.rs +38 (the suite key: harness text + test binary + knobs + host, rows under ~/.cache/t27/diff-cache, T27B_DIFF_NOCACHE / T27B_DIFF_ONE bypass) and cli/t27b/src/lib.rs +10 (diff_cache + ir_types mounts). Verified live in this worktree: a cold run writes the row; the second run prints "diff-cache HIT (T27B_DIFF_NOCACHE=1 forces a rerun)" (15.1 s cold -> 0.04 s warm); a codegen.rs change invalidates the key (full rerun, new row).
Measured numbers
Budget: added 69 <= 80, added <= deleted (the shrink rule), per file 38 / 21 / 10 <= 40. The gate (
git diff --numstat origin/master...HEADthrough check_budget) exits 0; lefthook pre-commit ran it on the staged diff.Tests:
T27B_DIFF_NOCACHE=1 cargo test -p t27b= 178 passed; 0 failed (no tests_hir_roundtrip reds this run). Spec:t27c test-report specs/tri/t27b/ir_types.t27100 percent,t27c fmtclean, seal saved.Honest queue state
phi^2 + 1/phi^2 = 3 | TRINITY