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

Unified Diff: runtime/vm/heap.h

Issue 10905251: Lazy peer API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 8 years, 3 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/heap.h
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index 0c0a444dabc34ebfbfe441fd718079d3daab81fd..d2f02f392a885d96b8c0058ec4b7b05627aaa928 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -156,6 +156,17 @@ class Heap {
static const char* GCReasonToString(GCReason gc_reason);
+ // Associates a peer with an object. If an object has a peer, it is
+ // replaced. A value of NULL disassociate an object from its peer.
+ void SetPeer(RawObject* raw_obj, void* peer);
+
+ // Retrieves the peer associated with an object. Returns NULL if
+ // there is no association.
+ void* GetPeer(RawObject* raw_obj);
+
+ // Returns the number of objects with a peer.
+ int64_t PeerCount() const;
+
private:
Heap();
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/gc_marker.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698