Chromium Code Reviews| 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(); |