ArrayData* APCLocalArray::EscalateForSort(ArrayData* ad, SortFunction sf) { auto a = asApcArray(ad); ArrayData* elems = a->loadElems(); ArrayData* ret = elems->escalateForSort(sf); if (ret != elems) { elems->release(); } assert(ret->hasExactlyOneRef()); assert(!ret->isStatic()); return ret; }
ArrayData* SharedMap::escalateForSort() { ArrayData *ret = loadElems(true /* mapInit */); assert(!ret->isStatic()); return ret; }
ArrayData *SharedMap::escalate() const { ArrayData *ret = loadElems(); assert(!ret->isStatic()); return ret; }
ArrayData *APCLocalArray::Escalate(const ArrayData* ad) { auto smap = asApcArray(ad); auto ret = smap->loadElems(); assert(!ret->isStatic()); return ret; }
ArrayData* APCLocalArray::EscalateForSort(ArrayData* ad) { auto a = asApcArray(ad); auto ret = a->loadElems()->escalateForSort(); assert(!ret->isStatic()); return ret; }