mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-28 09:21:55 +01:00
In a realm made without the ECMAScript 2015 built-ins and later switched to ECMAScript 2015 code, `for`-`of`, spread and array patterns walk a string by code point. The walk flattened a concatenated string before any limit was checked; it now flattens through the counted helper that `String.prototype[Symbol.iterator]` uses, so the run ends with the heap limit before the copy is made. The rope test also covers array patterns and `for`-`of`, in both kinds of realm. The crate docs now say that such a realm walks arrays and `arguments` objects by index and strings by code point.