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

Unified Diff: runtime/vm/gc_marker.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/gc_marker.h
diff --git a/runtime/vm/gc_marker.h b/runtime/vm/gc_marker.h
index 7cd417cca488ae87f36b7354d7877a362e11dc48..b3a7ef5adcdd93525259836f7cfdd335bde38640 100644
--- a/runtime/vm/gc_marker.h
+++ b/runtime/vm/gc_marker.h
@@ -5,6 +5,8 @@
#ifndef VM_GC_MARKER_H_
#define VM_GC_MARKER_H_
+#include <map>
siva 2012/09/14 00:03:46 I would prefer if we could have a local map and no
+
#include "vm/allocation.h"
namespace dart {
@@ -16,13 +18,15 @@ class Isolate;
class MarkingVisitor;
class ObjectPointerVisitor;
class PageSpace;
+class RawObject;
class RawWeakProperty;
// The class GCMarker is used to mark reachable old generation objects as part
// of the mark-sweep collection. The marking bit used is defined in RawObject.
class GCMarker : public ValueObject {
public:
- explicit GCMarker(Heap* heap) : heap_(heap) { }
+ explicit GCMarker(Heap* heap, std::map<RawObject*, void*>* peer) :
Anton Muhin 2012/09/13 06:27:07 nit: explicit can go away now
cshapiro 2012/09/15 01:23:41 Thanks. Done.
+ heap_(heap), peer_(peer) { }
~GCMarker() { }
void MarkObjects(Isolate* isolate,
@@ -41,8 +45,10 @@ class GCMarker : public ValueObject {
void IterateWeakReferences(Isolate* isolate, MarkingVisitor* visitor);
void DrainMarkingStack(Isolate* isolate, MarkingVisitor* visitor);
void ProcessWeakProperty(RawWeakProperty* raw_weak, MarkingVisitor* visitor);
+ void ProcessPeerReferents();
Heap* heap_;
+ std::map<RawObject*, void*>* peer_;
siva 2012/09/14 00:03:46 why not call it peer_table_ or peer_map_
cshapiro 2012/09/15 01:23:41 Renamed. Done.
DISALLOW_IMPLICIT_CONSTRUCTORS(GCMarker);
};

Powered by Google App Engine
This is Rietveld 408576698