mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
A member read through a non-null asserted element read evaluates the element's presence and then reads it, so a missing element throws Node's TypeError. An index other than a local or a field read was held in a hidden local first, which turned the receiver into a sequence: the element was then read with a reference (retain and release) instead of borrowed, and the fallback `genes[genes.length - 1]!.sc` of a search made fasta's lookup loop 12% slower. An index computed only from locals, field reads, number literals and the lengths of arrays read through them (`xs.length - 1`, `i + 1`, `-i`) has no effect and yields the same value when evaluated again with nothing in between, so it is evaluated for the presence test and again for the read, and the element stays a borrowed read. Other indexes keep their hidden local.