mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-03 07:54:40 +08:00
The emitted JSON writers read each array element through scr_arr_state and scr_arr_get_ref, retaining and releasing it, and appended every bracket, comma and key through a runtime call. Arrays whose indices below the length all hold values now serialize from their slots (scr_arr_dense_slots) with borrowed elements; other arrays keep the element walk. Fixed text is stored inline when it fits the buffer's spare capacity, booleans write their literal inline, and numbers are formatted directly into the buffer.