984 {
985 MallocGrowableArray<ObjectPtr>* const working_list =
987 ASSERT(working_list->length() == 0);
988
989 Visitor visitor(isolate_->
group(),
this, working_list, traversal_rules_);
990
992 working_list->Add(from_.
ptr());
993
999
1000 while (!working_list->is_empty()) {
1001 thread->CheckForSafepoint();
1002
1003
1004
1005
1006 ObjectPtr raw = working_list->Last();
1008
1009 working_list->RemoveLast();
1010
1011 working_list->RemoveLast();
1012 continue;
1013 }
1014
1015 if (raw == to_.
ptr()) {
1016 return CollectPath(working_list);
1017 }
1018
1019
1021 int length = working_list->length();
1022
1023 do {
1024 const intptr_t
cid = raw->GetClassId();
1025
1028 break;
1029 }
1030 if (
cid == kClosureCid) {
1032
1033 working_list->Add(
closure.RawContext());
1034 break;
1035 }
1036
1037
1038 klass = class_table->At(
cid);
1039 if (klass.is_isolate_unsendable()) {
1040 break;
1041 }
1042 } else {
1043 ASSERT(traversal_rules_ ==
1045
1046
1049 case kClosureCid:
1050 case kFinalizerCid:
1051 case kFinalizerEntryCid:
1052 case kFunctionTypeCid:
1053 case kMirrorReferenceCid:
1054 case kNativeFinalizerCid:
1055 case kReceivePortCid:
1056 case kRecordCid:
1057 case kRecordTypeCid:
1058 case kRegExpCid:
1059 case kStackTraceCid:
1060 case kSuspendStateCid:
1061 case kUserTagCid:
1062 case kWeakPropertyCid:
1063 case kWeakReferenceCid:
1064 case kWeakArrayCid:
1065 case kDynamicLibraryCid:
1066 case kPointerCid:
1067 case kInstanceCid:
1069 break;
1070 default:
1073 }
1074 }
1076 break;
1077 }
1078 }
1079 if (
cid == kArrayCid) {
1081 visitor.VisitObject(array.GetTypeArguments());
1082 const intptr_t batch_size = (2 << 14) - 1;
1083 for (intptr_t
i = 0;
i < array.Length(); ++
i) {
1084 ObjectPtr ptr = array.At(
i);
1085 visitor.VisitObject(ptr);
1086 if ((
i & batch_size) == batch_size) {
1087 thread->CheckForSafepoint();
1088 }
1089 }
1090 break;
1091 } else {
1092 raw->untag()->VisitPointers(&visitor);
1093 }
1094 } while (false);
1095
1096
1097
1098
1099 if (working_list->length() ==
length) {
1102 }
1103 }
1104
1105 return "";
1106 }
static bool skip(SkStream *stream, size_t amount)
#define RELEASE_ASSERT(cond)
ClassTable * class_table() const
MallocGrowableArray< ObjectPtr > * pointers_to_verify_at_exit()
IsolateGroup * group() const
static ObjectPtr RawCast(ObjectPtr obj)
void MarkVisited(ObjectPtr object)
static Thread * Current()
Visitor(Ts...) -> Visitor< Ts... >
@ kInternalToIsolateGroup
@ kExternalBetweenIsolateGroups
bool CanShareObjectAcrossIsolates(ObjectPtr obj)
std::function< void()> closure