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

Side by Side Diff: runtime/vm/scavenger.h

Issue 10832199: Add a weak property type to the virtual machine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address final review comments Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_SCAVENGER_H_ 5 #ifndef VM_SCAVENGER_H_
6 #define VM_SCAVENGER_H_ 6 #define VM_SCAVENGER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void WriteProtect(bool read_only); 88 void WriteProtect(bool read_only);
89 89
90 private: 90 private:
91 uword FirstObjectStart() const { return to_->start() | object_alignment_; } 91 uword FirstObjectStart() const { return to_->start() | object_alignment_; }
92 void Prologue(Isolate* isolate, bool invoke_api_callbacks); 92 void Prologue(Isolate* isolate, bool invoke_api_callbacks);
93 void IterateStoreBuffers(Isolate* isolate, ScavengerVisitor* visitor); 93 void IterateStoreBuffers(Isolate* isolate, ScavengerVisitor* visitor);
94 void IterateRoots(Isolate* isolate, 94 void IterateRoots(Isolate* isolate,
95 ScavengerVisitor* visitor, 95 ScavengerVisitor* visitor,
96 bool visit_prologue_weak_persistent_handles); 96 bool visit_prologue_weak_persistent_handles);
97 void IterateWeakProperties(Isolate* isolate, ScavengerVisitor* visitor);
97 void IterateWeakReferences(Isolate* isolate, ScavengerVisitor* visitor); 98 void IterateWeakReferences(Isolate* isolate, ScavengerVisitor* visitor);
98 void IterateWeakRoots(Isolate* isolate, 99 void IterateWeakRoots(Isolate* isolate,
99 HandleVisitor* visitor, 100 HandleVisitor* visitor,
100 bool visit_prologue_weak_persistent_handles); 101 bool visit_prologue_weak_persistent_handles);
101 void ProcessToSpace(ScavengerVisitor* visitor); 102 void ProcessToSpace(ScavengerVisitor* visitor);
103 uword ProcessWeakProperty(RawWeakProperty* raw_weak,
104 ScavengerVisitor* visitor);
102 void Epilogue(Isolate* isolate, bool invoke_api_callbacks); 105 void Epilogue(Isolate* isolate, bool invoke_api_callbacks);
103 106
104 bool IsUnreachable(RawObject** p); 107 bool IsUnreachable(RawObject** p);
105 108
106 // During a scavenge we need to remember the promoted objects. 109 // During a scavenge we need to remember the promoted objects.
107 // This is implemented as a stack of objects at the end of the to space. As 110 // This is implemented as a stack of objects at the end of the to space. As
108 // object sizes are always greater than sizeof(uword) and promoted objects do 111 // object sizes are always greater than sizeof(uword) and promoted objects do
109 // not consume space in the to space they leave enough room for this stack. 112 // not consume space in the to space they leave enough room for this stack.
110 void PushToPromotedStack(uword addr) { 113 void PushToPromotedStack(uword addr) {
111 end_ -= sizeof(addr); 114 end_ -= sizeof(addr);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 155
153 friend class ScavengerVisitor; 156 friend class ScavengerVisitor;
154 friend class ScavengerWeakVisitor; 157 friend class ScavengerWeakVisitor;
155 158
156 DISALLOW_COPY_AND_ASSIGN(Scavenger); 159 DISALLOW_COPY_AND_ASSIGN(Scavenger);
157 }; 160 };
158 161
159 } // namespace dart 162 } // namespace dart
160 163
161 #endif // VM_SCAVENGER_H_ 164 #endif // VM_SCAVENGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698