mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
- A speculated write may call a function whose body is one return of arithmetic, Math.floor and Math.pow over its number parameters. The fast copy evaluates the expanded body; the double copy still calls the function. Union tests on the parameters (`number | undefined`) fold against the wrapped argument. - `Math.pow(2, n)` and `Math.floor(a / 2^n)` run as checked i64 shifts: with n an integer in [0, 52], both equal the double results for every safe integer a. - Element reads of integer typed arrays are speculative leaves, read before any check, as string and array reads are. - A write's other calls of program functions are hoisted: the fast copy evaluates each once into a local of its own, and a failed check resumes at a copy of the write that re-runs only the arithmetic over those locals. This applies only when no call can write a local the write reads. - k-nucleotide's key chain (`key = bitwiseTrimLeft(key, m) * 4 + seq[i]`) now runs in i64.