Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::VMDeserializationRoots Class Reference
Inheritance diagram for dart::VMDeserializationRoots:
dart::DeserializationRoots

Public Member Functions

 VMDeserializationRoots ()
 
void AddBaseObjects (Deserializer *d) override
 
void ReadRoots (Deserializer *d) override
 
void PostLoad (Deserializer *d, const Array &refs) override
 
- Public Member Functions inherited from dart::DeserializationRoots
virtual ~DeserializationRoots ()
 
virtual void AddBaseObjects (Deserializer *deserializer)=0
 
virtual void ReadRoots (Deserializer *deserializer)=0
 
virtual void PostLoad (Deserializer *deserializer, const Array &refs)=0
 

Detailed Description

Definition at line 6933 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ VMDeserializationRoots()

dart::VMDeserializationRoots::VMDeserializationRoots ( )
inline

Definition at line 6935 of file app_snapshot.cc.

6935: symbol_table_(WeakArray::Handle()) {}
static Object & Handle()
Definition: object.h:407

Member Function Documentation

◆ AddBaseObjects()

void dart::VMDeserializationRoots::AddBaseObjects ( Deserializer d)
inlineoverridevirtual

Implements dart::DeserializationRoots.

Definition at line 6937 of file app_snapshot.cc.

6937 {
6938 // These objects are always allocated by Object::InitOnce, so they are not
6939 // written into the snapshot.
6940
6941 d->AddBaseObject(Object::null());
6942 d->AddBaseObject(Object::sentinel().ptr());
6943 d->AddBaseObject(Object::transition_sentinel().ptr());
6944 d->AddBaseObject(Object::optimized_out().ptr());
6945 d->AddBaseObject(Object::empty_array().ptr());
6946 d->AddBaseObject(Object::empty_instantiations_cache_array().ptr());
6947 d->AddBaseObject(Object::empty_subtype_test_cache_array().ptr());
6948 d->AddBaseObject(Object::dynamic_type().ptr());
6949 d->AddBaseObject(Object::void_type().ptr());
6950 d->AddBaseObject(Object::empty_type_arguments().ptr());
6951 d->AddBaseObject(Bool::True().ptr());
6952 d->AddBaseObject(Bool::False().ptr());
6953 ASSERT(Object::synthetic_getter_parameter_types().ptr() != Object::null());
6954 d->AddBaseObject(Object::synthetic_getter_parameter_types().ptr());
6955 ASSERT(Object::synthetic_getter_parameter_names().ptr() != Object::null());
6956 d->AddBaseObject(Object::synthetic_getter_parameter_names().ptr());
6957 d->AddBaseObject(Object::empty_context_scope().ptr());
6958 d->AddBaseObject(Object::empty_object_pool().ptr());
6959 d->AddBaseObject(Object::empty_compressed_stackmaps().ptr());
6960 d->AddBaseObject(Object::empty_descriptors().ptr());
6961 d->AddBaseObject(Object::empty_var_descriptors().ptr());
6962 d->AddBaseObject(Object::empty_exception_handlers().ptr());
6963 d->AddBaseObject(Object::empty_async_exception_handlers().ptr());
6964
6965 for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
6966 d->AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
6967 }
6968 for (intptr_t i = 0; i < ICData::kCachedICDataArrayCount; i++) {
6969 d->AddBaseObject(ICData::cached_icdata_arrays_[i]);
6970 }
6971
6972 ClassTable* table = d->isolate_group()->class_table();
6974 cid++) {
6975 // Error, CallSiteData has no class object.
6976 if (cid != kErrorCid && cid != kCallSiteDataCid) {
6977 ASSERT(table->HasValidClassAt(cid));
6978 d->AddBaseObject(table->At(cid));
6979 }
6980 }
6981 d->AddBaseObject(table->At(kDynamicCid));
6982 d->AddBaseObject(table->At(kVoidCid));
6983
6984 if (!Snapshot::IncludesCode(d->kind())) {
6985 for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
6986 d->AddBaseObject(StubCode::EntryAt(i).ptr());
6987 }
6988 }
6989 }
SI F table(const skcms_Curve *curve, F v)
static const Bool & False()
Definition: object.h:10799
static const Bool & True()
Definition: object.h:10797
@ kCachedICDataArrayCount
Definition: object.h:2776
static ObjectPtr null()
Definition: object.h:433
ObjectPtr ptr() const
Definition: object.h:332
static bool IncludesCode(Kind kind)
Definition: snapshot.h:67
static const Code & EntryAt(intptr_t index)
Definition: stub_code.h:101
static intptr_t NumEntries()
Definition: stub_code.h:107
#define ASSERT(E)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
@ kVoidCid
Definition: class_id.h:254
@ kDynamicCid
Definition: class_id.h:253
constexpr intptr_t kFirstInternalOnlyCid
Definition: class_id.h:288
const intptr_t cid
constexpr intptr_t kLastInternalOnlyCid
Definition: class_id.h:289

◆ PostLoad()

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

Implements dart::DeserializationRoots.

Definition at line 7006 of file app_snapshot.cc.

7006 {
7007 // Move remaining bump allocation space to the freelist so it used by C++
7008 // allocations (e.g., FinalizeVMIsolate) before allocating new pages.
7009 d->heap()->old_space()->ReleaseBumpAllocation();
7010
7011 if (!symbol_table_.IsNull()) {
7012 Symbols::InitFromSnapshot(d->isolate_group());
7013 }
7014
7016 }
static void set_vm_isolate_snapshot_object_table(const Array &table)
Definition: object.cc:1601
bool IsNull() const
Definition: object.h:363
static void InitFromSnapshot(IsolateGroup *isolate_group)
Definition: symbols.cc:127

◆ ReadRoots()

void dart::VMDeserializationRoots::ReadRoots ( Deserializer d)
inlineoverridevirtual

Implements dart::DeserializationRoots.

Definition at line 6991 of file app_snapshot.cc.

6991 {
6992 symbol_table_ ^= d->ReadRef();
6993 if (!symbol_table_.IsNull()) {
6994 d->isolate_group()->object_store()->set_symbol_table(symbol_table_);
6995 }
6996 if (Snapshot::IncludesCode(d->kind())) {
6997 for (intptr_t i = 0; i < StubCode::NumEntries(); i++) {
6998 Code* code = Code::ReadOnlyHandle();
6999 *code ^= d->ReadRef();
7001 }
7003 }
7004 }
static Object * ReadOnlyHandle()
Definition: object.h:431
static void InitializationDone()
Definition: stub_code.h:44
static void EntryAtPut(intptr_t index, Code *entry)
Definition: stub_code.h:102

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