diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/dex/vreg_analysis.cc | 1 | ||||
-rw-r--r-- | compiler/utils/growable_array.h | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/compiler/dex/vreg_analysis.cc b/compiler/dex/vreg_analysis.cc index 876973625d..4be0f59071 100644 --- a/compiler/dex/vreg_analysis.cc +++ b/compiler/dex/vreg_analysis.cc @@ -415,6 +415,7 @@ void MIRGraph::InitRegLocations() { loc[i] = fresh_loc; loc[i].s_reg_low = i; loc[i].is_const = is_constant_v_->IsBitSet(i); + loc[i].wide = false; } /* Patch up the locations for the compiler temps */ diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h index a7d1f0e5a5..e6c53dab24 100644 --- a/compiler/utils/growable_array.h +++ b/compiler/utils/growable_array.h @@ -50,9 +50,14 @@ class GrowableArray { : 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 { @@ -64,6 +69,15 @@ class GrowableArray { idx_ = 0; } + void Reset(GrowableArray* g_list) { + idx_ = 0; + g_list_ = g_list; + } + + size_t GetIndex() const { + return idx_; + } + private: size_t idx_; GrowableArray* const g_list_; |