mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
A loop of two to eight iterations with a constant count, whose body is an inner loop that exits once an accumulator reaches the value its ORs saturate at (mandelbrot's pixel pairs: `b |= 2`, `b |= 1`, `if (b === 3) break`), now runs its iterations in one inner loop: every iteration's declarations, then one loop running each iteration's body in turn that exits once every accumulator is full, then every iteration's trailing assignments in order. Once an accumulator is full its ORs leave it full, so an iteration that runs past its own exit leaves its accumulator as its own loop did, and every other value it computes is dead. The bodies only compute numbers, read typed-array elements that answer NaN out of range and write their own locals; the declarations and the inner loop read nothing the trailing assignments write. The independent iterations then overlap their dependence chains.