Parent: #473 Related: #666, #676
Problem
The global parseFloat and parseInt builtins call toStringV and then scan the returned bytes as canonical WTF-8. With physical flat Latin-1 storage active, a non-ASCII ECMAScript whitespace code unit such as U+00A0 is exposed as one physical byte instead of its canonical encoding. skipStrWhiteSpace therefore stops before the numeric prefix and returns NaN instead of the required number.
Scope
- Route
parseFloatandparseIntinput coercion through the representation-aware WTF-8 helper before whitespace and numeric scanning. - Preserve exactly one ToString coercion, abrupt completion, radix coercion order, sign and Infinity handling, longest-prefix scanning, numeric rounding, ASCII borrowing, OOM propagation, and all existing accepted/rejected grammar.
- Cover primitive and object-returned non-ASCII whitespace under canonical and physical flat-Latin-1 storage.
No-workaround rules
- No flat-storage disablement, eager global canonicalization, replacement characters, duplicate coercion, alternate host parser, hidden retry, or Test262 exclusion.
- No stack, queue, job, Promise, Worker, or Map/Set iterator changes.
Acceptance
- Both numeric scanners consume canonical semantic WTF-8.
- U+00A0 and other supported ECMAScript whitespace retain exact parsing behavior.
- Custom ToString runs exactly once and before radix coercion where required.
- The witness passes with canonical storage and with
flat_storage_activeenabled, then the switch is restored and not landed. - Nonzero parseFloat/parseInt Test262 accounting, focused Debug/ReleaseSafe/TSan, and full units pass with exact flips reported.