Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::FieldDeserializationCluster Class Reference
Inheritance diagram for dart::FieldDeserializationCluster:
dart::DeserializationCluster dart::ZoneAllocated

Public Member Functions

 FieldDeserializationCluster ()
 
 ~FieldDeserializationCluster ()
 
void ReadAlloc (Deserializer *d) override
 
void ReadFill (Deserializer *d_) override
 
void PostLoad (Deserializer *d, const Array &refs) override
 
- Public Member Functions inherited from dart::DeserializationCluster
 DeserializationCluster (const char *name, bool is_canonical=false, bool is_immutable=false)
 
virtual ~DeserializationCluster ()
 
virtual void ReadAlloc (Deserializer *deserializer)=0
 
virtual void ReadFill (Deserializer *deserializer)=0
 
virtual void PostLoad (Deserializer *deserializer, const Array &refs)
 
const char * name () const
 
bool is_canonical () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Additional Inherited Members

- Protected Member Functions inherited from dart::DeserializationCluster
void ReadAllocFixedSize (Deserializer *deserializer, intptr_t instance_size)
 
- Protected Attributes inherited from dart::DeserializationCluster
const char *const name_
 
const bool is_canonical_
 
const bool is_immutable_
 
intptr_t start_index_
 
intptr_t stop_index_
 

Detailed Description

Definition at line 2221 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ FieldDeserializationCluster()

dart::FieldDeserializationCluster::FieldDeserializationCluster ( )
inline

Definition at line 2223 of file app_snapshot.cc.

2223: DeserializationCluster("Field") {}
DeserializationCluster(const char *name, bool is_canonical=false, bool is_immutable=false)

◆ ~FieldDeserializationCluster()

dart::FieldDeserializationCluster::~FieldDeserializationCluster ( )
inline

Definition at line 2224 of file app_snapshot.cc.

2224{}

Member Function Documentation

◆ PostLoad()

void dart::FieldDeserializationCluster::PostLoad ( Deserializer d,
const Array refs 
)
inlineoverridevirtual

Reimplemented from dart::DeserializationCluster.

Definition at line 2279 of file app_snapshot.cc.

2279 {
2280 Field& field = Field::Handle(d->zone());
2281 if (!IsolateGroup::Current()->use_field_guards()) {
2282 for (intptr_t i = start_index_, n = stop_index_; i < n; i++) {
2283 field ^= refs.At(i);
2284 field.set_guarded_cid_unsafe(kDynamicCid);
2285 field.set_is_nullable_unsafe(true);
2286 field.set_guarded_list_length_unsafe(Field::kNoFixedLength);
2287 field.set_guarded_list_length_in_object_offset_unsafe(
2289 field.set_static_type_exactness_state_unsafe(
2291 }
2292 } else {
2293 for (intptr_t i = start_index_, n = stop_index_; i < n; i++) {
2294 field ^= refs.At(i);
2295 field.InitializeGuardedListLengthInObjectOffset(/*unsafe=*/true);
2296 }
2297 }
2298 }
@ kUnknownLengthOffset
Definition: object.h:4727
@ kNoFixedLength
Definition: object.h:4729
static IsolateGroup * Current()
Definition: isolate.h:539
static Object & Handle()
Definition: object.h:407
static StaticTypeExactnessState NotTracking()
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
@ kDynamicCid
Definition: class_id.h:253

◆ ReadAlloc()

void dart::FieldDeserializationCluster::ReadAlloc ( Deserializer d)
inlineoverridevirtual

Implements dart::DeserializationCluster.

Definition at line 2226 of file app_snapshot.cc.

2226 {
2228 }
void ReadAllocFixedSize(Deserializer *deserializer, intptr_t instance_size)
static intptr_t InstanceSize()
Definition: object.h:4558

◆ ReadFill()

void dart::FieldDeserializationCluster::ReadFill ( Deserializer d_)
inlineoverridevirtual

Implements dart::DeserializationCluster.

Definition at line 2230 of file app_snapshot.cc.

2230 {
2231 Deserializer::Local d(d_);
2232
2233 ASSERT(!is_canonical()); // Never canonical.
2234#if !defined(DART_PRECOMPILED_RUNTIME)
2235 Snapshot::Kind kind = d_->kind();
2236#endif
2237 for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
2238 FieldPtr field = static_cast<FieldPtr>(d.Ref(id));
2240 d.ReadFromTo(field);
2241#if !defined(DART_PRECOMPILED_RUNTIME)
2242 ASSERT(d_->kind() != Snapshot::kFullAOT);
2243 field->untag()->guarded_list_length_ = static_cast<SmiPtr>(d.ReadRef());
2244 if (kind == Snapshot::kFullJIT) {
2245 field->untag()->dependent_code_ =
2246 static_cast<WeakArrayPtr>(d.ReadRef());
2247 }
2248 field->untag()->token_pos_ = d.ReadTokenPosition();
2249 field->untag()->end_token_pos_ = d.ReadTokenPosition();
2250 field->untag()->guarded_cid_ = d.ReadCid();
2251 field->untag()->is_nullable_ = d.ReadCid();
2252 const int8_t static_type_exactness_state = d.Read<int8_t>();
2253#if defined(TARGET_ARCH_X64)
2254 field->untag()->static_type_exactness_state_ =
2255 static_type_exactness_state;
2256#else
2257 // We might produce core snapshots using X64 VM and then consume
2258 // them in IA32 or ARM VM. In which case we need to simply ignore
2259 // static type exactness state written into snapshot because non-X64
2260 // builds don't have this feature enabled.
2261 // TODO(dartbug.com/34170) Support other architectures.
2262 USE(static_type_exactness_state);
2263 field->untag()->static_type_exactness_state_ =
2265#endif // defined(TARGET_ARCH_X64)
2266 field->untag()->kernel_offset_ = d.Read<uint32_t>();
2267#endif
2268 field->untag()->kind_bits_ = d.Read<uint16_t>();
2269
2270 field->untag()->host_offset_or_field_id_ =
2271 static_cast<SmiPtr>(d.ReadRef());
2272#if !defined(DART_PRECOMPILED_RUNTIME)
2273 field->untag()->target_offset_ =
2274 Smi::Value(field->untag()->host_offset_or_field_id());
2275#endif // !defined(DART_PRECOMPILED_RUNTIME)
2276 }
2277 }
static void InitializeHeader(ObjectPtr raw, intptr_t cid, intptr_t size, bool is_canonical=false)
intptr_t Value() const
Definition: object.h:9990
#define ASSERT(E)
static void USE(T &&)
Definition: globals.h:618

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