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

Unified Diff: runtime/vm/growable_array.h

Issue 1293253005: Completely remove InterruptableThreadState and Fix ThreadRegistry leak (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | runtime/vm/isolate.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 045c3e52cf2dd35bd1a0129c2284589ac17c1e39..1e7c2041f8a86d94429ec8260821fd51ea3c1d11 100644
--- a/runtime/vm/growable_array.h
+++ b/runtime/vm/growable_array.h
@@ -99,6 +99,17 @@ class BaseGrowableArray : public B {
}
}
+ // Swap entries |i| and |j|.
+ void Swap(intptr_t i, intptr_t j) {
+ ASSERT(i >= 0);
+ ASSERT(j >= 0);
+ ASSERT(i < length_);
+ ASSERT(j < length_);
+ 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 | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698