Parents: #495, #473 Related: #672, #693
Problem
Private JSC__JSString__eql compares Value.asStr physical bytes, and private deep equality repeats that comparison for boxed String primitives. Jest-compatible string-containing and string-matching predicates also use raw byte substring search. A canonical/static cell and a physical flat-Latin-1 cell can therefore compare unequal or produce representation-dependent substring results despite containing the same JavaScript StringData.
Scope
- Route private JSString equality and boxed String deep equality through the engine semantic string comparator.
- Route string-containing and string-string matching through representation-aware UTF-16 code-unit search.
- Preserve object recursion, asymmetric inversion, regex matching, pending-exception publication, handle/context affinity, and ABI symbols/layouts.
- Keep same-cell and same-representation fast paths allocation-free; propagate conversion/search OOM through existing private pending-exception state.
No-workaround rules
- No global canonicalization, pointer-identity equality, lossy repair, ASCII restriction, retry, suppression, ABI fork, or byte-search approximation.
- No stacks, queues, jobs, Promise modes/reactions, Worker lifecycle, or Map/Set iterator changes.
Acceptance
- Canonical, static, and physical flat-Latin-1 cells compare by exact StringData through JSString eql and boxed deep equality.
- String-containing and string-string matching follow UTF-16 code-unit semantics across representations.
- Same-representation fast paths remain allocation-free and flat conversion OOM is explicit.
- Focused Debug, forced-flat, ReleaseSafe, TSan, private ABI fixtures/audits, and full units pass; applicable Test262 accounting is exact.