mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 14:18:01 +08:00
The temps a regex replace or replaceAll consumed (the subject that a previous substitution in a chain produced, a computed replacement) were released at the end of the statement. A chain of substitutions over a large string therefore held every intermediate result until the last one returned. The operands now live in a frame of their own that is released right after the call, so a chain holds at most its current subject and result.