mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-25 06:24:27 +08:00
`a.push(v)` where v may hold undefined at run time (an unchecked array read or a hole-observing for-of binding, as in tsc-ts's filterType loop) built a temporary one-element array, stored v or present undefined into it, and spread it onto the receiver: an allocation, a growth, a copy and two releases per append. Such pushes now evaluate every argument first, then append each present value through the ordinary push (and its inline dense fast path) and each missing one as a present-undefined slot at the current length, which is what Node stores. Pure receivers and arguments are re-read instead of copied into owned temporaries. Call arguments read from arrays of nullable references now take the inline dense lookup like other projections (the value is the element pointer itself, so the path is a few loads), and scr_arr_peek_ref answers dense in-range indices before the general lookup. compareSymbols' `declarations[0]!` arguments no longer leave compiled code.