Trust-tier steps 0-2 (plans/2026-11-15-trust-tiers.md). One LIR pass, cmd/compiler_lowered_proven.zi, finds each pointer's root (a global, or an allocate in the same function) and the fixed-array indices an interval analysis proves in range. x86-64 lowering reaches a rooted load, store or zero through PointerDirect (the root's raw start plus the token's offset) instead of PointerResolve. MachineVerify now checks every memory access: its address must be a resolve, fresh arena storage or a PointerDirect it re-derives to the same root. zx2wasm reads its index proofs from the same pass and drops its private copy (byte-identical modules on the bench kernels). A LIR zero is resolved like a store instead of writing through the raw token. tests/proven_pointer_cases.zi prints per-fixture counts from the machine pipeline and holds the hostile twins: a runtime index past a frame array, a resized heap block and a stale frame alias still trap, and the verifier refuses tampered direct proofs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
10 lines
469 B
Ziran
10 lines
469 B
Ziran
// The portable instruction engine every embedder links through libziran:
|
|
// the executable ZX container and reader, the lowered-IR verifier, the
|
|
// interpreter, the LIR optimizer a host that compiles source in place
|
|
// (the browser playground) needs, and the checked-access facts every backend
|
|
// shares. This module only names that set for the C generator.
|
|
#import "compiler_exec_link"
|
|
#import "compiler_exec"
|
|
#import "compiler_opt"
|
|
#import "compiler_lowered_proven"
|