Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Public Attributes | List of all members
dart::kernel::LibraryDependencyHelper Class Reference

#include <kernel_translation_helper.h>

Public Types

enum  Field {
  kFileOffset , kFlags , kAnnotations , kTargetLibrary ,
  kName , kCombinators , kEnd
}
 
enum  Flag { Export = 1 << 0 , Deferred = 1 << 1 }
 
enum  CombinatorFlag { Show = 1 << 0 }
 

Public Member Functions

 LibraryDependencyHelper (KernelReaderHelper *helper)
 
void ReadUntilIncluding (Field field)
 
void ReadUntilExcluding (Field field)
 

Public Attributes

uint8_t flags_ = 0
 
StringIndex name_index_
 
NameIndex target_library_canonical_name_
 
intptr_t annotation_count_ = 0
 

Detailed Description

Definition at line 891 of file kernel_translation_helper.h.

Member Enumeration Documentation

◆ CombinatorFlag

Enumerator
Show 

Definition at line 908 of file kernel_translation_helper.h.

◆ Field

◆ Flag

Enumerator
Export 
Deferred 

Definition at line 903 of file kernel_translation_helper.h.

Constructor & Destructor Documentation

◆ LibraryDependencyHelper()

dart::kernel::LibraryDependencyHelper::LibraryDependencyHelper ( KernelReaderHelper helper)
inlineexplicit

Definition at line 912 of file kernel_translation_helper.h.

913 : helper_(helper), next_read_(kFileOffset) {}

Member Function Documentation

◆ ReadUntilExcluding()

void dart::kernel::LibraryDependencyHelper::ReadUntilExcluding ( Field  field)

Definition at line 1488 of file kernel_translation_helper.cc.

1488 {
1489 if (field <= next_read_) return;
1490
1491 // Ordered with fall-through.
1492 switch (next_read_) {
1493 case kFileOffset: {
1494 helper_->ReadPosition();
1495 if (++next_read_ == field) return;
1497 }
1498 case kFlags: {
1499 flags_ = helper_->ReadFlags();
1500 if (++next_read_ == field) return;
1502 }
1503 case kAnnotations: {
1504 annotation_count_ = helper_->ReadListLength();
1505 for (intptr_t i = 0; i < annotation_count_; ++i) {
1506 helper_->SkipExpression(); // read ith expression.
1507 }
1508 if (++next_read_ == field) return;
1509 }
1511 case kTargetLibrary: {
1513 if (++next_read_ == field) return;
1514 }
1516 case kName: {
1517 name_index_ = helper_->ReadStringReference();
1518 if (++next_read_ == field) return;
1519 }
1521 case kCombinators: {
1522 intptr_t count = helper_->ReadListLength();
1523 for (intptr_t i = 0; i < count; ++i) {
1524 // Skip flags
1525 helper_->SkipBytes(1);
1526 // Skip list of names.
1527 helper_->SkipListOfStrings();
1528 }
1529 if (++next_read_ == field) return;
1530 }
1532 case kEnd:
1533 return;
1534 }
1535}
int count
Definition: FontMgrTest.cpp:50
#define FALL_THROUGH
Definition: globals.h:15

◆ ReadUntilIncluding()

void dart::kernel::LibraryDependencyHelper::ReadUntilIncluding ( Field  field)
inline

Definition at line 915 of file kernel_translation_helper.h.

915 {
916 ReadUntilExcluding(static_cast<Field>(static_cast<int>(field) + 1));
917 }

Member Data Documentation

◆ annotation_count_

intptr_t dart::kernel::LibraryDependencyHelper::annotation_count_ = 0

Definition at line 924 of file kernel_translation_helper.h.

◆ flags_

uint8_t dart::kernel::LibraryDependencyHelper::flags_ = 0

Definition at line 921 of file kernel_translation_helper.h.

◆ name_index_

StringIndex dart::kernel::LibraryDependencyHelper::name_index_

Definition at line 922 of file kernel_translation_helper.h.

◆ target_library_canonical_name_

NameIndex dart::kernel::LibraryDependencyHelper::target_library_canonical_name_

Definition at line 923 of file kernel_translation_helper.h.


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