Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::CheckStoreBufferEvacuateVisitor Class Reference
Inheritance diagram for dart::CheckStoreBufferEvacuateVisitor:
dart::ObjectVisitor dart::ObjectPointerVisitor

Public Member Functions

 CheckStoreBufferEvacuateVisitor (ObjectSet *in_store_buffer, const char *msg)
 
void VisitObject (ObjectPtr obj) override
 
void VisitPointers (ObjectPtr *from, ObjectPtr *to) override
 
- Public Member Functions inherited from dart::ObjectVisitor
 ObjectVisitor ()
 
virtual ~ObjectVisitor ()
 
virtual void VisitObject (ObjectPtr obj)=0
 
- Public Member Functions inherited from dart::ObjectPointerVisitor
 ObjectPointerVisitor (IsolateGroup *isolate_group)
 
virtual ~ObjectPointerVisitor ()
 
IsolateGroupisolate_group () const
 
virtual void VisitTypedDataViewPointers (TypedDataViewPtr view, CompressedObjectPtr *first, CompressedObjectPtr *last)
 
virtual void VisitPointers (ObjectPtr *first, ObjectPtr *last)=0
 
void VisitCompressedPointers (uword heap_base, CompressedObjectPtr *first, CompressedObjectPtr *last)
 
void VisitPointers (ObjectPtr *p, intptr_t len)
 
void VisitPointer (ObjectPtr *p)
 
const char * gc_root_type () const
 
void set_gc_root_type (const char *gc_root_type)
 
void clear_gc_root_type ()
 
virtual bool visit_weak_persistent_handles () const
 
virtual bool trace_values_through_fields () const
 
const ClassTableclass_table () const
 
virtual bool CanVisitSuspendStatePointers (SuspendStatePtr suspend_state)
 

Detailed Description

Definition at line 1216 of file pages.cc.

Constructor & Destructor Documentation

◆ CheckStoreBufferEvacuateVisitor()

dart::CheckStoreBufferEvacuateVisitor::CheckStoreBufferEvacuateVisitor ( ObjectSet in_store_buffer,
const char *  msg 
)
inline

Definition at line 1219 of file pages.cc.

1220 : ObjectVisitor(),
1222 in_store_buffer_(in_store_buffer),
1223 msg_(msg) {}
static IsolateGroup * Current()
Definition: isolate.h:539
ObjectPointerVisitor(IsolateGroup *isolate_group)
Definition: visitor.cc:11

Member Function Documentation

◆ VisitObject()

void dart::CheckStoreBufferEvacuateVisitor::VisitObject ( ObjectPtr  obj)
inlineoverridevirtual

Implements dart::ObjectVisitor.

Definition at line 1225 of file pages.cc.

1225 {
1226 if (obj->IsPseudoObject()) return;
1227 RELEASE_ASSERT_WITH_MSG(obj->IsOldObject(), msg_);
1228 if (!obj->untag()->IsMarked()) return;
1229
1230 if (obj->untag()->IsRemembered()) {
1231 RELEASE_ASSERT_WITH_MSG(in_store_buffer_->Contains(obj), msg_);
1232 } else {
1233 RELEASE_ASSERT_WITH_MSG(!in_store_buffer_->Contains(obj), msg_);
1234 }
1235
1236 visiting_ = obj;
1237 is_remembered_ = obj->untag()->IsRemembered();
1238 is_card_remembered_ = obj->untag()->IsCardRemembered();
1239 if (is_card_remembered_) {
1240 RELEASE_ASSERT_WITH_MSG(!is_remembered_, msg_);
1241 RELEASE_ASSERT_WITH_MSG(Page::Of(obj)->progress_bar_ == 0, msg_);
1242 }
1243 obj->untag()->VisitPointers(this);
1244 }
#define RELEASE_ASSERT_WITH_MSG(cond, msg)
Definition: assert.h:332
bool Contains(ObjectPtr raw_obj) const
Definition: object_set.h:66
static Page * Of(ObjectPtr obj)
Definition: page.h:162

◆ VisitPointers()

void dart::CheckStoreBufferEvacuateVisitor::VisitPointers ( ObjectPtr from,
ObjectPtr to 
)
inlineoverridevirtual

Implements dart::ObjectPointerVisitor.

Definition at line 1246 of file pages.cc.

1246 {
1247 for (ObjectPtr* ptr = from; ptr <= to; ptr++) {
1248 ObjectPtr obj = *ptr;
1249 if (obj->IsHeapObject() && obj->untag()->IsEvacuationCandidate()) {
1250 if (is_card_remembered_) {
1251 if (!Page::Of(visiting_)->IsCardRemembered(ptr)) {
1252 FATAL(
1253 "%s: Old object %#" Px " references new object %#" Px
1254 ", but the "
1255 "slot's card is not remembered. Consider using rr to watch the "
1256 "slot %p and reverse-continue to find the store with a missing "
1257 "barrier.\n",
1258 msg_, static_cast<uword>(visiting_), static_cast<uword>(obj),
1259 ptr);
1260 }
1261 } else if (!is_remembered_) {
1262 FATAL("%s: Old object %#" Px " references new object %#" Px
1263 ", but it is "
1264 "not in any store buffer. Consider using rr to watch the "
1265 "slot %p and reverse-continue to find the store with a missing "
1266 "barrier.\n",
1267 msg_, static_cast<uword>(visiting_), static_cast<uword>(obj),
1268 ptr);
1269 }
1270 }
1271 }
1272 }
#define FATAL(error)
uintptr_t uword
Definition: globals.h:501
#define Px
Definition: globals.h:410

The documentation for this class was generated from the following file: