The AddLval methods were fairly cold, so reimplement them in
terms of lval(), but preserve the assert that ensures the keys
being added do not already exist. This reduces the number
of kind-specific methods we need to implement.
Added Array::setWithRef(key,value) to capture a common use
case for lvalAt(). Later this can implemented more efficiently
as a virtual method in ArrayData subclasses.
Differential Revision: D937227
Most strings used as keys are either small or not shared, where the
data pointers cannot be equal. Of the rest (shared), most could have
been small.
This diff copies small SharedVariant strings, so they don't refer
back to the SharedVariant, and don't need to be enlisted. Then,
this changes hitStringKey() to not check data pointers, making it
equivalent to StringData::same(). Lastly, hand-write the comparison
loop in StringData::same() so we compare words at a time, and the
loop can be inlined.
Differential Revision: D937233
Enable guarding tracelets on ArrayKind when we can generate
better code for a specific kind.
Added specialized helpers for CGetM, FPassM, and IssetM of
vector-shaped arrays. This eliminates an indirect call and allows the
entire array-access call stack to be inlined into the helper
Differential Revision: D873631