mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
A typed array read or write at `base + c`, `c + base` or `base - c`, where `base` is a number local and `c` an integer literal of magnitude below 2^31, now converts `base` to an integer and adds `c` as an integer, instead of converting the double sum. Accesses at several offsets from one base, such as `x[at]` through `x[at + 7]` with a number parameter `at`, then share one conversion and integer test. Below a length of at most 2^52 the sum is an integer index exactly when `base` is an integer, so the accesses read and write the same elements as before.