HphpArray::CreateLvalPtr does the same thing as LvalStr(). SharedMap
and NameValueTableWrapper::CreateLvalPtr just fatal, and aren't called
anyway. GetLvalPtr is only called from one place which suppresses COW
and thus can also be done with nvGet, leaving getLvalPtr dead.
Convert remaining virtual methods to static methods dispatched
by kind. This makes ArrayData a non-virtual class, so shuffle
fields and adjust static_asserts.
Moves about half of ArrayData virtual methods to g_array_funcs as
static functions instead of virtual functions. This is mostly a
mechanical factor, except a handful of methods that are specialized
for Vector instead of generic HphpArray.
We use ArrayKind as a simple unsigned integer, its an index, we do
range-based comparisons, and in the future we'll likely do bit-ops
for fast sub-kind tests. Just be honest that this is an old-school enum.
Introduces a new m_kind for vector-shaped HphpArray instances.
A vector has integer indexes in the range [0..size), and no
tombstones. Internally it does not store the integer keys or
hashtable, although this version still allocates space for it.
We'd like to start using ##mixed## instead of ##var## for attribute types to be consistent with Hack. As a followup to this (once released), we would codemod all ##var## to ##mixed##.