mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
JSON.parse appends each property and element, so object and array storage grows by doubling and keeps up to half of its capacity unused, and a parsed tree is usually kept as it is. When an object or array closes, its storage now moves to a block of exactly its length (shrinking in place would keep the block's size class). A table recycled from the free list may hold keys past its length; they are released first. Properties and elements added later grow the storage again as before.