Parent: #498 Related: #1045, #493, #473
Problem
VM set_index specializes existing dense Array elements, but primitive Number keys on TypedArrays always stringify through ToPropertyKey and re-enter generic Integer-Indexed Exotic [[Set]]. Unlike object/string/Symbol keys, a Number key has no user-visible key coercion. The existing TypedArray store routine already owns the difficult semantic requirement: coerce the RHS first, then revalidate the buffer and index because coercion may resize or detach the backing buffer.
A pre-fix VM witness matches Node across valid, numeric -0, invalid/fractional/NaN/infinite/large indices, object and string keys, Number/BigInt coercion, and shrink/grow/detach during valueOf; the test-only typed-store fast-hit count remains zero.
Scope
- Add a VM
set_indexfast path for primitive Number keys on direct TypedArray receivers. - Reuse the canonical Number/BigInt coercion and post-coercion buffer/index revalidation path.
- Preserve numeric
-0→ index zero, invalid-index RHS coercion, resizable/detached/immutable behavior, and restriction checks. - Keep object, Symbol, and string key coercion on the generic
ToPropertyKey+[[Set]]path. - Update the source-derived quickening inventory and generated architecture page.
Acceptance
- The pre-fix witness changes from zero to a positive typed-store fast-hit count with identical Node results.
- Number and BigInt values, invalid indices, dynamic shrink/grow/detach, object keys, and string
"-0"are pinned. - Focused normal and unsuppressed TSan tests pass.
- Quickening inventory, benchmark-validator, docs-manifest, and offline-link gates pass.
- No duplicated coercion semantics, benchmark recognizer, or unsynchronized backing-store access.