Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::FieldInvalidator Class Reference

Public Member Functions

 FieldInvalidator (Zone *zone)
 
void CheckStatics (const GrowableArray< const Field * > &fields)
 
void CheckInstances (const GrowableArray< const Instance * > &instances)
 

Detailed Description

Definition at line 2171 of file isolate_reload.cc.

Constructor & Destructor Documentation

◆ FieldInvalidator()

dart::FieldInvalidator::FieldInvalidator ( Zone zone)
inlineexplicit

Definition at line 2173 of file isolate_reload.cc.

2174 : zone_(zone),
2175 cls_(Class::Handle(zone)),
2176 cls_fields_(Array::Handle(zone)),
2177 entry_(Object::Handle(zone)),
2178 value_(Object::Handle(zone)),
2179 instance_(Instance::Handle(zone)),
2180 type_(AbstractType::Handle(zone)),
2181 cache_(SubtypeTestCache::Handle(zone)),
2182 result_(Bool::Handle(zone)),
2183 closure_function_(Function::Handle(zone)),
2184 instantiator_type_arguments_(TypeArguments::Handle(zone)),
2185 function_type_arguments_(TypeArguments::Handle(zone)),
2186 instance_cid_or_signature_(Object::Handle(zone)),
2187 instance_type_arguments_(TypeArguments::Handle(zone)),
2188 parent_function_type_arguments_(TypeArguments::Handle(zone)),
2189 delayed_function_type_arguments_(TypeArguments::Handle(zone)) {}
static Object & Handle()
Definition object.h:407

Member Function Documentation

◆ CheckInstances()

void dart::FieldInvalidator::CheckInstances ( const GrowableArray< const Instance * > &  instances)
inline

Definition at line 2220 of file isolate_reload.cc.

2220 {
2221 Thread* thread = Thread::Current();
2222 HANDLESCOPE(thread);
2223 for (intptr_t i = 0; i < instances.length(); i++) {
2224 CheckInstance(*instances[i]);
2225 }
2226 }
static Thread * Current()
Definition thread.h:361
#define HANDLESCOPE(thread)
Definition handles.h:321

◆ CheckStatics()

void dart::FieldInvalidator::CheckStatics ( const GrowableArray< const Field * > &  fields)
inline

Definition at line 2191 of file isolate_reload.cc.

2191 {
2192 Thread* thread = Thread::Current();
2193 HANDLESCOPE(thread);
2194 instantiator_type_arguments_ = TypeArguments::null();
2195 for (intptr_t i = 0; i < fields.length(); i++) {
2196 const Field& field = *fields[i];
2197 if (!field.is_static()) {
2198 continue;
2199 }
2200 if (field.needs_load_guard()) {
2201 continue; // Already guarding.
2202 }
2203 const intptr_t field_id = field.field_id();
2204 thread->isolate_group()->ForEachIsolate([&](Isolate* isolate) {
2205 auto field_table = isolate->field_table();
2206 // The isolate might've just been created and is now participating in
2207 // the reload request inside `IsolateGroup::RegisterIsolate()`.
2208 // At that point it doesn't have the field table setup yet.
2209 if (field_table->IsReadyToUse()) {
2210 value_ = field_table->At(field_id);
2211 if ((value_.ptr() != Object::sentinel().ptr()) &&
2212 (value_.ptr() != Object::transition_sentinel().ptr())) {
2213 CheckValueType(value_, field);
2214 }
2215 }
2216 });
2217 }
2218 }
static ObjectPtr null()
Definition object.h:433

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