Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: runtime/vm/growable_array.h

Issue 10939036: A simpler scheme for garbage collection of ureachable phi inputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/growable_array.h
diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
index 7a2b7b266226f3742d820e78f63a69c1d238335b..2f196f7fe875ceb7a58b171d8842071cd2780d46 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -73,10 +73,10 @@ class BaseGrowableArray : public B {
length_ = 0;
}
- void RemoveFirst() {
- ASSERT(length_ > 0);
+ void Remove(intptr_t idx) {
+ ASSERT(length_ > idx);
length_--;
- for (int i = 0; i < length_; i++) {
+ for (int i = idx; i < length_; i++) {
data_[i] = data_[i + 1];
}
}

Powered by Google App Engine
This is Rietveld 408576698