ArrayData: consolidate m_nonsmart and m_allocMode into one field

The in-situ allocation case can be easily detected by checking m_data == m_inline_data.slots. Therefore there's no need for two distinct flags to track current and future allocation strategy.
Esse commit está contido em:
Andrei Alexandrescu
2013-06-05 20:33:08 -07:00
commit de Sara Golemon
commit 4debf268f7
8 arquivos alterados com 139 adições e 127 exclusões
+6 -1
Ver Arquivo
@@ -31,6 +31,11 @@
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
static_assert(
sizeof(ArrayData) == 32,
"Performance is sensitive to sizeof(ArrayData)."
" Make sure you changed it with good reason and then update this assert.");
typedef tbb::concurrent_hash_map<const StringData *, ArrayData *,
StringDataHashCompare> ArrayDataMap;
static ArrayDataMap s_arrayDataMap;
@@ -121,7 +126,7 @@ void ArrayData::release() {
that->release();
return;
}
assert(m_kind == kNameValueTableWrapper);
assert(m_kind == ArrayKind::kNameValueTableWrapper);
// NameValueTableWrapper: nop.
}