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

Unified Diff: runtime/vm/class_table.h

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/class_table.h
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index 97e475a689410095261142ea075319c0a65061d4..af774a003718414e967458fbc599db0830e7a47d 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -156,6 +156,10 @@ class ClassTable {
return table_[index];
}
+ void SetAt(intptr_t index, RawClass* raw_cls) {
+ table_[index] = raw_cls;
+ }
+
bool IsValidIndex(intptr_t index) const {
return (index > 0) && (index < top_);
}
@@ -167,6 +171,12 @@ class ClassTable {
intptr_t NumCids() const { return top_; }
+ // Used to drop recently added classes.
+ void SetNumCids(intptr_t num_cids) {
+ ASSERT(num_cids <= top_);
+ top_ = num_cids;
+ }
+
void Register(const Class& cls);
void RegisterAt(intptr_t index, const Class& cls);

Powered by Google App Engine
This is Rietveld 408576698