Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::V8SnapshotProfileWriter::ObjectId Struct Reference

#include <v8_snapshot_writer.h>

Public Member Functions

 ObjectId ()
 
 ObjectId (IdSpace space, int64_t nonce)
 
bool operator!= (const ObjectId &other) const
 
bool operator== (const ObjectId &other) const
 
uword Hash () const
 
int64_t nonce () const
 
IdSpace space () const
 
bool IsArtificial () const
 
const char * ToCString (Zone *zone) const
 
void Write (JSONWriter *writer, const char *property=nullptr) const
 
void WriteDebug (JSONWriter *writer, const char *property=nullptr) const
 

Detailed Description

Definition at line 32 of file v8_snapshot_writer.h.

Constructor & Destructor Documentation

◆ ObjectId() [1/2]

dart::V8SnapshotProfileWriter::ObjectId::ObjectId ( )
inline

◆ ObjectId() [2/2]

dart::V8SnapshotProfileWriter::ObjectId::ObjectId ( IdSpace  space,
int64_t  nonce 
)
inline

Definition at line 34 of file v8_snapshot_writer.h.

35 : encoded_((static_cast<uint64_t>(nonce) << kIdSpaceBits) |
36 static_cast<intptr_t>(space)) {
37 ASSERT(Utils::IsInt(kBitsPerInt64 - kIdSpaceBits, nonce));
38 }
static bool IsInt(intptr_t N, T value)
Definition utils.h:298
#define ASSERT(E)
constexpr intptr_t kBitsPerInt64
Definition globals.h:467

Member Function Documentation

◆ Hash()

uword dart::V8SnapshotProfileWriter::ObjectId::Hash ( ) const
inline

Definition at line 47 of file v8_snapshot_writer.h.

47{ return Utils::WordHash(encoded_); }
static uint32_t WordHash(intptr_t key)
Definition utils.cc:217

◆ IsArtificial()

bool dart::V8SnapshotProfileWriter::ObjectId::IsArtificial ( ) const
inline

Definition at line 52 of file v8_snapshot_writer.h.

52{ return space() == IdSpace::kArtificial; }

◆ nonce()

int64_t dart::V8SnapshotProfileWriter::ObjectId::nonce ( ) const
inline

Definition at line 48 of file v8_snapshot_writer.h.

48{ return encoded_ >> kIdSpaceBits; }

◆ operator!=()

bool dart::V8SnapshotProfileWriter::ObjectId::operator!= ( const ObjectId other) const
inline

Definition at line 40 of file v8_snapshot_writer.h.

40 {
41 return encoded_ != other.encoded_;
42 }

◆ operator==()

bool dart::V8SnapshotProfileWriter::ObjectId::operator== ( const ObjectId other) const
inline

Definition at line 43 of file v8_snapshot_writer.h.

43 {
44 return !(*this != other);
45 }

◆ space()

IdSpace dart::V8SnapshotProfileWriter::ObjectId::space ( ) const
inline

Definition at line 49 of file v8_snapshot_writer.h.

49 {
50 return static_cast<IdSpace>(encoded_ & kIdSpaceMask);
51 }

◆ ToCString()

const char * dart::V8SnapshotProfileWriter::ObjectId::ToCString ( Zone zone) const

◆ Write()

void dart::V8SnapshotProfileWriter::ObjectId::Write ( JSONWriter writer,
const char *  property = nullptr 
) const

◆ WriteDebug()

void dart::V8SnapshotProfileWriter::ObjectId::WriteDebug ( JSONWriter writer,
const char *  property = nullptr 
) const

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