Flutter Engine
The Flutter Engine
Public Member Functions | Friends | List of all members
dart::PcDescriptors::Iterator Class Reference

#include <object.h>

Inheritance diagram for dart::PcDescriptors::Iterator:
dart::ValueObject

Public Member Functions

 Iterator (const PcDescriptors &descriptors, intptr_t kind_mask)
 
bool MoveNext ()
 
uword PcOffset () const
 
intptr_t DeoptId () const
 
TokenPosition TokenPos () const
 
intptr_t TryIndex () const
 
intptr_t YieldIndex () const
 
UntaggedPcDescriptors::Kind Kind () const
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Friends

class PcDescriptors
 

Detailed Description

Definition at line 6110 of file object.h.

Constructor & Destructor Documentation

◆ Iterator()

dart::PcDescriptors::Iterator::Iterator ( const PcDescriptors descriptors,
intptr_t  kind_mask 
)
inline

Definition at line 6112 of file object.h.

6113 : descriptors_(descriptors),
6114 kind_mask_(kind_mask),
6115 byte_index_(0),
6116 cur_pc_offset_(0),
6117 cur_kind_(0),
6118 cur_deopt_id_(0),
6119 cur_token_pos_(0),
6120 cur_try_index_(0),
static constexpr intptr_t kInvalidYieldIndex
Definition: raw_object.h:2081

Member Function Documentation

◆ DeoptId()

intptr_t dart::PcDescriptors::Iterator::DeoptId ( ) const
inline

Definition at line 6155 of file object.h.

6155{ return cur_deopt_id_; }

◆ Kind()

UntaggedPcDescriptors::Kind dart::PcDescriptors::Iterator::Kind ( ) const
inline

Definition at line 6161 of file object.h.

6161 {
6162 return static_cast<UntaggedPcDescriptors::Kind>(cur_kind_);
6163 }

◆ MoveNext()

bool dart::PcDescriptors::Iterator::MoveNext ( )
inline

Definition at line 6123 of file object.h.

6123 {
6124 NoSafepointScope scope;
6125 ReadStream stream(descriptors_.untag()->data(), descriptors_.Length(),
6126 byte_index_);
6127 // Moves to record that matches kind_mask_.
6128 while (byte_index_ < descriptors_.Length()) {
6129 const int32_t kind_and_metadata = stream.ReadSLEB128<int32_t>();
6131 kind_and_metadata);
6133 kind_and_metadata);
6134 cur_yield_index_ =
6136 kind_and_metadata);
6137
6138 cur_pc_offset_ += stream.ReadSLEB128();
6139
6140 if (!FLAG_precompiled_mode) {
6141 cur_deopt_id_ += stream.ReadSLEB128();
6142 cur_token_pos_ = Utils::AddWithWrapAround(
6143 cur_token_pos_, stream.ReadSLEB128<int32_t>());
6144 }
6145 byte_index_ = stream.Position();
6146
6147 if ((cur_kind_ & kind_mask_) != 0) {
6148 return true; // Current is valid.
6149 }
6150 }
6151 return false;
6152 }
intptr_t Length() const
Definition: object.cc:15779
static intptr_t DecodeKind(uint32_t kind_and_metadata)
Definition: raw_object.h:2095
static intptr_t DecodeYieldIndex(uint32_t kind_and_metadata)
Definition: raw_object.h:2103
static intptr_t DecodeTryIndex(uint32_t kind_and_metadata)
Definition: raw_object.h:2099
static T AddWithWrapAround(T a, T b)
Definition: utils.h:431

◆ PcOffset()

uword dart::PcDescriptors::Iterator::PcOffset ( ) const
inline

Definition at line 6154 of file object.h.

6154{ return cur_pc_offset_; }

◆ TokenPos()

TokenPosition dart::PcDescriptors::Iterator::TokenPos ( ) const
inline

Definition at line 6156 of file object.h.

6156 {
6157 return TokenPosition::Deserialize(cur_token_pos_);
6158 }
static TokenPosition Deserialize(int32_t value)

◆ TryIndex()

intptr_t dart::PcDescriptors::Iterator::TryIndex ( ) const
inline

Definition at line 6159 of file object.h.

6159{ return cur_try_index_; }

◆ YieldIndex()

intptr_t dart::PcDescriptors::Iterator::YieldIndex ( ) const
inline

Definition at line 6160 of file object.h.

6160{ return cur_yield_index_; }

Friends And Related Function Documentation

◆ PcDescriptors

friend class PcDescriptors
friend

Definition at line 6166 of file object.h.


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