v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::SerializedCodeData Class Reference

#include <code-serializer.h>

Inheritance diagram for v8::internal::SerializedCodeData:
Collaboration diagram for v8::internal::SerializedCodeData:

Public Member Functions

 SerializedCodeData (const std::vector< uint8_t > *payload, const CodeSerializer *cs)
 
AlignedCachedDataGetScriptData ()
 
base::Vector< const uint8_t > Payload () const
 
- Public Member Functions inherited from v8::internal::SerializedData
 SerializedData (uint8_t *data, int size)
 
 SerializedData ()
 
 SerializedData (SerializedData &&other) V8_NOEXCEPT
 
 SerializedData (const SerializedData &)=delete
 
SerializedDataoperator= (const SerializedData &)=delete
 
virtual ~SerializedData ()
 
uint32_t GetMagicNumber () const
 

Static Public Member Functions

static SerializedCodeData FromCachedData (Isolate *isolate, AlignedCachedData *cached_data, uint32_t expected_source_hash, SerializedCodeSanityCheckResult *rejection_result)
 
static SerializedCodeData FromCachedDataWithoutSource (LocalIsolate *local_isolate, AlignedCachedData *cached_data, SerializedCodeSanityCheckResult *rejection_result)
 
static SerializedCodeData FromPartiallySanityCheckedCachedData (AlignedCachedData *cached_data, uint32_t expected_source_hash, SerializedCodeSanityCheckResult *rejection_result)
 
static uint32_t SourceHash (DirectHandle< String > source, DirectHandle< FixedArray > wrapped_arguments, ScriptOriginOptions origin_options)
 

Static Public Attributes

static const uint32_t kVersionHashOffset = kMagicNumberOffset + kUInt32Size
 
static const uint32_t kSourceHashOffset = kVersionHashOffset + kUInt32Size
 
static const uint32_t kFlagHashOffset = kSourceHashOffset + kUInt32Size
 
static const uint32_t kReadOnlySnapshotChecksumOffset
 
static const uint32_t kPayloadLengthOffset
 
static const uint32_t kChecksumOffset = kPayloadLengthOffset + kUInt32Size
 
static const uint32_t kUnalignedHeaderSize = kChecksumOffset + kUInt32Size
 
static const uint32_t kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)
 
- Static Public Attributes inherited from v8::internal::SerializedData
static constexpr uint32_t kMagicNumberOffset = 0
 
static constexpr uint32_t kMagicNumber
 

Private Member Functions

 SerializedCodeData (AlignedCachedData *data)
 
 SerializedCodeData (const uint8_t *data, int size)
 
base::Vector< const uint8_t > ChecksummedContent () const
 
SerializedCodeSanityCheckResult SanityCheck (uint32_t expected_ro_snapshot_checksum, uint32_t expected_source_hash) const
 
SerializedCodeSanityCheckResult SanityCheckJustSource (uint32_t expected_source_hash) const
 
SerializedCodeSanityCheckResult SanityCheckWithoutSource (uint32_t expected_ro_snapshot_checksum) const
 

Additional Inherited Members

- Public Types inherited from v8::internal::SerializedData
using ChunkSizeBits = base::BitField<uint32_t, 0, 31>
 
using IsLastChunkBits = base::BitField<bool, 31, 1>
 
- Protected Member Functions inherited from v8::internal::SerializedData
void SetHeaderValue (uint32_t offset, uint32_t value)
 
uint32_t GetHeaderValue (uint32_t offset) const
 
void AllocateData (uint32_t size)
 
void SetMagicNumber ()
 
- Protected Attributes inherited from v8::internal::SerializedData
uint8_t * data_
 
uint32_t size_
 
bool owns_data_
 

Detailed Description

Definition at line 115 of file code-serializer.h.

Constructor & Destructor Documentation

◆ SerializedCodeData() [1/3]

v8::internal::SerializedCodeData::SerializedCodeData ( const std::vector< uint8_t > * payload,
const CodeSerializer * cs )

Definition at line 728 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SerializedCodeData() [2/3]

v8::internal::SerializedCodeData::SerializedCodeData ( AlignedCachedData * data)
explicitprivate

Definition at line 851 of file code-serializer.cc.

◆ SerializedCodeData() [3/3]

v8::internal::SerializedCodeData::SerializedCodeData ( const uint8_t * data,
int size )
inlineprivate

Definition at line 161 of file code-serializer.h.

Member Function Documentation

◆ ChecksummedContent()

base::Vector< const uint8_t > v8::internal::SerializedCodeData::ChecksummedContent ( ) const
inlineprivate

Definition at line 164 of file code-serializer.h.

◆ FromCachedData()

SerializedCodeData v8::internal::SerializedCodeData::FromCachedData ( Isolate * isolate,
AlignedCachedData * cached_data,
uint32_t expected_source_hash,
SerializedCodeSanityCheckResult * rejection_result )
static

Definition at line 854 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromCachedDataWithoutSource()

SerializedCodeData v8::internal::SerializedCodeData::FromCachedDataWithoutSource ( LocalIsolate * local_isolate,
AlignedCachedData * cached_data,
SerializedCodeSanityCheckResult * rejection_result )
static

Definition at line 870 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FromPartiallySanityCheckedCachedData()

SerializedCodeData v8::internal::SerializedCodeData::FromPartiallySanityCheckedCachedData ( AlignedCachedData * cached_data,
uint32_t expected_source_hash,
SerializedCodeSanityCheckResult * rejection_result )
static

Definition at line 885 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetScriptData()

AlignedCachedData * v8::internal::SerializedCodeData::GetScriptData ( )

Definition at line 834 of file code-serializer.cc.

◆ Payload()

base::Vector< const uint8_t > v8::internal::SerializedCodeData::Payload ( ) const

Definition at line 843 of file code-serializer.cc.

Here is the call graph for this function:

◆ SanityCheck()

SerializedCodeSanityCheckResult v8::internal::SerializedCodeData::SanityCheck ( uint32_t expected_ro_snapshot_checksum,
uint32_t expected_source_hash ) const
private

Definition at line 763 of file code-serializer.cc.

Here is the caller graph for this function:

◆ SanityCheckJustSource()

SerializedCodeSanityCheckResult v8::internal::SerializedCodeData::SanityCheckJustSource ( uint32_t expected_source_hash) const
private

Definition at line 772 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SanityCheckWithoutSource()

SerializedCodeSanityCheckResult v8::internal::SerializedCodeData::SanityCheckWithoutSource ( uint32_t expected_ro_snapshot_checksum) const
private

Definition at line 781 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SourceHash()

uint32_t v8::internal::SerializedCodeData::SourceHash ( DirectHandle< String > source,
DirectHandle< FixedArray > wrapped_arguments,
ScriptOriginOptions origin_options )
static

Definition at line 817 of file code-serializer.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ kChecksumOffset

const uint32_t v8::internal::SerializedCodeData::kChecksumOffset = kPayloadLengthOffset + kUInt32Size
static

Definition at line 125 of file code-serializer.h.

◆ kFlagHashOffset

const uint32_t v8::internal::SerializedCodeData::kFlagHashOffset = kSourceHashOffset + kUInt32Size
static

Definition at line 120 of file code-serializer.h.

◆ kHeaderSize

const uint32_t v8::internal::SerializedCodeData::kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)
static

Definition at line 127 of file code-serializer.h.

◆ kPayloadLengthOffset

const uint32_t v8::internal::SerializedCodeData::kPayloadLengthOffset
static
Initial value:

Definition at line 123 of file code-serializer.h.

◆ kReadOnlySnapshotChecksumOffset

const uint32_t v8::internal::SerializedCodeData::kReadOnlySnapshotChecksumOffset
static
Initial value:

Definition at line 121 of file code-serializer.h.

◆ kSourceHashOffset

const uint32_t v8::internal::SerializedCodeData::kSourceHashOffset = kVersionHashOffset + kUInt32Size
static

Definition at line 119 of file code-serializer.h.

◆ kUnalignedHeaderSize

const uint32_t v8::internal::SerializedCodeData::kUnalignedHeaderSize = kChecksumOffset + kUInt32Size
static

Definition at line 126 of file code-serializer.h.

◆ kVersionHashOffset

const uint32_t v8::internal::SerializedCodeData::kVersionHashOffset = kMagicNumberOffset + kUInt32Size
static

Definition at line 118 of file code-serializer.h.


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