Files
scriptc/packages
Malte Ubl 67f9de094c Convert lengths and in-range indices to doubles as non-negative
Array, string and byte lengths, counts, capacities and range-checked indices are size_t values below 2^63, but they were converted with a plain uitofp. On x86-64 without AVX-512 an unsigned 64-bit conversion expands to a five-instruction sequence with two constant-pool loads (unpcklps/subpd/unpckhpd/addsd), and it showed up in the hottest tsc-ts checker loops (compareTypeLists, getPropertyOfTypeEx) between a length load and the conversion back to an integer. `uitofp nneg` states what is already true, so the backend emits one cvtsi2sd. arm64 converts unsigned values in one instruction either way. Byte-number indices, which admit values up to 2^64, keep the unsigned conversion.
2026-10-10 14:47:55 -07:00
..
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00
2026-10-10 10:08:39 -05:00