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

Unified Diff: runtime/vm/growable_array.h

Issue 10559035: Implement a simple register allocator that tries to keep instruction results in registers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 1223d719beba81943435a378115aea3784e8e6f1..49ae5fa230a731d39c1bc72b0a4d9e1d670982ec 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -68,6 +68,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];
+ }
+ }
+
// Sort the array in place.
inline void Sort(int compare(const T*, const T*));

Powered by Google App Engine
This is Rietveld 408576698