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

Unified Diff: runtime/vm/growable_array.h

Issue 1054393003: Compress deopt instructions in memory using variable length encoding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: landing Created 5 years, 8 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_compiler_x64.cc ('k') | runtime/vm/object.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 81a946bb33ac34379acafa6696ce8c85bfc12a2f..ba6f80756bea9ba1b45b2423d0bfaf08cfaa413d 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -90,6 +90,15 @@ class BaseGrowableArray : public B {
data_[idx] = value;
}
+ void Reverse() {
+ for (intptr_t i = 0; i < length_ / 2; i++) {
+ const intptr_t j = length_ - 1 - i;
+ T temp = data_[i];
+ data_[i] = data_[j];
+ data_[j] = temp;
+ }
+ }
+
// The content is uninitialized after calling it.
void SetLength(intptr_t new_length);
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698