De-virtualize ArrayData::release.

Of the four horsemen of the SmartAllocator, ArrayData was the only virtual
call. This meant an extra layer of indirection when coming from the TC
to allow the c++ compiler to emit its virtual call, and slightly larger
callsites when using non-generic paths.

While we're moving in this direction, consolidate ArrayData introspection
on its type enum. isSharedMap() was previously implemented with a vtable
slot, and we had no way of asking if an ArrayData was a NameValueTable.
Esse commit está contido em:
kma
2013-03-26 09:35:49 -07:00
commit de Sara Golemon
commit 5e603184f5
11 arquivos alterados com 52 adições e 31 exclusões
+1 -1
Ver Arquivo
@@ -1538,7 +1538,7 @@ ArrayData* HphpArray::AddNewElemC(ArrayData* a, TypedValue value) {
HphpArray* h;
ElmInd* ei;
int64_t k;
if (LIKELY(IsHphpArray(a)) &&
if (LIKELY(a->isHphpArray()) &&
((h = (HphpArray*)a), LIKELY(h->m_pos >= 0)) &&
LIKELY(!h->isFull()) &&
((k = h->m_nextKI), LIKELY(k >= 0)) &&