Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 6083 of file object.h.

Constructor & Destructor Documentation

◆ Iterator()

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

Definition at line 6085 of file object.h.

6086 : descriptors_(descriptors),
6087 kind_mask_(kind_mask),
6088 byte_index_(0),
6089 cur_pc_offset_(0),
6090 cur_kind_(0),
6091 cur_deopt_id_(0),
6092 cur_token_pos_(0),
6093 cur_try_index_(0),
static constexpr intptr_t kInvalidYieldIndex

Member Function Documentation

◆ DeoptId()

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

Definition at line 6128 of file object.h.

6128{ return cur_deopt_id_; }

◆ Kind()

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

Definition at line 6134 of file object.h.

6134 {
6135 return static_cast<UntaggedPcDescriptors::Kind>(cur_kind_);
6136 }

◆ MoveNext()

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

Definition at line 6096 of file object.h.

6096 {
6097 NoSafepointScope scope;
6098 ReadStream stream(descriptors_.untag()->data(), descriptors_.Length(),
6099 byte_index_);
6100 // Moves to record that matches kind_mask_.
6101 while (byte_index_ < descriptors_.Length()) {
6102 const int32_t kind_and_metadata = stream.ReadSLEB128<int32_t>();
6104 kind_and_metadata);
6106 kind_and_metadata);
6107 cur_yield_index_ =
6109 kind_and_metadata);
6110
6111 cur_pc_offset_ += stream.ReadSLEB128();
6112
6113 if (!FLAG_precompiled_mode) {
6114 cur_deopt_id_ += stream.ReadSLEB128();
6115 cur_token_pos_ = Utils::AddWithWrapAround(
6116 cur_token_pos_, stream.ReadSLEB128<int32_t>());
6117 }
6118 byte_index_ = stream.Position();
6119
6120 if ((cur_kind_ & kind_mask_) != 0) {
6121 return true; // Current is valid.
6122 }
6123 }
6124 return false;
6125 }
intptr_t Length() const
Definition object.cc:15826
static intptr_t DecodeKind(uint32_t kind_and_metadata)
static intptr_t DecodeYieldIndex(uint32_t kind_and_metadata)
static intptr_t DecodeTryIndex(uint32_t kind_and_metadata)
static T AddWithWrapAround(T a, T b)
Definition utils.h:416

◆ PcOffset()

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

Definition at line 6127 of file object.h.

6127{ return cur_pc_offset_; }

◆ TokenPos()

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

Definition at line 6129 of file object.h.

6129 {
6130 return TokenPosition::Deserialize(cur_token_pos_);
6131 }
static TokenPosition Deserialize(int32_t value)

◆ TryIndex()

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

Definition at line 6132 of file object.h.

6132{ return cur_try_index_; }

◆ YieldIndex()

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

Definition at line 6133 of file object.h.

6133{ return cur_yield_index_; }

Friends And Related Symbol Documentation

◆ PcDescriptors

friend class PcDescriptors
friend

Definition at line 6139 of file object.h.


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