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

Unified Diff: runtime/vm/growable_array.h

Issue 10964012: Revert "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
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/growable_array.h
diff --git a/runtime/vm/growable_array.h b/runtime/vm/growable_array.h
index 965651e2a33e91a24a30dee0f4e7add816e1dda9..7a2b7b266226f3742d820e78f63a69c1d238335b 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -73,6 +73,14 @@ class BaseGrowableArray : public B {
length_ = 0;
}
+ void RemoveFirst() {
+ ASSERT(length_ > 0);
+ length_--;
+ for (int i = 0; i < length_; i++) {
+ data_[i] = data_[i + 1];
+ }
+ }
+
void InsertAt(intptr_t idx, const T& value) {
Resize(length() + 1);
for (intptr_t i = length_ - 2; i >= idx; i--) {
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698