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

Public Member Functions

 CheckStoreBufferScavengeVisitor (ObjectSet *in_store_buffer, const SemiSpace *to, 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 922 of file scavenger.cc.

Constructor & Destructor Documentation

◆ CheckStoreBufferScavengeVisitor()

dart::CheckStoreBufferScavengeVisitor::CheckStoreBufferScavengeVisitor ( ObjectSet in_store_buffer,
const SemiSpace to,
const char *  msg 
)
inline

Definition at line 925 of file scavenger.cc.

928 : ObjectVisitor(),
930 in_store_buffer_(in_store_buffer),
931 to_(to),
932 msg_(msg) {}
static IsolateGroup * Current()
Definition: isolate.h:539
ObjectPointerVisitor(IsolateGroup *isolate_group)
Definition: visitor.cc:11

Member Function Documentation

◆ VisitObject()

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

Implements dart::ObjectVisitor.

Definition at line 934 of file scavenger.cc.

934 {
935 if (obj->IsPseudoObject()) return;
936 RELEASE_ASSERT_WITH_MSG(obj->IsOldObject(), msg_);
937
938 if (obj->untag()->IsRemembered()) {
939 RELEASE_ASSERT_WITH_MSG(in_store_buffer_->Contains(obj), msg_);
940 } else {
941 RELEASE_ASSERT_WITH_MSG(!in_store_buffer_->Contains(obj), msg_);
942 }
943
944 visiting_ = obj;
945 is_remembered_ = obj->untag()->IsRemembered();
946 is_card_remembered_ = obj->untag()->IsCardRemembered();
947 if (is_card_remembered_) {
948 RELEASE_ASSERT_WITH_MSG(!is_remembered_, msg_);
949 RELEASE_ASSERT_WITH_MSG(Page::Of(obj)->progress_bar_ == 0, msg_);
950 }
951 obj->untag()->VisitPointers(this);
952 }
#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::CheckStoreBufferScavengeVisitor::VisitPointers ( ObjectPtr from,
ObjectPtr to 
)
inlineoverridevirtual

Implements dart::ObjectPointerVisitor.

Definition at line 954 of file scavenger.cc.

954 {
955 for (ObjectPtr* ptr = from; ptr <= to; ptr++) {
956 ObjectPtr obj = *ptr;
957 if (obj->IsHeapObject() && obj->IsNewObject()) {
958 if (is_card_remembered_) {
959 if (!Page::Of(visiting_)->IsCardRemembered(ptr)) {
960 FATAL(
961 "%s: Old object %#" Px " references new object %#" Px
962 ", but the "
963 "slot's card is not remembered. Consider using rr to watch the "
964 "slot %p and reverse-continue to find the store with a missing "
965 "barrier.\n",
966 msg_, static_cast<uword>(visiting_), static_cast<uword>(obj),
967 ptr);
968 }
969 } else if (!is_remembered_) {
970 FATAL("%s: Old object %#" Px " references new object %#" Px
971 ", but it is "
972 "not in any store buffer. Consider using rr to watch the "
973 "slot %p and reverse-continue to find the store with a missing "
974 "barrier.\n",
975 msg_, static_cast<uword>(visiting_), static_cast<uword>(obj),
976 ptr);
977 }
979 msg_);
980 }
981 }
982 }
bool Contains(uword addr) const
Definition: scavenger.cc:792
static uword ToAddr(const UntaggedObject *raw_obj)
Definition: raw_object.h:522
#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: