Consolodate ArrayData position-based iterator methods
Implement these all in ArrayData, using iter_begin, advance, rewind, and iter_end virtual methods. Only SharedMap didn't override the iter_* methods, so moved ArrayData's implementation to SharedMap and tailored it a bit. Fetch SharedMap's size at construction time to avoid calls to SharedMap::vsize(). Removed HphpArray and NameValueTableWrapper implementations of these methods.
Esse commit está contido em:
@@ -307,8 +307,8 @@ void ArrayData::moveStrongIterators(ArrayData* dest, ArrayData* src) {
|
||||
}
|
||||
|
||||
CVarRef ArrayData::endRef() {
|
||||
if (size_t(m_pos) < size_t(size())) {
|
||||
return getValueRef(size() - 1);
|
||||
if (m_pos != invalid_index) {
|
||||
return getValueRef(iter_end());
|
||||
}
|
||||
throw FatalErrorException("invalid ArrayData::m_pos");
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário