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

Public Member Functions

 ClassMessageDeserializationCluster ()
 
 ~ClassMessageDeserializationCluster ()
 
void ReadNodes (MessageDeserializer *d)
 
void ReadNodesApi (ApiMessageDeserializer *d)
 
- Public Member Functions inherited from dart::MessageDeserializationCluster
 MessageDeserializationCluster (const char *name, bool is_canonical=false)
 
virtual ~MessageDeserializationCluster ()
 
virtual void ReadNodes (MessageDeserializer *d)=0
 
virtual void ReadEdges (MessageDeserializer *d)
 
virtual ObjectPtr PostLoad (MessageDeserializer *d)
 
virtual void ReadNodesApi (ApiMessageDeserializer *d)
 
virtual void ReadEdgesApi (ApiMessageDeserializer *d)
 
virtual void PostLoadApi (ApiMessageDeserializer *d)
 
void ReadNodesWrapped (MessageDeserializer *d)
 
void ReadNodesWrappedApi (ApiMessageDeserializer *d)
 
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::MessageDeserializationCluster
ObjectPtr PostLoadAbstractType (MessageDeserializer *d)
 
ObjectPtr PostLoadLinkedHash (MessageDeserializer *d)
 
 DISALLOW_COPY_AND_ASSIGN (MessageDeserializationCluster)
 
- Protected Attributes inherited from dart::MessageDeserializationCluster
const char *const name_
 
const bool is_canonical_
 
intptr_t start_index_
 
intptr_t stop_index_
 

Detailed Description

Definition at line 539 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ ClassMessageDeserializationCluster()

dart::ClassMessageDeserializationCluster::ClassMessageDeserializationCluster ( )
inline

Definition at line 542 of file message_snapshot.cc.

MessageDeserializationCluster(const char *name, bool is_canonical=false)

◆ ~ClassMessageDeserializationCluster()

dart::ClassMessageDeserializationCluster::~ClassMessageDeserializationCluster ( )
inline

Definition at line 544 of file message_snapshot.cc.

544{}

Member Function Documentation

◆ ReadNodes()

void dart::ClassMessageDeserializationCluster::ReadNodes ( MessageDeserializer d)
inlinevirtual

Implements dart::MessageDeserializationCluster.

Definition at line 546 of file message_snapshot.cc.

546 {
547 auto* class_table = d->isolate_group()->class_table();
548 String& uri = String::Handle(d->zone());
549 Library& lib = Library::Handle(d->zone());
550 String& name = String::Handle(d->zone());
551 Class& cls = Class::Handle(d->zone());
552 intptr_t count = d->ReadUnsigned();
553 for (intptr_t i = 0; i < count; i++) {
554 intptr_t cid = d->ReadUnsigned();
555 if (cid != 0) {
556 cls = class_table->At(cid);
557 } else {
558 uri = String::New(d->ReadAscii()); // Library URI.
559 name = String::New(d->ReadAscii()); // Class name.
560 lib = Library::LookupLibrary(d->thread(), uri);
561 if (UNLIKELY(lib.IsNull())) {
562 FATAL("Not found: %s %s\n", uri.ToCString(), name.ToCString());
563 }
564 if (name.Equals(Symbols::TopLevel())) {
565 cls = lib.toplevel_class();
566 } else {
567 cls = lib.LookupClass(name);
568 }
569 if (UNLIKELY(cls.IsNull())) {
570 FATAL("Not found: %s %s\n", uri.ToCString(), name.ToCString());
571 }
572 cls.EnsureIsFinalized(d->thread());
573 }
574 d->AssignRef(cls.ptr());
575 }
576 }
int count
Definition: FontMgrTest.cpp:50
static LibraryPtr LookupLibrary(Thread *thread, const String &url)
Definition: object.cc:14599
static Object & Handle()
Definition: object.h:407
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
Definition: object.cc:23698
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
#define FATAL(error)
const intptr_t cid
#define UNLIKELY(cond)
Definition: globals.h:261

◆ ReadNodesApi()

void dart::ClassMessageDeserializationCluster::ReadNodesApi ( ApiMessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 578 of file message_snapshot.cc.

578 {
579 intptr_t count = d->ReadUnsigned();
580 for (intptr_t i = 0; i < count; i++) {
581 intptr_t cid = d->ReadUnsigned();
582 if (cid == 0) {
583 d->ReadAscii(); // Library URI.
584 d->ReadAscii(); // Class name.
585 }
586 d->AssignRef(nullptr);
587 }
588 }

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