From e39c54ea575ec710d5e84277fcdcc049f8acb3c9 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 22 Sep 2014 14:50:02 +0100 Subject: Deprecate GrowableArray, use ArenaVector instead. Purge GrowableArray from Quick and Portable. Remove GrowableArray::Iterator. Change-Id: I92157d3a6ea5975f295662809585b2dc15caa1c6 --- compiler/utils/growable_array.h | 51 ++--------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'compiler/utils/growable_array.h') diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h index a1a3312576..5b55b80f23 100644 --- a/compiler/utils/growable_array.h +++ b/compiler/utils/growable_array.h @@ -26,61 +26,14 @@ namespace art { // Type of growable list for memory tuning. enum OatListKind { kGrowableArrayMisc = 0, - kGrowableArrayBlockList, - kGrowableArraySSAtoDalvikMap, - kGrowableArrayDfsOrder, - kGrowableArrayDfsPostOrder, - kGrowableArrayDomPostOrderTraversal, - kGrowableArraySwitchTables, - kGrowableArrayFillArrayData, - kGrowableArraySuccessorBlocks, - kGrowableArrayPredecessors, - kGrowableArraySlowPaths, kGNumListKinds }; +// Deprecated +// TODO: Replace all uses with ArenaVector. template class GrowableArray { public: - class Iterator { - public: - explicit Iterator(GrowableArray* g_list) - : idx_(0), - g_list_(g_list) {} - - explicit Iterator() - : idx_(0), - g_list_(nullptr) {} - - // NOTE: returns 0/NULL when no next. - // TODO: redo to make usage consistent with other iterators. - T Next() { - DCHECK(g_list_ != nullptr); - if (idx_ >= g_list_->Size()) { - return 0; - } else { - return g_list_->Get(idx_++); - } - } - - void Reset() { - idx_ = 0; - } - - void Reset(GrowableArray* g_list) { - idx_ = 0; - g_list_ = g_list; - } - - size_t GetIndex() const { - return idx_; - } - - private: - size_t idx_; - GrowableArray* g_list_; - }; - GrowableArray(ArenaAllocator* arena, size_t init_length, OatListKind kind = kGrowableArrayMisc) : arena_(arena), num_allocated_(init_length), -- cgit v1.2.3-59-g8ed1b