Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dart::CatchEntryMove Class Reference

#include <exceptions.h>

Public Types

enum class  SourceKind {
  kConstant , kTaggedSlot , kFloatSlot , kDoubleSlot ,
  kFloat32x4Slot , kFloat64x2Slot , kInt32x4Slot , kInt64PairSlot ,
  kInt64Slot , kInt32Slot , kUint32Slot
}
 

Public Member Functions

 CatchEntryMove ()
 
SourceKind source_kind () const
 
intptr_t src_slot () const
 
intptr_t src_lo_slot () const
 
intptr_t src_hi_slot () const
 
intptr_t dest_slot () const
 
bool IsRedundant () const
 
bool operator== (const CatchEntryMove &rhs) const
 
void WriteTo (BaseWriteStream *stream)
 
const char * ToCString () const
 

Static Public Member Functions

static CatchEntryMove FromConstant (intptr_t pool_id, intptr_t dest_slot)
 
static CatchEntryMove FromSlot (SourceKind kind, intptr_t src_slot, intptr_t dest_slot)
 
static intptr_t EncodePairSource (intptr_t src_lo_slot, intptr_t src_hi_slot)
 
static CatchEntryMove ReadFrom (ReadStream *stream)
 

Detailed Description

Definition at line 139 of file exceptions.h.

Member Enumeration Documentation

◆ SourceKind

Enumerator
kConstant 
kTaggedSlot 
kFloatSlot 
kDoubleSlot 
kFloat32x4Slot 
kFloat64x2Slot 
kInt32x4Slot 
kInt64PairSlot 
kInt64Slot 
kInt32Slot 
kUint32Slot 

Definition at line 147 of file exceptions.h.

Constructor & Destructor Documentation

◆ CatchEntryMove()

dart::CatchEntryMove::CatchEntryMove ( )
inline

Definition at line 141 of file exceptions.h.

142 : src_(0),
143 dest_and_kind_(static_cast<intptr_t>(SourceKind::kTaggedSlot)) {
145 }
bool IsRedundant() const
Definition exceptions.h:201
#define ASSERT(E)

Member Function Documentation

◆ dest_slot()

intptr_t dart::CatchEntryMove::dest_slot ( ) const
inline

Definition at line 180 of file exceptions.h.

180 {
181 return dest_and_kind_ >> SourceKindField::bitsize();
182 }
static constexpr int bitsize()
Definition bitfield.h:164

◆ EncodePairSource()

static intptr_t dart::CatchEntryMove::EncodePairSource ( intptr_t  src_lo_slot,
intptr_t  src_hi_slot 
)
inlinestatic

Definition at line 196 of file exceptions.h.

196 {
197 return LoSourceSlot::encode(pair_slot_to_index(src_lo_slot)) |
198 HiSourceSlot::encode(pair_slot_to_index(src_hi_slot));
199 }
static constexpr S encode(T value)
Definition bitfield.h:167
intptr_t src_hi_slot() const
Definition exceptions.h:175
intptr_t src_lo_slot() const
Definition exceptions.h:170

◆ FromConstant()

static CatchEntryMove dart::CatchEntryMove::FromConstant ( intptr_t  pool_id,
intptr_t  dest_slot 
)
inlinestatic

Definition at line 184 of file exceptions.h.

184 {
185 return FromSlot(SourceKind::kConstant, pool_id, dest_slot);
186 }
intptr_t dest_slot() const
Definition exceptions.h:180
static CatchEntryMove FromSlot(SourceKind kind, intptr_t src_slot, intptr_t dest_slot)
Definition exceptions.h:188

◆ FromSlot()

static CatchEntryMove dart::CatchEntryMove::FromSlot ( SourceKind  kind,
intptr_t  src_slot,
intptr_t  dest_slot 
)
inlinestatic

Definition at line 188 of file exceptions.h.

190 {
192 (static_cast<uintptr_t>(dest_slot)
194 }
intptr_t src_slot() const
Definition exceptions.h:165

◆ IsRedundant()

bool dart::CatchEntryMove::IsRedundant ( ) const
inline

Definition at line 201 of file exceptions.h.

201 {
202 return (source_kind() == SourceKind::kTaggedSlot) &&
203 (dest_slot() == src_slot());
204 }
SourceKind source_kind() const
Definition exceptions.h:161

◆ operator==()

bool dart::CatchEntryMove::operator== ( const CatchEntryMove rhs) const
inline

Definition at line 206 of file exceptions.h.

206 {
207 return src_ == rhs.src_ && dest_and_kind_ == rhs.dest_and_kind_;
208 }

◆ ReadFrom()

CatchEntryMove dart::CatchEntryMove::ReadFrom ( ReadStream stream)
static

Definition at line 365 of file exceptions.cc.

365 {
366 using Reader = ReadStream::Raw<sizeof(int32_t), int32_t>;
367 const int32_t src = Reader::Read(stream);
368 const int32_t dest_and_kind = Reader::Read(stream);
369 return CatchEntryMove(src, dest_and_kind);
370}

◆ source_kind()

SourceKind dart::CatchEntryMove::source_kind ( ) const
inline

Definition at line 161 of file exceptions.h.

161 {
162 return SourceKindField::decode(dest_and_kind_);
163 }
static constexpr T decode(S value)
Definition bitfield.h:173

◆ src_hi_slot()

intptr_t dart::CatchEntryMove::src_hi_slot ( ) const
inline

Definition at line 175 of file exceptions.h.

175 {
177 return index_to_pair_slot(HiSourceSlot::decode(src_));
178 }

◆ src_lo_slot()

intptr_t dart::CatchEntryMove::src_lo_slot ( ) const
inline

Definition at line 170 of file exceptions.h.

170 {
172 return index_to_pair_slot(LoSourceSlot::decode(src_));
173 }

◆ src_slot()

intptr_t dart::CatchEntryMove::src_slot ( ) const
inline

Definition at line 165 of file exceptions.h.

165 {
167 return src_;
168 }

◆ ToCString()

const char * dart::CatchEntryMove::ToCString ( ) const

Definition at line 389 of file exceptions.cc.

389 {
390 char from[256];
391
392 switch (source_kind()) {
394 Utils::SNPrint(from, ARRAY_SIZE(from), "pp[%" Pd "]",
396 break;
397
399 Utils::SNPrint(from, ARRAY_SIZE(from), "fp[%" Pd "]",
401 break;
402
404 Utils::SNPrint(from, ARRAY_SIZE(from), "f32 [fp%+" Pd "]",
406 break;
407
409 Utils::SNPrint(from, ARRAY_SIZE(from), "f64 [fp%+" Pd "]",
411 break;
412
414 Utils::SNPrint(from, ARRAY_SIZE(from), "f32x4 [fp%+" Pd "]",
416 break;
417
419 Utils::SNPrint(from, ARRAY_SIZE(from), "f64x2 [fp%+" Pd "]",
421 break;
422
424 Utils::SNPrint(from, ARRAY_SIZE(from), "i32x4 [fp%+" Pd "]",
426 break;
427
429 Utils::SNPrint(from, ARRAY_SIZE(from), "i64 ([fp%+" Pd "], [fp%+" Pd "])",
432 break;
433
435 Utils::SNPrint(from, ARRAY_SIZE(from), "i64 [fp%+" Pd "]",
437 break;
438
440 Utils::SNPrint(from, ARRAY_SIZE(from), "i32 [fp%+" Pd "]",
442 break;
443
445 Utils::SNPrint(from, ARRAY_SIZE(from), "u32 [fp + %" Pd "]",
447 break;
448
449 default:
450 UNREACHABLE();
451 }
452
454 "fp[%+" Pd "] <- %s", SlotIndexToFrameIndex(dest_slot()), from);
455}
#define UNREACHABLE()
Definition assert.h:248
Zone * zone() const
static Thread * Current()
Definition thread.h:361
static int SNPrint(char *str, size_t size, const char *format,...) PRINTF_ATTRIBUTE(3
char * PrintToString(const char *format,...) PRINTF_ATTRIBUTE(2
Definition zone.cc:313
static intptr_t SlotIndexToFrameIndex(intptr_t slot)
static intptr_t SlotIndexToFpRelativeOffset(intptr_t slot)
#define Pd
Definition globals.h:408
#define ARRAY_SIZE(array)
Definition globals.h:72

◆ WriteTo()

void dart::CatchEntryMove::WriteTo ( BaseWriteStream stream)

Definition at line 373 of file exceptions.cc.

373 {
374 using Writer = BaseWriteStream::Raw<sizeof(int32_t), int32_t>;
375 Writer::Write(stream, src_);
376 Writer::Write(stream, dest_and_kind_);
377}

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