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

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: 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..0418a9da5591ae46085dfb1b8b24ad2da996288b 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -16,6 +16,7 @@ namespace dart {
// Forward declarations.
class Isolate;
+class Object;
siva 2012/09/14 00:03:46 Why is this forward declaration needed? I don't se
cshapiro 2012/09/15 01:23:41 This forward reference for Object is noise. Remov
class ObjectPointerVisitor;
class ObjectSet;
class VirtualMemory;
@@ -156,6 +157,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();

Powered by Google App Engine
This is Rietveld 408576698