mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
A record view's slot lookup answers NULL for a field a partial view lacks (record-views.ts), but only a program that asserts a record literal to a wider type ever asks for such a slot. Testing for the sentinel inside the default scr_record_view_slot put a branch on a hot accessor of every program that links a view: the zero-cost gate found fifteen typed programs whose executables changed with byte-identical IR and LLVM. Build the unit twice instead, as the fs.watchFile work does for its unit. The default object is again byte-for-byte the one it was, and the SCR_RECORD_VIEW_PARTIAL build — the one whose slot answers NULL — is selected by the program's link features. `recordViewPartial` joins the runtime features, set by a `partialView` dynCheck and carried through the link features, the executable options and the early (cache-key) features, so a cached executable can never link the other build. The runtime pack gains the eight builds that pair the flag with the unit's existing dynTier, webStreams and nodeIsland combinations; every program without a partial assertion keeps the default object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>