mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-29 07:04:09 +08:00
A whole-value read of a nullable-pointer field allocated a heap box per read, so list walks (`p = p.next`) regressed: 0.07 s -> 0.35 s on a 100k list walked 200 times. Such reads now retain the instance pointer into the current frame and wrap it in a private stack box with that independent owner: - local union storage accepts nullable field reads and copies of another binding of the same union as sources (the payload is retained; scalar and unit arms own nothing; retains branch on the tag because not every retain entry point is NULL-tolerant); - arguments to projection-only parameters of calls and constructors. The list walk now takes 0.05 s (baseline 0.07 s). Corpus 4061 adds a copy that outlives a store to the field and copies across string, number, -0 and undefined arms.