Parent: #498 Related: #493, #473
Problem
VM get_index specializes present dense Array elements, but computed numeric reads from TypedArrays always call nativeGetIndex, allocate/coerce a property-key string, and re-enter generic [[Get]]. Primitive Number indices have no user-visible coercion, and Integer-Indexed Exotic [[Get]] can resolve an in-bounds element or an out-of-bounds undefined directly.
A pre-fix VM witness covering 0, numeric -0, out-of-bounds, negative/fractional, string "-0", and BigInt elements matches Node, while the new test counter records zero typed-index fast hits. The generic path is therefore semantically correct but misses this general opcode specialization.
Scope
- Add a VM
get_indexfast path for primitive numeric TypedArray indices. - Preserve numeric
-0→ property key"0", string"-0"integer-index rejection, out-of-bounds/detached/resized behavior, BigInt result allocation, andThread.restrictenforcement. - Keep object/Symbol/string key coercion and every exotic fallback on canonical
ToPropertyKey+[[Get]]. - Record the specialization in the source-derived VM quickening inventory and its drift gate.
Acceptance
- The pre-fix witness changes from zero to a positive typed-index fast-hit count with identical results.
- Numeric in-bounds and invalid indices, BigInt elements, buffer state changes, and restriction behavior are pinned.
- The focused VM module test and VM inventory validation/self-test pass.
- No benchmark-shaped recognizer, key-coercion skip for objects, or unsynchronized buffer access.