mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-11 02:03:59 +08:00
An integer clone reads a number array's element as an 8-byte double. A number array proven to hold only int32s keeps 4-byte int32 slots (SCR_ELEM_I32), so the clone read such an array at the wrong width: it returned wrong values, and near the array's end it read past the slots. The clone now tests the array's element kind: int32 slots load as 4-byte int32s, double slots load as doubles and keep the exact-int32 test, and any other storage bails to the ordinary body. New corpus program: integer-clone-int32-slots.ts.