Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::CatchEntryMovesMapReader Class Reference

#include <exceptions.h>

Inheritance diagram for dart::CatchEntryMovesMapReader:
dart::ValueObject

Public Member Functions

 CatchEntryMovesMapReader (const TypedData &bytes)
 
CatchEntryMovesReadMovesForPcOffset (intptr_t pc_offset)
 
void PrintEntries ()
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Detailed Description

Definition at line 283 of file exceptions.h.

Constructor & Destructor Documentation

◆ CatchEntryMovesMapReader()

dart::CatchEntryMovesMapReader::CatchEntryMovesMapReader ( const TypedData bytes)
inlineexplicit

Definition at line 285 of file exceptions.h.

285: bytes_(bytes) {}

Member Function Documentation

◆ PrintEntries()

void dart::CatchEntryMovesMapReader::PrintEntries ( )

Definition at line 457 of file exceptions.cc.

457 {
458 NoSafepointScope no_safepoint;
459
460 using Reader = ReadStream::Raw<sizeof(intptr_t), intptr_t>;
461
462 ReadStream stream(static_cast<uint8_t*>(bytes_.DataAddr(0)), bytes_.Length());
463
464 while (stream.PendingBytes() > 0) {
465 const intptr_t stream_position = stream.Position();
466 const intptr_t target_pc_offset = Reader::Read(&stream);
467 const intptr_t prefix_length = Reader::Read(&stream);
468 const intptr_t suffix_length = Reader::Read(&stream);
469 const intptr_t length = prefix_length + suffix_length;
470 Reader::Read(&stream); // Skip suffix_offset
471 for (intptr_t j = 0; j < prefix_length; j++) {
473 }
474
475 ReadStream inner_stream(static_cast<uint8_t*>(bytes_.DataAddr(0)),
476 bytes_.Length());
477 CatchEntryMoves* moves = ReadCompressedCatchEntryMovesSuffix(
478 &inner_stream, stream_position, length);
479 THR_Print(" [code+0x%08" Px "]: (% " Pd " moves)\n", target_pc_offset,
480 moves->count());
481 for (intptr_t i = 0; i < moves->count(); i++) {
482 THR_Print(" %s\n", moves->At(i).ToCString());
483 }
485 }
486}
static CatchEntryMove ReadFrom(ReadStream *stream)
Definition: exceptions.cc:365
static void Free(const CatchEntryMoves *moves)
Definition: exceptions.h:261
intptr_t Length() const
Definition: object.h:11518
void * DataAddr(intptr_t byte_offset) const
Definition: object.h:11571
#define THR_Print(format,...)
Definition: log.h:20
size_t length
SK_API bool Read(SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
#define Px
Definition: globals.h:410
#define Pd
Definition: globals.h:408

◆ ReadMovesForPcOffset()

CatchEntryMoves * dart::CatchEntryMovesMapReader::ReadMovesForPcOffset ( intptr_t  pc_offset)

Definition at line 489 of file exceptions.cc.

490 {
491 NoSafepointScope no_safepoint;
492
493 ReadStream stream(static_cast<uint8_t*>(bytes_.DataAddr(0)), bytes_.Length());
494
495 intptr_t position = 0;
496 intptr_t length = 0;
497 FindEntryForPc(&stream, pc_offset, &position, &length);
498
499 return ReadCompressedCatchEntryMovesSuffix(&stream, position, length);
500}

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