bool GlobalsArray::ValidMArrayIter(const ArrayData* ad, const MArrayIter & fp) { assert(fp.getContainer() == ad); auto a = asGlobals(ad); if (fp.getResetFlag()) return false; if (fp.m_pos == IterEnd(a)) return false; NameValueTable::Iterator iter(a->m_tab, fp.m_pos); return iter.valid(); }
bool NameValueTableWrapper::ValidMArrayIter(const ArrayData* ad, const MArrayIter & fp) { assert(fp.getContainer() == ad); auto a = asNVTW(ad); if (fp.getResetFlag()) return false; if (fp.m_pos == invalid_index) return false; NameValueTable::Iterator iter(a->m_tab, fp.m_pos); return iter.valid(); }
bool ArrayCommon::ValidMArrayIter(const ArrayData* ad, const MArrayIter& fp) { assert(fp.getContainer() == ad); if (fp.getResetFlag()) return false; if (ad->hasPackedLayout()) { assert(PackedArray::checkInvariants(ad)); return fp.m_pos != ad->getSize(); } else if (ad->isKeyset()) { return false; } else { assert(MixedArray::asMixed(ad)); return fp.m_pos != MixedArray::asMixed(ad)->iterLimit(); } }
bool APCLocalArray::ValidMArrayIter(const ArrayData* ad, const MArrayIter& fp) { assert(fp.getContainer() == ad); not_reached(); // we should've escalated }
bool APCLocalArray::ValidMArrayIter(const ArrayData* ad, const MArrayIter& fp) { assert(fp.getContainer() == ad); return false; }