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

Unified Diff: runtime/vm/heap.cc

Issue 1399783002: Add a hash map for a raw object to id mapping, this table will be used during snapshot writing in o… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years, 2 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/heap.h ('k') | runtime/vm/weak_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index 670c86844caed7e4c7c0b5183a84b2d33539387b..2b319fd931feb51ecee1d9ec7494e0460fff78a4 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -647,8 +647,20 @@ int64_t Heap::PeerCount() const {
int64_t Heap::HashCount() const {
- return
- new_weak_tables_[kHashes]->count() + old_weak_tables_[kHashes]->count();
+ return new_weak_tables_[kHashes]->count() +
+ old_weak_tables_[kHashes]->count();
+}
+
+
+int64_t Heap::ObjectIdCount() const {
+ return new_weak_tables_[kObjectIds]->count() +
+ old_weak_tables_[kObjectIds]->count();
+}
+
+
+void Heap::ResetObjectIdTable() {
+ new_weak_tables_[kObjectIds]->Reset();
+ old_weak_tables_[kObjectIds]->Reset();
}
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/weak_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698